[oe-commits] Khem Raj : libtool: Abstact more common things to libtool.inc

git version control git at git.openembedded.org
Tue Oct 12 01:30:28 UTC 2010


Module: openembedded.git
Branch: master
Commit: a92ca415ac94fdb208fd9d3340382d0d4809c4a0
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=a92ca415ac94fdb208fd9d3340382d0d4809c4a0

Author: Khem Raj <raj.khem at gmail.com>
Date:   Mon Oct 11 18:23:01 2010 -0700

libtool: Abstact more common things to libtool.inc

* inherit autotools is now in libtool.inc and so is EXTRA_AUTORECONF =
  "--exclude=libtoolize"

* Include libtool.inc separately into -cross -native -sdk and -nativesdk
  recipes for 2.4 this avoids the problem where libltdl etc are also
  provided by -sdk and -nativesdk recipes which is incorrect

* Delete ${D}${infodir}/dir this should be regenerated at install time

Signed-off-by: Khem Raj <raj.khem at gmail.com>

---

 recipes/libtool/libtool-cross_2.4.bb     |    7 +++++--
 recipes/libtool/libtool-native_2.4.bb    |    6 +++++-
 recipes/libtool/libtool-nativesdk_2.4.bb |    7 ++++---
 recipes/libtool/libtool-sdk_2.4.bb       |    9 ++++++++-
 recipes/libtool/libtool.inc              |   19 ++++++++++++++++++-
 recipes/libtool/libtool_1.5.10.bb        |    4 ----
 recipes/libtool/libtool_1.5.6.bb         |    4 ----
 recipes/libtool/libtool_2.2.6a.bb        |    4 ----
 recipes/libtool/libtool_2.2.6b.bb        |    4 ----
 recipes/libtool/libtool_2.4.bb           |   23 +++--------------------
 10 files changed, 43 insertions(+), 44 deletions(-)

diff --git a/recipes/libtool/libtool-cross_2.4.bb b/recipes/libtool/libtool-cross_2.4.bb
index e20c2c3..cc477ba 100644
--- a/recipes/libtool/libtool-cross_2.4.bb
+++ b/recipes/libtool/libtool-cross_2.4.bb
@@ -1,9 +1,12 @@
-require libtool_${PV}.bb
+require libtool.inc
+
+DEFAULT_PREFERENCE = "-1"
 
-PACKAGES = ""
 SRC_URI_append = " file://prefix.patch \
                    file://cross.patch \
                  "
+SRC_URI[md5sum] = "b32b04148ecdd7344abc6fe8bd1bb021"
+SRC_URI[sha256sum] = "13df57ab63a94e196c5d6e95d64e53262834fe780d5e82c28f177f9f71ddf62e"
 
 DEPENDS += "libtool-native"
 
diff --git a/recipes/libtool/libtool-native_2.4.bb b/recipes/libtool/libtool-native_2.4.bb
index 82b2419..e40680c 100644
--- a/recipes/libtool/libtool-native_2.4.bb
+++ b/recipes/libtool/libtool-native_2.4.bb
@@ -1,10 +1,14 @@
-require libtool_${PV}.bb
+require libtool.inc
+
+DEFAULT_PREFERENCE = "-1"
 
 DEPENDS = ""
 
 SRC_URI_append = " file://prefix.patch \
                    file://cross.patch \
                  "
+SRC_URI[md5sum] = "b32b04148ecdd7344abc6fe8bd1bb021"
+SRC_URI[sha256sum] = "13df57ab63a94e196c5d6e95d64e53262834fe780d5e82c28f177f9f71ddf62e"
 
 inherit native
 EXTRA_OECONF = " --with-sysroot=${STAGING_DIR_NATIVE}"
diff --git a/recipes/libtool/libtool-nativesdk_2.4.bb b/recipes/libtool/libtool-nativesdk_2.4.bb
index d01a17d..9aaf68a 100644
--- a/recipes/libtool/libtool-nativesdk_2.4.bb
+++ b/recipes/libtool/libtool-nativesdk_2.4.bb
@@ -1,10 +1,11 @@
-require libtool_${PV}.bb
-
-PACKAGES = ""
+require libtool.inc
+DEFAULT_PREFERENCE = "-1"
 
 SRC_URI_append = " file://prefix.patch \
                    file://cross.patch \
                  "
