summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/autotools.bbclass25
1 files changed, 9 insertions, 16 deletions
diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
index 324cbff47a..39f5036ecf 100644
--- a/meta/classes/autotools.bbclass
+++ b/meta/classes/autotools.bbclass
@@ -38,6 +38,12 @@ def autotools_set_crosscompiling(d):
38 return " cross_compiling=yes" 38 return " cross_compiling=yes"
39 return "" 39 return ""
40 40
41def append_libtool_sysroot(d):
42 # Only supply libtool sysroot option for non-native packages
43 if not bb.data.inherits_class('native', d):
44 return '--with-libtool-sysroot=${STAGING_DIR_HOST}'
45 return ""
46
41# EXTRA_OECONF_append = "${@autotools_set_crosscompiling(d)}" 47# EXTRA_OECONF_append = "${@autotools_set_crosscompiling(d)}"
42 48
43CONFIGUREOPTS = " --build=${BUILD_SYS} \ 49CONFIGUREOPTS = " --build=${BUILD_SYS} \
@@ -56,14 +62,13 @@ CONFIGUREOPTS = " --build=${BUILD_SYS} \
56 --includedir=${includedir} \ 62 --includedir=${includedir} \
57 --oldincludedir=${oldincludedir} \ 63 --oldincludedir=${oldincludedir} \
58 --infodir=${infodir} \ 64 --infodir=${infodir} \
59 --mandir=${mandir}" 65 --mandir=${mandir} \
66 ${@append_libtool_sysroot(d)}"
60 67
61oe_runconf () { 68oe_runconf () {
62 if [ -x ${S}/configure ] ; then 69 if [ -x ${S}/configure ] ; then
63 cfgcmd="${S}/configure \ 70 cfgcmd="${S}/configure \
64 ${CONFIGUREOPTS} \ 71 ${CONFIGUREOPTS} ${EXTRA_OECONF} $@"
65 ${EXTRA_OECONF} \
66 $@"
67 oenote "Running $cfgcmd..." 72 oenote "Running $cfgcmd..."
68 $cfgcmd || oefatal "oe_runconf failed" 73 $cfgcmd || oefatal "oe_runconf failed"
69 else 74 else
@@ -152,18 +157,6 @@ autotools_do_install() {
152 oe_runmake 'DESTDIR=${D}' install 157 oe_runmake 'DESTDIR=${D}' install
153} 158}
154 159
155PACKAGE_PREPROCESS_FUNCS += "autotools_prepackage_lamangler"
156
157autotools_prepackage_lamangler () {
158 for i in `find ${PKGD} -name "*.la"` ; do \
159 sed -i -e 's:${STAGING_LIBDIR}:${libdir}:g;' \
160 -e 's:${D}::g;' \
161 -e 's:-I${WORKDIR}\S*: :g;' \
162 -e 's:-L${WORKDIR}\S*: :g;' \
163 $i
164 done
165}
166
167autotools_stage_dir() { 160autotools_stage_dir() {
168 sysroot_stage_dir $1 $2 161 sysroot_stage_dir $1 $2
169} 162}