diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-07-18 17:38:05 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-07-18 22:18:52 +0100 |
commit | ac7a0311825e20c544d17bfd8be63546ad36e665 (patch) | |
tree | faf4f050bb8e629a5892f6eb7b0260583ca29451 /meta | |
parent | 63f545b850ea4118a7e9e412aa8a22206dc7da8c (diff) | |
download | poky-ac7a0311825e20c544d17bfd8be63546ad36e665.tar.gz |
bitbake.conf: Define USRBINPATH globally instead of individually
Many recipes are now having to define PERLPATH and PYTHONPATH variables.
Creating USRBINPATH in bitbake.conf means we can remove all these lines
from the many recipes now needing this and simplify the code changes
needed in each case, reducing the chance of errors being introduced.
Also fixup glib python binary location issue and fix function indentation.
(From OE-Core rev: cf63d9068c3a8c635dfc240d30dfff278be9b0e2)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/conf/bitbake.conf | 4 | ||||
-rw-r--r-- | meta/recipes-core/eglibc/eglibc-package.inc | 5 | ||||
-rw-r--r-- | meta/recipes-core/glib-2.0/glib-2.0_2.32.4.bb | 17 | ||||
-rw-r--r-- | meta/recipes-core/glib-2.0/glib.inc | 1 | ||||
-rw-r--r-- | meta/recipes-devtools/autoconf/autoconf.inc | 8 | ||||
-rw-r--r-- | meta/recipes-devtools/automake/automake_1.12.1.bb | 8 | ||||
-rw-r--r-- | meta/recipes-devtools/quilt/quilt_0.60.bb | 5 | ||||
-rw-r--r-- | meta/recipes-extended/groff/groff_1.20.1.bb | 8 |
8 files changed, 19 insertions, 37 deletions
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index c94012e665..1525e44b2c 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf | |||
@@ -66,6 +66,10 @@ localstatedir_nativesdk = "/var" | |||
66 | # := is used carefully here | 66 | # := is used carefully here |
67 | # | 67 | # |
68 | target_datadir := "${datadir}" | 68 | target_datadir := "${datadir}" |
69 | # Used to find env/perl/python | ||
70 | USRBINPATH = "${bindir}" | ||
71 | USRBINPATH_class-native = "/usr/bin" | ||
72 | USRBINPATH_class-nativesdk = "/usr/bin" | ||
69 | 73 | ||
70 | ################################################################## | 74 | ################################################################## |
71 | # Architecture-dependent build variables. | 75 | # Architecture-dependent build variables. |
diff --git a/meta/recipes-core/eglibc/eglibc-package.inc b/meta/recipes-core/eglibc/eglibc-package.inc index 9a7febe666..119b443649 100644 --- a/meta/recipes-core/eglibc/eglibc-package.inc +++ b/meta/recipes-core/eglibc/eglibc-package.inc | |||
@@ -77,9 +77,6 @@ DESCRIPTION_libsotruss = "Library to support sotruss which traces calls through | |||
77 | 77 | ||
78 | inherit libc-common multilib_header | 78 | inherit libc-common multilib_header |
79 | 79 | ||
80 | PERLPATH = "${bindir}/env perl" | ||
81 | PERLPATH_virtclass-nativesdk = "/usr/bin/env perl" | ||
82 | |||
83 | do_install_append () { | 80 | do_install_append () { |
84 | rm -f ${D}${sysconfdir}/localtime | 81 | rm -f ${D}${sysconfdir}/localtime |
85 | rm -rf ${D}${localstatedir} | 82 | rm -rf ${D}${localstatedir} |
@@ -87,7 +84,7 @@ do_install_append () { | |||
87 | oe_multilib_header bits/syscall.h | 84 | oe_multilib_header bits/syscall.h |
88 | 85 | ||
89 | if [ -f ${D}${bindir}/mtrace ]; then | 86 | if [ -f ${D}${bindir}/mtrace ]; then |
90 | sed -i -e '1s,#!.*perl,#! ${PERLPATH},' -e '2s,exec.*perl,exec ${PERLPATH},' ${D}${bindir}/mtrace | 87 | sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' -e '2s,exec.*perl,exec ${USRBINPATH}/env perl,' ${D}${bindir}/mtrace |
91 | fi | 88 | fi |
92 | } | 89 | } |
93 | 90 | ||
diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.32.4.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.32.4.bb index 85352edb23..1f8ad7d0a7 100644 --- a/meta/recipes-core/glib-2.0/glib-2.0_2.32.4.bb +++ b/meta/recipes-core/glib-2.0/glib-2.0_2.32.4.bb | |||
@@ -1,6 +1,6 @@ | |||
1 | require glib.inc | 1 | require glib.inc |
2 | 2 | ||
3 | PR = "r1" | 3 | PR = "r2" |
4 | PE = "1" | 4 | PE = "1" |
5 | 5 | ||
6 | DEPENDS += "libffi python-argparse-native zlib" | 6 | DEPENDS += "libffi python-argparse-native zlib" |
@@ -22,15 +22,12 @@ SRC_URI[sha256sum] = "a5d742a4fda22fb6975a8c0cfcd2499dd1c809b8afd4ef709bda4d11b1 | |||
22 | SRC_URI_append_virtclass-native = " file://glib-gettextize-dir.patch" | 22 | SRC_URI_append_virtclass-native = " file://glib-gettextize-dir.patch" |
23 | BBCLASSEXTEND = "native nativesdk" | 23 | BBCLASSEXTEND = "native nativesdk" |
24 | 24 | ||
25 | PERLPATH = "${bindir}/env perl" | ||
26 | PERLPATH_virtclass-native = "/usr/bin/env perl" | ||
27 | PERLPATH_virtclass-nativesdk = "/usr/bin/env perl" | ||
28 | |||
29 | do_configure_prepend() { | 25 | do_configure_prepend() { |
30 | # missing ${topdir}/gtk-doc.make and --disable-gtk-doc* is not enough, because it calls gtkdocize (not provided by gtk-doc-native) | 26 | # missing ${topdir}/gtk-doc.make and --disable-gtk-doc* is not enough, because it calls gtkdocize (not provided by gtk-doc-native) |
31 | sed -i '/^docs/d' ${S}/configure.ac | 27 | sed -i '/^docs/d' ${S}/configure.ac |
32 | sed -i 's/SUBDIRS = . m4macros glib gmodule gthread gobject gio tests po docs/SUBDIRS = . m4macros glib gmodule gthread gobject gio tests po/g' ${S}/Makefile.am | 28 | sed -i 's/SUBDIRS = . m4macros glib gmodule gthread gobject gio tests po docs/SUBDIRS = . m4macros glib gmodule gthread gobject gio tests po/g' ${S}/Makefile.am |
33 | sed -i -e "s:TEST_PROGS += gdbus-serialization::g" ${S}/gio/tests/Makefile.am | 29 | sed -i -e "s:TEST_PROGS += gdbus-serialization::g" ${S}/gio/tests/Makefile.am |
30 | sed -i -e '1s,#!.*,#!${USRBINPATH}/env python,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in | ||
34 | } | 31 | } |
35 | 32 | ||
36 | do_install_append() { | 33 | do_install_append() { |
@@ -44,6 +41,6 @@ do_install_append() { | |||
44 | # Some distros have both /bin/perl and /usr/bin/perl, but we set perl location | 41 | # Some distros have both /bin/perl and /usr/bin/perl, but we set perl location |
45 | # for target as /usr/bin/perl, so fix it to /usr/bin/perl. | 42 | # for target as /usr/bin/perl, so fix it to /usr/bin/perl. |
46 | if [ -f ${D}${bindir}/glib-mkenums ]; then | 43 | if [ -f ${D}${bindir}/glib-mkenums ]; then |
47 | sed -i -e '1s,#!.*perl,#! ${PERLPATH},' ${D}${bindir}/glib-mkenums | 44 | sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/glib-mkenums |
48 | fi | 45 | fi |
49 | } | 46 | } |
diff --git a/meta/recipes-core/glib-2.0/glib.inc b/meta/recipes-core/glib-2.0/glib.inc index 9ae02d9456..2f48e27f0e 100644 --- a/meta/recipes-core/glib-2.0/glib.inc +++ b/meta/recipes-core/glib-2.0/glib.inc | |||
@@ -31,7 +31,6 @@ EXTRA_OECONF = "--disable-debug --enable-included-printf=no ${CORECONF}" | |||
31 | EXTRA_OECONF_virtclass-native = "${CORECONF}" | 31 | EXTRA_OECONF_virtclass-native = "${CORECONF}" |
32 | EXTRA_OECONF_linuxstdbase = "--enable-included-printf=no ${CORECONF}" | 32 | EXTRA_OECONF_linuxstdbase = "--enable-included-printf=no ${CORECONF}" |
33 | 33 | ||
34 | |||
35 | FILES_${PN} = "${libdir}/lib*${SOLIBS} ${datadir}/glib-2.0/schemas \ | 34 | FILES_${PN} = "${libdir}/lib*${SOLIBS} ${datadir}/glib-2.0/schemas \ |
36 | ${datadir}/glib-2.0/gettext/mkinstalldirs ${datadir}/glib-2.0/gettext/po/Makefile.in.in" | 35 | ${datadir}/glib-2.0/gettext/mkinstalldirs ${datadir}/glib-2.0/gettext/po/Makefile.in.in" |
37 | FILES_${PN}-dev += "${libdir}/glib-2.0/include \ | 36 | FILES_${PN}-dev += "${libdir}/glib-2.0/include \ |
diff --git a/meta/recipes-devtools/autoconf/autoconf.inc b/meta/recipes-devtools/autoconf/autoconf.inc index 3ae98c8407..2c077011f8 100644 --- a/meta/recipes-devtools/autoconf/autoconf.inc +++ b/meta/recipes-devtools/autoconf/autoconf.inc | |||
@@ -17,10 +17,6 @@ SRC_URI = "${GNU_MIRROR}/autoconf/autoconf-${PV}.tar.bz2 \ | |||
17 | 17 | ||
18 | inherit autotools | 18 | inherit autotools |
19 | 19 | ||
20 | PERLPATH = "${bindir}/perl" | ||
21 | PERLPATH_virtclass-native = "/usr/bin/perl" | ||
22 | PERLPATH_virtclass-nativesdk = "/usr/bin/perl" | ||
23 | |||
24 | do_install_append() { | 20 | do_install_append() { |
25 | rm -rf ${D}${datadir}/emacs | 21 | rm -rf ${D}${datadir}/emacs |
26 | 22 | ||
@@ -28,8 +24,8 @@ do_install_append() { | |||
28 | # for target as /usr/bin/perl, so fix it to /usr/bin/perl. | 24 | # for target as /usr/bin/perl, so fix it to /usr/bin/perl. |
29 | for i in autoheader autom4te autoreconf autoscan autoupdate ifnames; do | 25 | for i in autoheader autom4te autoreconf autoscan autoupdate ifnames; do |
30 | if [ -f ${D}${bindir}/$i ]; then | 26 | if [ -f ${D}${bindir}/$i ]; then |
31 | sed -i -e '1s,#!.*perl,#! ${PERLPATH},' \ | 27 | sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/perl,' \ |
32 | -e 's,exec .*/bin/perl \(.*\) exec .*/bin/perl \(.*\),exec ${PERLPATH} \1 exec ${PERLPATH} \2,' \ | 28 | -e 's,exec .*/bin/perl \(.*\) exec .*/bin/perl \(.*\),exec ${USRBINPATH}/perl \1 exec ${USRBINPATH}/perl \2,' \ |
33 | ${D}${bindir}/$i | 29 | ${D}${bindir}/$i |
34 | fi | 30 | fi |
35 | done | 31 | done |
diff --git a/meta/recipes-devtools/automake/automake_1.12.1.bb b/meta/recipes-devtools/automake/automake_1.12.1.bb index c2bc6a3068..a1e37d471c 100644 --- a/meta/recipes-devtools/automake/automake_1.12.1.bb +++ b/meta/recipes-devtools/automake/automake_1.12.1.bb | |||
@@ -34,10 +34,6 @@ PATHFIXPATCH = "file://path_prog_fixes.patch" | |||
34 | PATHFIXPATCH_virtclass-native = "" | 34 | PATHFIXPATCH_virtclass-native = "" |
35 | PATHFIXPATCH_virtclass-nativesdk = "" | 35 | PATHFIXPATCH_virtclass-nativesdk = "" |
36 | 36 | ||
37 | PERLPATH = "${bindir}/perl" | ||
38 | PERLPATH_virtclass-native = "/usr/bin/perl" | ||
39 | PERLPATH_virtclass-nativesdk = "/usr/bin/perl" | ||
40 | |||
41 | SRC_URI += "${PATHFIXPATCH} \ | 37 | SRC_URI += "${PATHFIXPATCH} \ |
42 | file://prefer-cpio-over-pax-for-ustar-archives.patch \ | 38 | file://prefer-cpio-over-pax-for-ustar-archives.patch \ |
43 | file://python-libdir.patch \ | 39 | file://python-libdir.patch \ |
@@ -56,8 +52,8 @@ do_install () { | |||
56 | # for target as /usr/bin/perl, so fix it to /usr/bin/perl. | 52 | # for target as /usr/bin/perl, so fix it to /usr/bin/perl. |
57 | for i in aclocal aclocal-1.11 automake automake-1.11; do | 53 | for i in aclocal aclocal-1.11 automake automake-1.11; do |
58 | if [ -f ${D}${bindir}/$i ]; then | 54 | if [ -f ${D}${bindir}/$i ]; then |
59 | sed -i -e '1s,#!.*perl,#! ${PERLPATH},' \ | 55 | sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/perl,' \ |
60 | -e 's,exec .*/bin/perl \(.*\) exec .*/bin/perl \(.*\),exec ${PERLPATH} \1 exec ${PERLPATH} \2,' \ | 56 | -e 's,exec .*/bin/perl \(.*\) exec .*/bin/perl \(.*\),exec ${USRBINPATH}/perl \1 exec ${USRBINPATH}/perl \2,' \ |
61 | ${D}${bindir}/$i | 57 | ${D}${bindir}/$i |
62 | fi | 58 | fi |
63 | done | 59 | done |
diff --git a/meta/recipes-devtools/quilt/quilt_0.60.bb b/meta/recipes-devtools/quilt/quilt_0.60.bb index 89c3f84f39..d866032188 100644 --- a/meta/recipes-devtools/quilt/quilt_0.60.bb +++ b/meta/recipes-devtools/quilt/quilt_0.60.bb | |||
@@ -9,15 +9,12 @@ PR = "r1" | |||
9 | 9 | ||
10 | CACHED_CONFIGUREVARS += "ac_cv_path_BASH=${base_bindir}/bash" | 10 | CACHED_CONFIGUREVARS += "ac_cv_path_BASH=${base_bindir}/bash" |
11 | 11 | ||
12 | PERLPATH = "${bindir}/env perl" | ||
13 | PERLPATH_virtclass-nativesdk = "/usr/bin/env perl" | ||
14 | |||
15 | # fix build-distro specific perl path in the target perl scripts | 12 | # fix build-distro specific perl path in the target perl scripts |
16 | do_install_append() { | 13 | do_install_append() { |
17 | for perlscript in ${D}${datadir}/quilt/scripts/remove-trailing-ws ${D}${datadir}/quilt/scripts/dependency-graph ${D}${datadir}/quilt/scripts/edmail ${D}${bindir}/guards | 14 | for perlscript in ${D}${datadir}/quilt/scripts/remove-trailing-ws ${D}${datadir}/quilt/scripts/dependency-graph ${D}${datadir}/quilt/scripts/edmail ${D}${bindir}/guards |
18 | do | 15 | do |
19 | if [ -f $perlscript ]; then | 16 | if [ -f $perlscript ]; then |
20 | sed -i -e '1s,#!.*perl,#! ${PERLPATH},' $perlscript | 17 | sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' $perlscript |
21 | fi | 18 | fi |
22 | done | 19 | done |
23 | } | 20 | } |
diff --git a/meta/recipes-extended/groff/groff_1.20.1.bb b/meta/recipes-extended/groff/groff_1.20.1.bb index c5a475a348..c7da1b4178 100644 --- a/meta/recipes-extended/groff/groff_1.20.1.bb +++ b/meta/recipes-extended/groff/groff_1.20.1.bb | |||
@@ -18,10 +18,6 @@ DEPENDS_virtclass-native = "" | |||
18 | 18 | ||
19 | inherit autotools | 19 | inherit autotools |
20 | 20 | ||
21 | PERLPATH = "${bindir}/perl" | ||
22 | PERLPATH_virtclass-native = "/usr/bin/env perl" | ||
23 | PERLPATH_virtclass-nativesdk = "/usr/bin/env perl" | ||
24 | |||
25 | EXTRA_OECONF = "--without-x" | 21 | EXTRA_OECONF = "--without-x" |
26 | PARALLEL_MAKE = "" | 22 | PARALLEL_MAKE = "" |
27 | 23 | ||
@@ -43,7 +39,7 @@ do_install_append() { | |||
43 | # for target as /usr/bin/perl, so fix it to /usr/bin/perl. | 39 | # for target as /usr/bin/perl, so fix it to /usr/bin/perl. |
44 | for i in afmtodit mmroff; do | 40 | for i in afmtodit mmroff; do |
45 | if [ -f ${D}${bindir}/$i ]; then | 41 | if [ -f ${D}${bindir}/$i ]; then |
46 | sed -i -e '1s,#!.*perl,#! ${PERLPATH},' ${D}${bindir}/$i | 42 | sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/$i |
47 | fi | 43 | fi |
48 | done | 44 | done |
49 | } | 45 | } |
@@ -53,7 +49,7 @@ do_install_append_virtclass-native() { | |||
53 | # for target as /usr/bin/perl, so fix it to /usr/bin/perl. | 49 | # for target as /usr/bin/perl, so fix it to /usr/bin/perl. |
54 | for i in afmtodit mmroff; do | 50 | for i in afmtodit mmroff; do |
55 | if [ -f ${D}${bindir}/$i ]; then | 51 | if [ -f ${D}${bindir}/$i ]; then |
56 | sed -i -e '1s,#!.*perl,#! ${PERLPATH},' ${D}${bindir}/$i | 52 | sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/$i |
57 | fi | 53 | fi |
58 | done | 54 | done |
59 | 55 | ||