diff options
author | Andrea Adami <andrea.adami@gmail.com> | 2013-08-30 01:11:29 +0200 |
---|---|---|
committer | Paul Eggleton <paul.eggleton@linux.intel.com> | 2013-09-03 14:53:44 +0100 |
commit | 123c38942d708a383b3e0d308d2dd771cedcd0f8 (patch) | |
tree | 124d8a22bd9cadb73cdd3e6f11709ad799557a1b /meta-initramfs | |
parent | 72e23c12296fbc77193898c38426add58d0c2d71 (diff) | |
download | meta-openembedded-123c38942d708a383b3e0d308d2dd771cedcd0f8.tar.gz |
klibc_2.0.2: refactor recipe to respect exec_prefix
Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
Diffstat (limited to 'meta-initramfs')
5 files changed, 15 insertions, 29 deletions
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.2/klibc-linux-libc-dev.patch b/meta-initramfs/recipes-devtools/klibc/klibc-2.0.2/klibc-linux-libc-dev.patch index 28efcfd53..204306475 100644 --- a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.2/klibc-linux-libc-dev.patch +++ b/meta-initramfs/recipes-devtools/klibc/klibc-2.0.2/klibc-linux-libc-dev.patch | |||
@@ -14,7 +14,7 @@ Index: klibc-2.0~rc2/scripts/Kbuild.install | |||
14 | $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)lib | 14 | $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)lib |
15 | $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)bin | 15 | $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)bin |
16 | - $(Q)$(MAKE) -C $(KLIBCKERNELSRC) ARCH=$(KLIBCARCH) INSTALL_HDR_PATH=$(INSTALLROOT)$(INSTALLDIR)/$(KCROSS) headers_install | 16 | - $(Q)$(MAKE) -C $(KLIBCKERNELSRC) ARCH=$(KLIBCARCH) INSTALL_HDR_PATH=$(INSTALLROOT)$(INSTALLDIR)/$(KCROSS) headers_install |
17 | + $(Q)for x in $(KLIBCKERNELSRC)/include/asm $(KLIBCKERNELSRC)/include/asm* $(KLIBCKERNELSRC)/include/linux $(KLIBCKERNELSRC)/include/mtd; do \ | 17 | + $(Q)for x in ../../../include/asm ../../../include/asm-generic ../../../include/linux ../../../include/mtd; do \ |
18 | + ln -sf $${x} $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/ || exit; \ | 18 | + ln -sf $${x} $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/ || exit; \ |
19 | + done | 19 | + done |
20 | $(Q)cp -rf usr/include/. $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/. | 20 | $(Q)cp -rf usr/include/. $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/. |
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.2/prefix.patch b/meta-initramfs/recipes-devtools/klibc/klibc-2.0.2/prefix.patch deleted file mode 100644 index 6f5ff0d60..000000000 --- a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.2/prefix.patch +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | Index: klibc-1.5.24/Makefile | ||
2 | =================================================================== | ||
3 | --- a/Makefile 2011-07-27 15:50:53.000000000 +0200 | ||
4 | +++ b/Makefile 2011-08-01 00:47:56.000000000 +0200 | ||
5 | @@ -39,7 +39,7 @@ | ||
6 | export PERL := perl | ||
7 | |||
8 | # Location for installation | ||
9 | -export prefix = /usr | ||
10 | +export prefix = $(INST) | ||
11 | export bindir = $(prefix)/bin | ||
12 | export libdir = $(prefix)/lib | ||
13 | export mandir = $(prefix)/man | ||
14 | |||
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.2/staging.patch b/meta-initramfs/recipes-devtools/klibc/klibc-2.0.2/staging.patch index 03955f25c..400864bb2 100644 --- a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.2/staging.patch +++ b/meta-initramfs/recipes-devtools/klibc/klibc-2.0.2/staging.patch | |||
@@ -21,7 +21,7 @@ Index: klibc-1.5.24/scripts/Kbuild.install | |||
21 | $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include | 21 | $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include |
22 | $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)lib | 22 | $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)lib |
23 | - $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)bin | 23 | - $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)bin |
24 | $(Q)for x in $(KLIBCKERNELSRC)/include/asm $(KLIBCKERNELSRC)/include/asm* $(KLIBCKERNELSRC)/include/linux $(KLIBCKERNELSRC)/include/mtd; do \ | 24 | $(Q)for x in ../../../include/asm ../../../include/asm-generic ../../../include/linux ../../../include/mtd; do \ |
25 | ln -sf $${x} $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/ || exit; \ | 25 | ln -sf $${x} $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/ || exit; \ |
26 | done | 26 | done |
27 | @@ -103,7 +100,6 @@ | 27 | @@ -103,7 +100,6 @@ |
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc.inc b/meta-initramfs/recipes-devtools/klibc/klibc.inc index 4d5f6c4dd..5f05c9fcd 100644 --- a/meta-initramfs/recipes-devtools/klibc/klibc.inc +++ b/meta-initramfs/recipes-devtools/klibc/klibc.inc | |||
@@ -37,7 +37,6 @@ SRC_URI_append_linux-uclibceabi = " file://klibc-config-eabi.patch \ | |||
37 | " | 37 | " |
38 | 38 | ||
39 | SRC_URI += "file://klibc-linux-libc-dev.patch \ | 39 | SRC_URI += "file://klibc-linux-libc-dev.patch \ |
40 | file://prefix.patch \ | ||
41 | file://staging.patch \ | 40 | file://staging.patch \ |
42 | " | 41 | " |
43 | 42 | ||
@@ -46,6 +45,9 @@ S = "${WORKDIR}/git" | |||
46 | EXTRA_OEMAKE = "'KLIBCARCH=${KLIBC_ARCH}' \ | 45 | EXTRA_OEMAKE = "'KLIBCARCH=${KLIBC_ARCH}' \ |
47 | 'CROSS_COMPILE=${TARGET_PREFIX}' \ | 46 | 'CROSS_COMPILE=${TARGET_PREFIX}' \ |
48 | 'KLIBCKERNELSRC=${STAGING_DIR_TARGET}${exec_prefix}' \ | 47 | 'KLIBCKERNELSRC=${STAGING_DIR_TARGET}${exec_prefix}' \ |
48 | 'prefix=${exec_prefix}' \ | ||
49 | 'INSTALLROOT=${D}' \ | ||
50 | 'SHLIBDIR=${libdir}' \ | ||
49 | " | 51 | " |
50 | 52 | ||
51 | do_configure () { | 53 | do_configure () { |
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc_2.0.2.bb b/meta-initramfs/recipes-devtools/klibc/klibc_2.0.2.bb index 9c2590eff..4244cf27c 100644 --- a/meta-initramfs/recipes-devtools/klibc/klibc_2.0.2.bb +++ b/meta-initramfs/recipes-devtools/klibc/klibc_2.0.2.bb | |||
@@ -1,27 +1,25 @@ | |||
1 | PR = "${INC_PR}.0" | 1 | PR = "${INC_PR}.0" |
2 | 2 | ||
3 | export INST = "${D}" | ||
4 | |||
5 | do_install() { | 3 | do_install() { |
6 | oe_runmake install | 4 | oe_runmake install |
7 | 5 | ||
8 | # the crosscompiler is packaged by klcc-cross | 6 | # the crosscompiler is packaged by klcc-cross |
9 | # remove klcc | 7 | # remove klcc |
10 | rm ${D}${base_bindir}/klcc | 8 | rm ${D}${bindir}/klcc |
11 | # remove now empty dir | 9 | # remove now empty dir |
12 | rmdir ${D}${base_bindir} | 10 | rmdir ${D}${bindir} |
13 | 11 | ||
14 | install -d ${D}${base_libdir} | 12 | install -d ${D}${libdir} |
15 | install -m 755 usr/klibc/klibc-*.so ${D}${base_libdir} | 13 | install -m 755 usr/klibc/klibc-*.so ${D}${libdir} |
16 | (cd ${D}${base_libdir}; ln -s klibc-*.so klibc.so) | 14 | (cd ${D}${libdir}; ln -s klibc-*.so klibc.so) |
17 | } | 15 | } |
18 | 16 | ||
19 | PACKAGES = "libklibc libklibc-staticdev libklibc-dev" | 17 | PACKAGES = "libklibc libklibc-staticdev libklibc-dev" |
20 | FILES_libklibc = "${base_libdir}/klibc-*.so" | 18 | FILES_libklibc = "${libdir}/klibc-*.so" |
21 | FILES_libklibc-staticdev = "${base_libdir}/klibc/lib/libc.a" | 19 | FILES_libklibc-staticdev = "${libdir}/klibc/lib/libc.a" |
22 | FILES_libklibc-dev = "${base_libdir}/klibc.so \ | 20 | FILES_libklibc-dev = "${libdir}/klibc.so \ |
23 | ${base_libdir}/klibc/lib/* \ | 21 | ${libdir}/klibc/lib/* \ |
24 | ${base_libdir}/klibc/include/* \ | 22 | ${libdir}/klibc/include/* \ |
25 | " | 23 | " |
26 | require klibc.inc | 24 | require klibc.inc |
27 | SUMMARY = "klibc, a small C library for use with initramfs" | 25 | SUMMARY = "klibc, a small C library for use with initramfs" |