+SRC_URI[md5sum] = "b32b04148ecdd7344abc6fe8bd1bb021"
+SRC_URI[sha256sum] = "13df57ab63a94e196c5d6e95d64e53262834fe780d5e82c28f177f9f71ddf62e"
 
 inherit nativesdk
 do_configure_prepend () {
diff --git a/recipes/libtool/libtool-sdk_2.4.bb b/recipes/libtool/libtool-sdk_2.4.bb
index f1859ca..cf8ba3a 100644
--- a/recipes/libtool/libtool-sdk_2.4.bb
+++ b/recipes/libtool/libtool-sdk_2.4.bb
@@ -1,8 +1,12 @@
-require libtool_${PV}.bb
+require libtool.inc
+DEFAULT_PREFERENCE = "-1"
 
 SRC_URI_append = " file://prefix.patch \
                    file://cross.patch \
                  "
+SRC_URI[md5sum] = "b32b04148ecdd7344abc6fe8bd1bb021"
+SRC_URI[sha256sum] = "13df57ab63a94e196c5d6e95d64e53262834fe780d5e82c28f177f9f71ddf62e"
+
 inherit sdk
 
 do_configure_prepend () {
@@ -14,6 +18,9 @@ do_configure_prepend () {
 
 do_install () {
         autotools_do_install
+	# delete the dir index it should be generated after installing the package
+	# for real
+	rm -rf ${D}${infodir}/dir
         install -d ${D}${bindir}/
         install -m 0755 ${HOST_SYS}-libtool ${D}${bindir}/
 }
diff --git a/recipes/libtool/libtool.inc b/recipes/libtool/libtool.inc
index 838f029..6c194dd 100644
--- a/recipes/libtool/libtool.inc
+++ b/recipes/libtool/libtool.inc
@@ -6,10 +6,19 @@ HOMEPAGE = "http://www.gnu.org/software/libtool/libtool.html"
 LICENSE = "GPL"
 SECTION = "devel"
 
-INC_PR = "r25"
+INC_PR = "r26"
 
 FILESPATHPKG=. "libtool-${PV}:"
 
+# this SRC_URI is mainly for libtool 2.4 but all older
+# versions override SRC_URI so its a safe thing and at same
+# time it gives us more control over 2.4 recipes
+
+SRC_URI = "${GNU_MIRROR}/libtool/libtool-${PV}.tar.gz \
+           file://trailingslash.patch \
+           file://prefix-manpage-fix.patch \
+	   file://resolve-sysroot.patch \
+          "
 do_configure_prepend () {
 	if ${@['true', 'false'][bb.data.inherits_class('native', d) or bb.data.inherits_class('sdk', d) or (bb.data.getVar('PN', d, 1) == 'libtool-cross')]}
 	then
@@ -19,3 +28,11 @@ do_configure_prepend () {
 		export ac_cv_path_FGREP="${ac_cv_path_FGREP=${base_bindir}/grep -F}"
 	fi
 }
+do_compile_prepend () {
+        # Sometimes this file doesn't get rebuilt, force the issue
+        rm -f ${S}/libltdl/config/ltmain.sh
+        make libltdl/config/ltmain.sh
+}
+
+inherit autotools
+EXTRA_AUTORECONF = "--exclude=libtoolize"
diff --git a/recipes/libtool/libtool_1.5.10.bb b/recipes/libtool/libtool_1.5.10.bb
index 56475ae..11b78dc 100644
--- a/recipes/libtool/libtool_1.5.10.bb
+++ b/recipes/libtool/libtool_1.5.10.bb
@@ -13,10 +13,6 @@ FILES_libltdl = "${libdir}/libltdl.so.*"
 FILES_libltdl-dev = "${libdir}/libltdl.* ${includedir}/ltdl.h"
 FILES_libltdl-dbg += "${libdir}/.debug/"
 
-inherit autotools
-
-EXTRA_AUTORECONF = "--exclude=libtoolize"
-
 do_configure () {
 	find ${S} -name acinclude.m4 | for m4 in `cat`; do
 		cat ${S}/libtool.m4 ${S}/ltdl.m4 > $m4
diff --git a/recipes/libtool/libtool_1.5.6.bb b/recipes/libtool/libtool_1.5.6.bb
index 3a97d9e..6505784 100644
--- a/recipes/libtool/libtool_1.5.6.bb
+++ b/recipes/libtool/libtool_1.5.6.bb
@@ -15,10 +15,6 @@ FILES_libltdl = "${libdir}/libltdl.so.*"
 FILES_libltdl-dev = "${libdir}/libltdl.* ${includedir}/ltdl.h"
 FILES_libltdl-dbg += "${libdir}/.debug/"
 
-inherit autotools
-
-EXTRA_AUTORECONF = "--exclude=libtoolize"
-
 do_configure () {
 	find ${S} -name acinclude.m4 | for m4 in `cat`; do
 		cat ${S}/libtool.m4 ${S}/ltdl.m4 > $m4
diff --git a/recipes/libtool/libtool_2.2.6a.bb b/recipes/libtool/libtool_2.2.6a.bb
index b9155c9..5d3e451 100644
--- a/recipes/libtool/libtool_2.2.6a.bb
+++ b/recipes/libtool/libtool_2.2.6a.bb
@@ -10,10 +10,6 @@ FILES_libltdl = "${libdir}/libltdl.so.*"
 FILES_libltdl-dev = "${libdir}/libltdl.* ${includedir}/ltdl.h"
 FILES_libltdl-dbg = "${libdir}/.debug/"
 
-inherit autotools
-
-EXTRA_AUTORECONF = "--exclude=libtoolize"
-
 do_stage () {
        install -d ${STAGING_INCDIR}/libltdl
        install -m 0644 libltdl/ltdl.h ${STAGING_INCDIR}/
diff --git a/recipes/libtool/libtool_2.2.6b.bb b/recipes/libtool/libtool_2.2.6b.bb
index b72ab67..a19caac 100644
--- a/recipes/libtool/libtool_2.2.6b.bb
+++ b/recipes/libtool/libtool_2.2.6b.bb
@@ -13,10 +13,6 @@ FILES_libltdl = "${libdir}/libltdl.so.*"
 FILES_libltdl-dev = "${libdir}/libltdl.* ${includedir}/ltdl.h"
 FILES_libltdl-dbg = "${libdir}/.debug/"
 
-inherit autotools
-
-EXTRA_AUTORECONF = "--exclude=libtoolize"
-
 do_stage () {
        install -d ${STAGING_INCDIR}/libltdl
        install -m 0644 libltdl/ltdl.h ${STAGING_INCDIR}/
diff --git a/recipes/libtool/libtool_2.4.bb b/recipes/libtool/libtool_2.4.bb
index a928be2..c7c56fd 100644
--- a/recipes/libtool/libtool_2.4.bb
+++ b/recipes/libtool/libtool_2.4.bb
@@ -5,11 +5,6 @@ DEFAULT_PREFERENCE = "-1"
 DEPENDS = "libtool-native"
 PR = "${INC_PR}.0"
 
-SRC_URI = "${GNU_MIRROR}/libtool/libtool-${PV}.tar.gz \
-           file://trailingslash.patch \
-           file://prefix-manpage-fix.patch \
-	   file://resolve-sysroot.patch \
-          "
 SRC_URI[md5sum] = "b32b04148ecdd7344abc6fe8bd1bb021"
 SRC_URI[sha256sum] = "13df57ab63a94e196c5d6e95d64e53262834fe780d5e82c28f177f9f71ddf62e"
 PACKAGES =+ "libltdl libltdl-dev libltdl-dbg"
@@ -18,26 +13,14 @@ FILES_libltdl = "${libdir}/libltdl.so.*"
 FILES_libltdl-dev = "${libdir}/libltdl.* ${includedir}/ltdl.h"
 FILES_libltdl-dbg = "${libdir}/.debug/"
 
-inherit autotools
-
-EXTRA_AUTORECONF = "--exclude=libtoolize"
-EXTRA_OECONF = " --with-sysroot"
-do_compile_prepend () {
-        # Sometimes this file doesn't get rebuilt, force the issue
-        rm -f ${S}/libltdl/config/ltmain.sh
-        make libltdl/config/ltmain.sh
-}
-
 #
 # We want the results of libtool-cross preserved - don't stage anything ourselves.
 #
 SYSROOT_PREPROCESS_FUNCS += "libtool_sysroot_preprocess"
 
 libtool_sysroot_preprocess () {
-        if [ "${PN}" == "libtool" ]; then
-                rm -rf ${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}${bindir}/*
-                rm -rf ${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}${datadir}/aclocal/*
-                rm -rf ${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}${datadir}/libtool/config/*
-        fi
+       rm -rf ${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}${bindir}/*
+       rm -rf ${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}${datadir}/aclocal/*
+       rm -rf ${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}${datadir}/libtool/config/*
 }
 





More information about the Openembedded-commits mailing list