Skip to contentSkip to conversation

autoconf: simplify perl location forcing logic

PATCH New Ross Burton 1 participant 2 messages May 15, 2015

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 autoconf: simplify perl location forcing logic

Instead of letting configure find the host's perl and then use a complicated sed to replace it at install time, simply pre-seed the configure logic with the path we want to use.

---
 meta/recipes-devtools/autoconf/autoconf.inc | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)
meta/recipes-devtools/autoconf/autoconf.inc +3 -11
index 8b00fbd..78b77e8 100644
@@ -32,20 +32,12 @@ SRC_URI = "${GNU_MIRROR}/autoconf/autoconf-${PV}.tar.gz \
 
 inherit autotools texinfo
 
+CACHED_CONFIGUREVARS += "ac_cv_path_PERL=${USRBINPATH}/perl"
+
 do_configure() {
 	oe_runconf
 }
 
 do_install_append() {
     rm -rf ${D}${datadir}/emacs
-
-    # Some distros have both /bin/perl and /usr/bin/perl, but we set perl location
-    # for target as /usr/bin/perl, so fix it to /usr/bin/perl.
-    for i in autoheader autom4te autoreconf autoscan autoupdate ifnames; do
-        if [ -f ${D}${bindir}/$i ]; then
-            sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/perl,' \
-            -e 's,exec .*/bin/perl \(.*\) exec .*/bin/perl \(.*\),exec ${USRBINPATH}/perl \1 exec ${USRBINPATH}/perl \2,' \
-            ${D}${bindir}/$i
-        fi
-    done
-} 
+}
Signature · 1 line
2.1.4
#1 lore raw

PATCH v2 2/2 automake: simplify perl location forcing logic

Instead of letting configure find the host's perl and then use a complicated sed to replace it at install time, simply pre-seed the configure logic with the path we want to use.

---
 meta/recipes-devtools/automake/automake_1.15.bb | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)
meta/recipes-devtools/automake/automake_1.15.bb +2 -10
index d5b6e9e..c33dc22 100644
@@ -25,18 +25,10 @@ SRC_URI += " file://python-libdir.patch \
 SRC_URI[md5sum] = "716946a105ca228ab545fc37a70df3a3"
 SRC_URI[sha256sum] = "7946e945a96e28152ba5a6beb0625ca715c6e32ac55f2e353ef54def0c8ed924"
 
+CACHED_CONFIGUREVARS += "ac_cv_path_PERL=${USRBINPATH}/perl"
+
 do_install_append () {
     install -d ${D}${datadir}
-
-    # Some distros have both /bin/perl and /usr/bin/perl, but we set perl location
-    # for target as /usr/bin/perl, so fix it to /usr/bin/perl.
-    for i in aclocal aclocal-${NAMEVER} automake automake-${NAMEVER}; do
-        if [ -f ${D}${bindir}/$i ]; then
-            sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/perl,' \
-            -e 's,exec .*/bin/perl \(.*\) exec .*/bin/perl \(.*\),exec ${USRBINPATH}/perl \1 exec ${USRBINPATH}/perl \2,' \
-            ${D}${bindir}/$i
-        fi
-    done
 }
 
 BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.1.4