From d42466ea43827f1c6a5a972819dac273e381d33d Mon Sep 17 00:00:00 2001 From: Nitin A Kamble Date: Mon, 21 Jun 2010 03:46:34 -0700 Subject: libtool family: upgrade from 2.2.6 to 2.2.10 This upgrades these recipes: libtool_2.2.6.bb -> libtool_2.2.10.bb libtool-native_2.2.6.bb -> libtool-native_2.2.10.bb libtool-cross_2.2.6.bb -> libtool-cross_2.2.10.bb libtool-nativesdk_2.2.6.bb -> libtool-nativesdk_2.2.10.bb Also fixes build failure caused by having aclocal.m4 built with older version of libtool. Rebased these patches for the newer version sources add_dolt.patch cross_compile.patch dolt.m4 Changed this patch to fix documentation building for non-x86 archs prefix.patch Rebased and changed to fix the building of ncurses recipe: trailingslash.patch Also updated metadata variables like LICENSE & LIC_CHKSUM_FILES Signed-off-by: Nitin A Kamble --- meta/packages/libtool/libtool-2.2.6/add_dolt.patch | 12 -- .../libtool/libtool-2.2.6/cross_compile.patch | 55 --------- meta/packages/libtool/libtool-2.2.6/dolt.m4 | 129 --------------------- meta/packages/libtool/libtool-2.2.6/prefix.patch | 103 ---------------- .../libtool/libtool-2.2.6/trailingslash.patch | 24 ---- meta/packages/libtool/libtool-cross_2.2.10.bb | 41 +++++++ meta/packages/libtool/libtool-cross_2.2.6.bb | 42 ------- meta/packages/libtool/libtool-native_2.2.10.bb | 21 ++++ meta/packages/libtool/libtool-native_2.2.6.bb | 20 ---- meta/packages/libtool/libtool-nativesdk_2.2.10.bb | 26 +++++ meta/packages/libtool/libtool-nativesdk_2.2.6.bb | 19 --- meta/packages/libtool/libtool.inc | 11 +- meta/packages/libtool/libtool/add_dolt.patch | 12 ++ meta/packages/libtool/libtool/cross_compile.patch | 55 +++++++++ meta/packages/libtool/libtool/dolt.m4 | 129 +++++++++++++++++++++ meta/packages/libtool/libtool/prefix.patch | 121 +++++++++++++++++++ meta/packages/libtool/libtool/trailingslash.patch | 24 ++++ meta/packages/libtool/libtool_2.2.10.bb | 33 ++++++ meta/packages/libtool/libtool_2.2.6.bb | 36 ------ 19 files changed, 472 insertions(+), 441 deletions(-) delete mode 100644 meta/packages/libtool/libtool-2.2.6/add_dolt.patch delete mode 100644 meta/packages/libtool/libtool-2.2.6/cross_compile.patch delete mode 100644 meta/packages/libtool/libtool-2.2.6/dolt.m4 delete mode 100644 meta/packages/libtool/libtool-2.2.6/prefix.patch delete mode 100644 meta/packages/libtool/libtool-2.2.6/trailingslash.patch create mode 100644 meta/packages/libtool/libtool-cross_2.2.10.bb delete mode 100644 meta/packages/libtool/libtool-cross_2.2.6.bb create mode 100644 meta/packages/libtool/libtool-native_2.2.10.bb delete mode 100644 meta/packages/libtool/libtool-native_2.2.6.bb create mode 100644 meta/packages/libtool/libtool-nativesdk_2.2.10.bb delete mode 100644 meta/packages/libtool/libtool-nativesdk_2.2.6.bb create mode 100644 meta/packages/libtool/libtool/add_dolt.patch create mode 100644 meta/packages/libtool/libtool/cross_compile.patch create mode 100644 meta/packages/libtool/libtool/dolt.m4 create mode 100644 meta/packages/libtool/libtool/prefix.patch create mode 100644 meta/packages/libtool/libtool/trailingslash.patch create mode 100644 meta/packages/libtool/libtool_2.2.10.bb delete mode 100644 meta/packages/libtool/libtool_2.2.6.bb (limited to 'meta/packages/libtool') diff --git a/meta/packages/libtool/libtool-2.2.6/add_dolt.patch b/meta/packages/libtool/libtool-2.2.6/add_dolt.patch deleted file mode 100644 index 2c5df9603..000000000 --- a/meta/packages/libtool/libtool-2.2.6/add_dolt.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: libtool-2.2.2/libltdl/m4/libtool.m4 -=================================================================== ---- libtool-2.2.2.orig/libltdl/m4/libtool.m4 2008-04-13 22:40:30.000000000 +0100 -+++ libtool-2.2.2/libltdl/m4/libtool.m4 2008-04-13 23:38:45.000000000 +0100 -@@ -97,6 +97,7 @@ - - # Only expand once: - m4_define([LT_INIT]) -+DOLT - ])# LT_INIT - - # Old names: diff --git a/meta/packages/libtool/libtool-2.2.6/cross_compile.patch b/meta/packages/libtool/libtool-2.2.6/cross_compile.patch deleted file mode 100644 index b4bacbd12..000000000 --- a/meta/packages/libtool/libtool-2.2.6/cross_compile.patch +++ /dev/null @@ -1,55 +0,0 @@ -Tweaks to make cross-compiling work combined and updated from various -older patches, some by Chris Larson. -Not upstreable in this form. - -RP - 01/05/2008 - -Index: libtool-2.2.2/libltdl/config/ltmain.m4sh -=================================================================== ---- libtool-2.2.2.orig/libltdl/config/ltmain.m4sh 2008-05-01 21:48:42.000000000 +0100 -+++ libtool-2.2.2/libltdl/config/ltmain.m4sh 2008-05-01 21:51:41.000000000 +0100 -@@ -4454,8 +4454,14 @@ - absdir="$abs_ladir" - libdir="$abs_ladir" - else -- dir="$libdir" -- absdir="$libdir" -+ # Adding 'libdir' from the .la file to our library search paths -+ # breaks crosscompilation horribly. We cheat here and don't add -+ # it, instead adding the path where we found the .la. -CL -+ dir="$abs_ladir" -+ absdir="$abs_ladir" -+ libdir="$abs_ladir" -+ #dir="$libdir" -+ #absdir="$libdir" - fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes - else -@@ -4825,8 +4831,6 @@ - add="$libdir/$linklib" - fi - else -- # We cannot seem to hardcode it, guess we'll fake it. -- add_dir="-L$libdir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in -@@ -4972,7 +4976,17 @@ - fi - ;; - *) -- path="-L$absdir/$objdir" -+ # OE sets installed=no in staging. We need to look in $objdir and $absdir, -+ # preferring $objdir. RP 31/04/2008 -+ if test -f "$absdir/$objdir/$depdepl" ; then -+ depdepl="$absdir/$objdir/$depdepl" -+ path="-L$absdir/$objdir" -+ elif test -f "$absdir/$depdepl" ; then -+ depdepl="$absdir/$depdepl" -+ path="-L$absdir" -+ else -+ path="-L$absdir/$objdir" -+ fi - ;; - esac - else diff --git a/meta/packages/libtool/libtool-2.2.6/dolt.m4 b/meta/packages/libtool/libtool-2.2.6/dolt.m4 deleted file mode 100644 index 9bedecf27..000000000 --- a/meta/packages/libtool/libtool-2.2.6/dolt.m4 +++ /dev/null @@ -1,129 +0,0 @@ -dnl dolt, a replacement for libtool -dnl Copyright © 2007-2008 Josh Triplett -dnl Copying and distribution of this file, with or without modification, -dnl are permitted in any medium without royalty provided the copyright -dnl notice and this notice are preserved. -dnl -dnl To use dolt, invoke the DOLT macro immediately after the libtool macros. -dnl Optionally, copy this file into acinclude.m4, to avoid the need to have it -dnl installed when running autoconf on your project. - -AC_DEFUN([DOLT], [ -AC_REQUIRE([AC_CANONICAL_HOST]) -# dolt, a replacement for libtool -# Josh Triplett -AC_PATH_PROG(DOLT_BASH, bash) -AC_MSG_CHECKING([if dolt supports this host]) -dolt_supported=yes -if test x$DOLT_BASH = x; then - AC_MSG_ERROR([dolt: Bash not found, fatal error]) -fi -if test x$GCC != xyes; then - AC_MSG_ERROR([dolt: gcc not found, fatal error]) -fi -case $host in -i?86-*-linux*|x86_64-*-linux*|arm-*-linux*) ;; -*) AC_MSG_ERROR([dolt: incompatible host, fatal error]) ;; -esac -AC_MSG_RESULT([yes, replacing libtool]) - -dnl Start writing out doltcompile. - cat <<__DOLTCOMPILE__EOF__ >doltcompile -#!$DOLT_BASH -__DOLTCOMPILE__EOF__ - cat <<'__DOLTCOMPILE__EOF__' >>doltcompile -args=("$[]@") -for ((arg=0; arg<${#args@<:@@@:>@}; arg++)) ; do - if test x"${args@<:@$arg@:>@}" = x-o ; then - objarg=$((arg+1)) - break - fi -done -if test x$objarg = x ; then - echo 'Error: no -o on compiler command line' 1>&2 - exit 1 -fi -lo="${args@<:@$objarg@:>@}" -obj="${lo%.lo}" -if test x"$lo" = x"$obj" ; then - echo "Error: libtool object file name \"$lo\" does not end in .lo" 1>&2 - exit 1 -fi -objbase="${obj##*/}" -__DOLTCOMPILE__EOF__ - -dnl Write out shared compilation code. - if test x$enable_shared = xyes; then - cat <<'__DOLTCOMPILE__EOF__' >>doltcompile -libobjdir="${obj%$objbase}.libs" -if test ! -d "$libobjdir" ; then - mkdir "$libobjdir" - mkdir_ret=$? - if test "$mkdir_ret" -ne 0 && test ! -d "$libobjdir" ; then - exit $mkdir_ret - fi -fi -pic_object="$libobjdir/$objbase.o" -args@<:@$objarg@:>@="$pic_object" -"${args@<:@@@:>@}" -fPIC -DPIC -__DOLTCOMPILE__EOF__ - fi - -dnl Write out static compilation code. -dnl Avoid duplicate compiler output if also building shared objects. - if test x$enable_static = xyes; then - cat <<'__DOLTCOMPILE__EOF__' >>doltcompile -non_pic_object="$obj.o" -args@<:@$objarg@:>@="$non_pic_object" -__DOLTCOMPILE__EOF__ - if test x$enable_shared = xyes; then - cat <<'__DOLTCOMPILE__EOF__' >>doltcompile -"${args@<:@@@:>@}" >/dev/null 2>&1 -__DOLTCOMPILE__EOF__ - else - cat <<'__DOLTCOMPILE__EOF__' >>doltcompile -"${args@<:@@@:>@}" -__DOLTCOMPILE__EOF__ - fi - fi - -dnl Write out the code to write the .lo file. -dnl The second line of the .lo file must match "^# Generated by .*libtool" - cat <<'__DOLTCOMPILE__EOF__' >>doltcompile -{ -echo "# $lo - a libtool object file" -echo "# Generated by doltcompile, not libtool" -__DOLTCOMPILE__EOF__ - - if test x$enable_shared = xyes; then - cat <<'__DOLTCOMPILE__EOF__' >>doltcompile -echo "pic_object='$pic_object'" -__DOLTCOMPILE__EOF__ - else - cat <<'__DOLTCOMPILE__EOF__' >>doltcompile -echo pic_object=none -__DOLTCOMPILE__EOF__ - fi - - if test x$enable_static = xyes; then - cat <<'__DOLTCOMPILE__EOF__' >>doltcompile -echo "non_pic_object='$non_pic_object'" -__DOLTCOMPILE__EOF__ - else - cat <<'__DOLTCOMPILE__EOF__' >>doltcompile -echo non_pic_object=none -__DOLTCOMPILE__EOF__ - fi - - cat <<'__DOLTCOMPILE__EOF__' >>doltcompile -} > "$lo" -__DOLTCOMPILE__EOF__ - -dnl Done writing out doltcompile; substitute it for libtool compilation. - chmod +x doltcompile - LTCOMPILE='$(top_builddir)/doltcompile $(COMPILE)' - AC_SUBST(LTCOMPILE) - LTCXXCOMPILE='$(top_builddir)/doltcompile $(CXXCOMPILE)' - AC_SUBST(LTCXXCOMPILE) -# end dolt -]) diff --git a/meta/packages/libtool/libtool-2.2.6/prefix.patch b/meta/packages/libtool/libtool-2.2.6/prefix.patch deleted file mode 100644 index 639feb745..000000000 --- a/meta/packages/libtool/libtool-2.2.6/prefix.patch +++ /dev/null @@ -1,103 +0,0 @@ -Renames "libtool" -> "${TARGET_PREFIX}libtool" which makes sure -it can't be confused with the host libtool. - -Index: libtool-2.2.2/libltdl/m4/libtool.m4 -=================================================================== ---- libtool-2.2.2.orig/libltdl/m4/libtool.m4 2008-04-13 22:43:05.000000000 +0100 -+++ libtool-2.2.2/libltdl/m4/libtool.m4 2008-04-13 22:43:05.000000000 +0100 -@@ -89,7 +89,8 @@ - LIBTOOL_DEPS="$ltmain" - - # Always use our own libtool. --LIBTOOL='$(SHELL) $(top_builddir)/libtool' -+LIBTOOL='$(SHELL) $(top_builddir)' -+LIBTOOL="$LIBTOOL/$host_alias-libtool" - AC_SUBST(LIBTOOL)dnl - - _LT_SETUP -@@ -211,7 +212,7 @@ - no_glob_subst='s/\*/\\\*/g' - - # Global variables: --ofile=libtool -+ofile=${host_alias}-libtool - can_build_shared=yes - - # All known linkers require a `.a' archive for static linking (except MSVC, -Index: libtool-2.2.2/Makefile.am -=================================================================== ---- libtool-2.2.2.orig/Makefile.am 2008-04-01 19:06:08.000000000 +0100 -+++ libtool-2.2.2/Makefile.am 2008-04-13 22:49:17.000000000 +0100 -@@ -31,7 +31,7 @@ - DIST_SUBDIRS = . - EXTRA_DIST = - --BUILT_SOURCES = libtool -+BUILT_SOURCES = $(host_alias)-libtool - - CLEANFILES = - MOSTLYCLEANFILES = -@@ -64,7 +64,7 @@ - ## ---------------- ## - - # The libtool distributor and the standalone libtool script. --bin_SCRIPTS = libtoolize libtool -+bin_SCRIPTS = libtoolize $(host_alias)-libtool - - libtoolize: $(srcdir)/libtoolize.in $(top_builddir)/config.status - rm -f libtoolize.tmp libtoolize -@@ -90,8 +90,8 @@ - # We used to do this with a 'stamp-vcl' file, but non-gmake builds - # would rerun configure on every invocation, so now we manually - # check the version numbers from the build rule when necessary. --libtool: $(top_builddir)/config.status $(srcdir)/$(auxdir)/ltmain.sh ChangeLog -- @target=libtool; $(rebuild); \ -+$(host_alias)-libtool: $(top_builddir)/config.status $(srcdir)/$(auxdir)/ltmain.sh ChangeLog -+ @target=$(host_alias)-libtool; $(rebuild); \ - if test -f "$$target"; then \ - set dummy `./$$target --version | sed 1q`; actualver="$$5"; \ - test "$$actualver" = "$$correctver" && rebuild=false; \ -@@ -100,8 +100,8 @@ - case $$prereq in *ChangeLog);; *) rebuild=:;; esac; \ - done; \ - if $$rebuild; then \ -- echo $(SHELL) ./config.status $$target; \ -- cd $(top_builddir) && $(SHELL) ./config.status $$target; \ -+ echo $(SHELL) ./config.status libtool; \ -+ cd $(top_builddir) && $(SHELL) ./config.status libtool; \ - fi - - .PHONY: configure-subdirs -@@ -145,7 +145,7 @@ - ChangeLog.1999 ChangeLog.2000 ChangeLog.2001 \ - ChangeLog.2002 ChangeLog.2003 ChangeLog.2004 \ - ChangeLog.2005 ChangeLog.2006 ChangeLog.2007 --CLEANFILES += libtool libtoolize libtoolize.tmp \ -+CLEANFILES += $(host_alias)-libtool libtoolize libtoolize.tmp \ - $(auxdir)/ltmain.tmp $(m4dir)/ltversion.tmp - - ## We build ltversion.m4 here, instead of from config.status, -@@ -483,12 +483,12 @@ - - BUILDCHECK_ENVIRONMENT = _lt_pkgdatadir="$(abs_top_srcdir)" \ - LIBTOOLIZE="$(abs_top_builddir)/libtoolize" \ -- LIBTOOL="$(abs_top_builddir)/libtool" \ -+ LIBTOOL="$(abs_top_builddir)/$(host_alias)-libtool" \ - tst_aclocaldir="$(abs_top_srcdir)/libltdl/m4" - - INSTALLCHECK_ENVIRONMENT = \ - LIBTOOLIZE="$(bindir)/`echo libtoolize | sed '$(program_transform_name)'`" \ -- LIBTOOL="$(bindir)/`echo libtool | sed '$(program_transform_name)'`" \ -+ LIBTOOL="$(bindir)/`echo $(host_alias)-libtool | sed '$(program_transform_name)'`" \ - LTDLINCL="-I$(includedir)" \ - LIBLTDL="$(libdir)/libltdl.la" \ - tst_aclocaldir="$(aclocaldir)" -@@ -620,7 +620,7 @@ - TESTS += $(FC_TESTS) - endif - --tests/demo-conf.test: libtool -+tests/demo-conf.test: $(host_alias)-libtool - - EXTRA_DIST += $(srcdir)/tests/defs.in tests/defs.m4sh \ - $(COMMON_TESTS) $(CXX_TESTS) $(F77_TESTS) $(FC_TESTS) diff --git a/meta/packages/libtool/libtool-2.2.6/trailingslash.patch b/meta/packages/libtool/libtool-2.2.6/trailingslash.patch deleted file mode 100644 index b1956a613..000000000 --- a/meta/packages/libtool/libtool-2.2.6/trailingslash.patch +++ /dev/null @@ -1,24 +0,0 @@ -A command like /bin/sh ../../i586-poky-linux-libtool --mode=install /usr/bin/install -c gck-roots-store-standalone.la '/media/data1/builds/poky1/tmp/work/core2-poky-linux/gnome-keyring-2.26.1-r1/image/usr/lib/gnome-keyring/standalone/' fails (e.g. gnome-keyring or pulseaudio) - -This is because libdir has a trailing slash which breaks the comparision. - -RP 2/1/10 - -Index: libtool-2.2.6/libltdl/config/ltmain.m4sh -=================================================================== ---- libtool-2.2.6.orig/libltdl/config/ltmain.m4sh 2010-02-02 16:06:29.793905001 +0000 -+++ libtool-2.2.6/libltdl/config/ltmain.m4sh 2010-02-02 16:06:59.415155959 +0000 -@@ -1567,8 +1567,12 @@ - dir="$dir$objdir" - - if test -n "$relink_command"; then -+ # Strip any trailing slash from the destination. -+ func_stripname '' '/' "$libdir" -+ destlibdir=$func_stripname_result -+ - # Determine the prefix the user has applied to our future dir. -- inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"` -+ inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$destlibdir\$%%"` - - # Don't allow the user to place us outside of our expected - # location b/c this prevents finding dependent libraries that diff --git a/meta/packages/libtool/libtool-cross_2.2.10.bb b/meta/packages/libtool/libtool-cross_2.2.10.bb new file mode 100644 index 000000000..08b27f47b --- /dev/null +++ b/meta/packages/libtool/libtool-cross_2.2.10.bb @@ -0,0 +1,41 @@ +require libtool_${PV}.bb + +PR = "r0" +PACKAGES = "" +SRC_URI_append = " file://cross_compile.patch " + +DEPENDS += "libtool-native" + +DOLT_PATCH = "" +DOLT_PATCH_arm = " file://add_dolt.patch" +DOLT_PATCH_i586 = " file://add_dolt.patch" + +#SRC_URI_append_linux = "${DOLT_PATCH}" +#SRC_URI_append_linux-gnueabi = "${DOLT_PATCH}" + +do_configure_prepend () { + # Remove any existing libtool m4 since old stale versions would break + # any upgrade + rm -f ${STAGING_DATADIR}/aclocal/libtool.m4 + rm -f ${STAGING_DATADIR}/aclocal/lt*.m4 +} + +do_install () { + install -d ${D}${bindir}/ + install -m 0755 ${HOST_SYS}-libtool ${D}${bindir}/${HOST_SYS}-libtool + install -d ${D}${datadir}/libtool/ + install -d ${D}${datadir}/aclocal/ + install -c ${S}/libltdl/config/config.guess ${D}${datadir}/libtool/ + install -c ${S}/libltdl/config/config.sub ${D}${datadir}/libtool/ + install -c -m 0644 ${S}/libltdl/config/ltmain.sh ${D}${datadir}/libtool/ + install -c -m 0644 ${S}/libltdl/m4/libtool.m4 ${D}${datadir}/aclocal/ + install -c -m 0644 ${S}/libltdl/m4/ltdl.m4 ${D}${datadir}/aclocal/ + install -c -m 0644 ${WORKDIR}/dolt.m4 ${D}${datadir}/aclocal/ +} + +SYSROOT_PREPROCESS_FUNCS += "libtoolcross_sysroot_preprocess" + +libtoolcross_sysroot_preprocess () { + install -d ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}/ + install -m 755 ${D}${bindir}/${HOST_SYS}-libtool ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool +} diff --git a/meta/packages/libtool/libtool-cross_2.2.6.bb b/meta/packages/libtool/libtool-cross_2.2.6.bb deleted file mode 100644 index f08182461..000000000 --- a/meta/packages/libtool/libtool-cross_2.2.6.bb +++ /dev/null @@ -1,42 +0,0 @@ -require libtool_${PV}.bb - -PR = "r31" -PACKAGES = "" -SRC_URI_append = " file://cross_compile.patch;patch=1 \ - file://prefix.patch;patch=1" - -DEPENDS += "libtool-native" - -DOLT_PATCH = "" -DOLT_PATCH_arm = " file://add_dolt.patch;patch=1" -DOLT_PATCH_i586 = " file://add_dolt.patch;patch=1" - -#SRC_URI_append_linux = "${DOLT_PATCH}" -#SRC_URI_append_linux-gnueabi = "${DOLT_PATCH}" - -do_configure_prepend () { - # Remove any existing libtool m4 since old stale versions would break - # any upgrade - rm -f ${STAGING_DATADIR}/aclocal/libtool.m4 - rm -f ${STAGING_DATADIR}/aclocal/lt*.m4 -} - -do_install () { - install -d ${D}${bindir}/ - install -m 0755 ${HOST_SYS}-libtool ${D}${bindir}/${HOST_SYS}-libtool - install -d ${D}${datadir}/libtool/ - install -d ${D}${datadir}/aclocal/ - install -c ${S}/libltdl/config/config.guess ${D}${datadir}/libtool/ - install -c ${S}/libltdl/config/config.sub ${D}${datadir}/libtool/ - install -c -m 0644 ${S}/libltdl/config/ltmain.sh ${D}${datadir}/libtool/ - install -c -m 0644 ${S}/libltdl/m4/libtool.m4 ${D}${datadir}/aclocal/ - install -c -m 0644 ${S}/libltdl/m4/ltdl.m4 ${D}${datadir}/aclocal/ - install -c -m 0644 ${WORKDIR}/dolt.m4 ${D}${datadir}/aclocal/ -} - -SYSROOT_PREPROCESS_FUNCS += "libtoolcross_sysroot_preprocess" - -libtoolcross_sysroot_preprocess () { - install -d ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}/ - install -m 755 ${D}${bindir}/${HOST_SYS}-libtool ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool -} diff --git a/meta/packages/libtool/libtool-native_2.2.10.bb b/meta/packages/libtool/libtool-native_2.2.10.bb new file mode 100644 index 000000000..5af5d7b94 --- /dev/null +++ b/meta/packages/libtool/libtool-native_2.2.10.bb @@ -0,0 +1,21 @@ +require libtool_${PV}.bb + +DEPENDS = "" + +PR = "r0" +SRC_URI_append = " file://cross_compile.patch " + +inherit native + +do_configure_prepend () { + # Remove any existing libtool m4 since old stale versions would break + # any upgrade + rm -f ${STAGING_DATADIR}/aclocal/libtool.m4 + rm -f ${STAGING_DATADIR}/aclocal/lt*.m4 +} + +do_install () { + autotools_do_install + install -d ${D}${bindir}/ + install -m 0755 ${HOST_SYS}-libtool ${D}${bindir}/${HOST_SYS}-libtool +} diff --git a/meta/packages/libtool/libtool-native_2.2.6.bb b/meta/packages/libtool/libtool-native_2.2.6.bb deleted file mode 100644 index c5827ffb4..000000000 --- a/meta/packages/libtool/libtool-native_2.2.6.bb +++ /dev/null @@ -1,20 +0,0 @@ -require libtool_${PV}.bb - -PR = "r23" -SRC_URI_append = " file://cross_compile.patch;patch=1 \ - file://prefix.patch;patch=1" - -inherit native - -do_configure_prepend () { - # Remove any existing libtool m4 since old stale versions would break - # any upgrade - rm -f ${STAGING_DATADIR}/aclocal/libtool.m4 - rm -f ${STAGING_DATADIR}/aclocal/lt*.m4 -} - -do_install () { - autotools_do_install - install -d ${D}${bindir}/ - install -m 0755 ${HOST_SYS}-libtool ${D}${bindir}/${HOST_SYS}-libtool -} diff --git a/meta/packages/libtool/libtool-nativesdk_2.2.10.bb b/meta/packages/libtool/libtool-nativesdk_2.2.10.bb new file mode 100644 index 000000000..05444c7cc --- /dev/null +++ b/meta/packages/libtool/libtool-nativesdk_2.2.10.bb @@ -0,0 +1,26 @@ +require libtool_${PV}.bb + +PR = "r0" +SRC_URI_append = " file://cross_compile.patch" + +inherit nativesdk + +do_configure_prepend () { + # Remove any existing libtool m4 since old stale versions would break + # any upgrade + rm -f ${STAGING_DATADIR}/aclocal/libtool.m4 + rm -f ${STAGING_DATADIR}/aclocal/lt*.m4 +} + +do_install () { + autotools_do_install + install -d ${D}${bindir}/ + install -m 0755 libtool ${D}${bindir}/ +} + +SYSROOT_PREPROCESS_FUNCS += "libtoolnativesdk_sysroot_preprocess" + +libtoolnativesdk_sysroot_preprocess () { + install -d ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}/ + install -m 755 ${D}${bindir}/libtool ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool +} diff --git a/meta/packages/libtool/libtool-nativesdk_2.2.6.bb b/meta/packages/libtool/libtool-nativesdk_2.2.6.bb deleted file mode 100644 index 77acbd585..000000000 --- a/meta/packages/libtool/libtool-nativesdk_2.2.6.bb +++ /dev/null @@ -1,19 +0,0 @@ -require libtool_${PV}.bb - -PR = "r4" -SRC_URI_append = " file://cross_compile.patch;patch=1" - -inherit nativesdk - -do_install () { - autotools_do_install - install -d ${D}${bindir}/ - install -m 0755 libtool ${D}${bindir}/ -} - -SYSROOT_PREPROCESS_FUNCS += "libtoolnativesdk_sysroot_preprocess" - -libtoolnativesdk_sysroot_preprocess () { - install -d ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}/ - install -m 755 ${D}${bindir}/libtool ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool -} diff --git a/meta/packages/libtool/libtool.inc b/meta/packages/libtool/libtool.inc index db86d15ba..81c3eaf6d 100644 --- a/meta/packages/libtool/libtool.inc +++ b/meta/packages/libtool/libtool.inc @@ -3,6 +3,15 @@ This is GNU libtool, a generic library support script. Libtool hides \ the complexity of generating special library types (such as shared \ libraries) behind a consistent interface." HOMEPAGE = "http://www.gnu.org/software/libtool/libtool.html" -LICENSE = "GPL" SECTION = "devel" +LICENSE = "GPLv2, LGPLv2.1" +LIC_FILES_CHKSUM = " \ + file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ + file://libltdl/COPYING.LIB;md5=e3eda01d9815f8d24aae2dbd89b68b06 \ + " + +SRC_URI = "${GNU_MIRROR}/libtool/libtool-${PV}.tar.gz \ + file://trailingslash.patch \ + file://prefix.patch \ + file://dolt.m4 " diff --git a/meta/packages/libtool/libtool/add_dolt.patch b/meta/packages/libtool/libtool/add_dolt.patch new file mode 100644 index 000000000..2c5df9603 --- /dev/null +++ b/meta/packages/libtool/libtool/add_dolt.patch @@ -0,0 +1,12 @@ +Index: libtool-2.2.2/libltdl/m4/libtool.m4 +=================================================================== +--- libtool-2.2.2.orig/libltdl/m4/libtool.m4 2008-04-13 22:40:30.000000000 +0100 ++++ libtool-2.2.2/libltdl/m4/libtool.m4 2008-04-13 23:38:45.000000000 +0100 +@@ -97,6 +97,7 @@ + + # Only expand once: + m4_define([LT_INIT]) ++DOLT + ])# LT_INIT + + # Old names: diff --git a/meta/packages/libtool/libtool/cross_compile.patch b/meta/packages/libtool/libtool/cross_compile.patch new file mode 100644 index 000000000..fc1f4b6fb --- /dev/null +++ b/meta/packages/libtool/libtool/cross_compile.patch @@ -0,0 +1,55 @@ +Tweaks to make cross-compiling work combined and updated from various +older patches, some by Chris Larson. +Not upstreable in this form. + +RP - 01/05/2008 + +Index: libtool-2.2.10/libltdl/config/ltmain.m4sh +=================================================================== +--- libtool-2.2.10.orig/libltdl/config/ltmain.m4sh ++++ libtool-2.2.10/libltdl/config/ltmain.m4sh +@@ -5147,8 +5147,14 @@ func_mode_link () + absdir="$abs_ladir" + libdir="$abs_ladir" + else +- dir="$libdir" +- absdir="$libdir" ++ # Adding 'libdir' from the .la file to our library search paths ++ # breaks crosscompilation horribly. We cheat here and don't add ++ # it, instead adding the path where we found the .la. -CL ++ dir="$abs_ladir" ++ absdir="$abs_ladir" ++ libdir="$abs_ladir" ++ #dir="$libdir" ++ #absdir="$libdir" + fi + test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + else +@@ -5519,8 +5525,6 @@ func_mode_link () + add="$libdir/$linklib" + fi + else +- # We cannot seem to hardcode it, guess we'll fake it. +- add_dir="-L$libdir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in +@@ -5667,7 +5671,17 @@ func_mode_link () + fi + ;; + *) +- path="-L$absdir/$objdir" ++ # OE sets installed=no in staging. We need to look in $objdir and $absdir, ++ # preferring $objdir. RP 31/04/2008 ++ if test -f "$absdir/$objdir/$depdepl" ; then ++ depdepl="$absdir/$objdir/$depdepl" ++ path="-L$absdir/$objdir" ++ elif test -f "$absdir/$depdepl" ; then ++ depdepl="$absdir/$depdepl" ++ path="-L$absdir" ++ else ++ path="-L$absdir/$objdir" ++ fi + ;; + esac + else diff --git a/meta/packages/libtool/libtool/dolt.m4 b/meta/packages/libtool/libtool/dolt.m4 new file mode 100644 index 000000000..9bedecf27 --- /dev/null +++ b/meta/packages/libtool/libtool/dolt.m4 @@ -0,0 +1,129 @@ +dnl dolt, a replacement for libtool +dnl Copyright © 2007-2008 Josh Triplett +dnl Copying and distribution of this file, with or without modification, +dnl are permitted in any medium without royalty provided the copyright +dnl notice and this notice are preserved. +dnl +dnl To use dolt, invoke the DOLT macro immediately after the libtool macros. +dnl Optionally, copy this file into acinclude.m4, to avoid the need to have it +dnl installed when running autoconf on your project. + +AC_DEFUN([DOLT], [ +AC_REQUIRE([AC_CANONICAL_HOST]) +# dolt, a replacement for libtool +# Josh Triplett +AC_PATH_PROG(DOLT_BASH, bash) +AC_MSG_CHECKING([if dolt supports this host]) +dolt_supported=yes +if test x$DOLT_BASH = x; then + AC_MSG_ERROR([dolt: Bash not found, fatal error]) +fi +if test x$GCC != xyes; then + AC_MSG_ERROR([dolt: gcc not found, fatal error]) +fi +case $host in +i?86-*-linux*|x86_64-*-linux*|arm-*-linux*) ;; +*) AC_MSG_ERROR([dolt: incompatible host, fatal error]) ;; +esac +AC_MSG_RESULT([yes, replacing libtool]) + +dnl Start writing out doltcompile. + cat <<__DOLTCOMPILE__EOF__ >doltcompile +#!$DOLT_BASH +__DOLTCOMPILE__EOF__ + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +args=("$[]@") +for ((arg=0; arg<${#args@<:@@@:>@}; arg++)) ; do + if test x"${args@<:@$arg@:>@}" = x-o ; then + objarg=$((arg+1)) + break + fi +done +if test x$objarg = x ; then + echo 'Error: no -o on compiler command line' 1>&2 + exit 1 +fi +lo="${args@<:@$objarg@:>@}" +obj="${lo%.lo}" +if test x"$lo" = x"$obj" ; then + echo "Error: libtool object file name \"$lo\" does not end in .lo" 1>&2 + exit 1 +fi +objbase="${obj##*/}" +__DOLTCOMPILE__EOF__ + +dnl Write out shared compilation code. + if test x$enable_shared = xyes; then + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +libobjdir="${obj%$objbase}.libs" +if test ! -d "$libobjdir" ; then + mkdir "$libobjdir" + mkdir_ret=$? + if test "$mkdir_ret" -ne 0 && test ! -d "$libobjdir" ; then + exit $mkdir_ret + fi +fi +pic_object="$libobjdir/$objbase.o" +args@<:@$objarg@:>@="$pic_object" +"${args@<:@@@:>@}" -fPIC -DPIC +__DOLTCOMPILE__EOF__ + fi + +dnl Write out static compilation code. +dnl Avoid duplicate compiler output if also building shared objects. + if test x$enable_static = xyes; then + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +non_pic_object="$obj.o" +args@<:@$objarg@:>@="$non_pic_object" +__DOLTCOMPILE__EOF__ + if test x$enable_shared = xyes; then + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +"${args@<:@@@:>@}" >/dev/null 2>&1 +__DOLTCOMPILE__EOF__ + else + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +"${args@<:@@@:>@}" +__DOLTCOMPILE__EOF__ + fi + fi + +dnl Write out the code to write the .lo file. +dnl The second line of the .lo file must match "^# Generated by .*libtool" + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +{ +echo "# $lo - a libtool object file" +echo "# Generated by doltcompile, not libtool" +__DOLTCOMPILE__EOF__ + + if test x$enable_shared = xyes; then + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +echo "pic_object='$pic_object'" +__DOLTCOMPILE__EOF__ + else + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +echo pic_object=none +__DOLTCOMPILE__EOF__ + fi + + if test x$enable_static = xyes; then + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +echo "non_pic_object='$non_pic_object'" +__DOLTCOMPILE__EOF__ + else + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +echo non_pic_object=none +__DOLTCOMPILE__EOF__ + fi + + cat <<'__DOLTCOMPILE__EOF__' >>doltcompile +} > "$lo" +__DOLTCOMPILE__EOF__ + +dnl Done writing out doltcompile; substitute it for libtool compilation. + chmod +x doltcompile + LTCOMPILE='$(top_builddir)/doltcompile $(COMPILE)' + AC_SUBST(LTCOMPILE) + LTCXXCOMPILE='$(top_builddir)/doltcompile $(CXXCOMPILE)' + AC_SUBST(LTCXXCOMPILE) +# end dolt +]) diff --git a/meta/packages/libtool/libtool/prefix.patch b/meta/packages/libtool/libtool/prefix.patch new file mode 100644 index 000000000..895be1f9b --- /dev/null +++ b/meta/packages/libtool/libtool/prefix.patch @@ -0,0 +1,121 @@ +Renames "libtool" -> "${TARGET_PREFIX}libtool" which makes sure +it can't be confused with the host libtool. + + +After discussions with RP Changed host_alias to build_alias +at one place as it was causing man page building issue while +cross compiling for different architectures. + +Date: 2010/06/28 +Signed-Off-By: Nitin A Kamble + + +Index: libtool-2.2.10/libltdl/m4/libtool.m4 +=================================================================== +--- libtool-2.2.10.orig/libltdl/m4/libtool.m4 ++++ libtool-2.2.10/libltdl/m4/libtool.m4 +@@ -94,7 +94,8 @@ _LT_SET_OPTIONS([$0], [$1]) + LIBTOOL_DEPS="$ltmain" + + # Always use our own libtool. +-LIBTOOL='$(SHELL) $(top_builddir)/libtool' ++LIBTOOL='$(SHELL) $(top_builddir)' ++LIBTOOL="$LIBTOOL/${host_alias}-libtool" + AC_SUBST(LIBTOOL)dnl + + _LT_SETUP +@@ -201,7 +202,7 @@ aix3*) + esac + + # Global variables: +-ofile=libtool ++ofile=${host_alias}-libtool + can_build_shared=yes + + # All known linkers require a `.a' archive for static linking (except MSVC, +Index: libtool-2.2.10/Makefile.am +=================================================================== +--- libtool-2.2.10.orig/Makefile.am ++++ libtool-2.2.10/Makefile.am +@@ -31,7 +31,7 @@ AM_LDFLAGS = + DIST_SUBDIRS = . + EXTRA_DIST = + +-BUILT_SOURCES = libtool libtoolize ++BUILT_SOURCES = $(host_alias)-libtool libtoolize + + CLEANFILES = + MOSTLYCLEANFILES = +@@ -65,7 +65,7 @@ rebuild = rebuild=:; $(timestamp); corre + ## ---------------- ## + + # The libtool distributor and the standalone libtool script. +-bin_SCRIPTS = libtoolize libtool ++bin_SCRIPTS = libtoolize $(host_alias)-libtool + + libtoolize: $(srcdir)/libtoolize.in $(top_builddir)/config.status + rm -f libtoolize.tmp libtoolize +@@ -91,8 +91,8 @@ $(srcdir)/libtoolize.in: $(sh_files) lib + # We used to do this with a 'stamp-vcl' file, but non-gmake builds + # would rerun configure on every invocation, so now we manually + # check the version numbers from the build rule when necessary. +-libtool: $(top_builddir)/config.status $(srcdir)/$(auxdir)/ltmain.sh ChangeLog +- @target=libtool; $(rebuild); \ ++$(host_alias)-libtool: $(top_builddir)/config.status $(srcdir)/$(auxdir)/ltmain.sh ChangeLog ++ @target=$(host_alias)-libtool; $(rebuild); \ + if test -f "$$target"; then \ + set dummy `./$$target --version | sed 1q`; actualver="$$5"; \ + test "$$actualver" = "$$correctver" && rebuild=false; \ +@@ -101,8 +101,8 @@ libtool: $(top_builddir)/config.status $ + case $$prereq in *ChangeLog);; *) rebuild=:;; esac; \ + done; \ + if $$rebuild; then \ +- echo $(SHELL) ./config.status $$target; \ +- cd $(top_builddir) && $(SHELL) ./config.status $$target; \ ++ echo $(SHELL) ./config.status libtool; \ ++ cd $(top_builddir) && $(SHELL) ./config.status libtool; \ + fi + + .PHONY: configure-subdirs +@@ -147,7 +147,7 @@ EXTRA_DIST += bootstrap $(srcdir)/li + ChangeLog.2002 ChangeLog.2003 ChangeLog.2004 \ + ChangeLog.2005 ChangeLog.2006 ChangeLog.2007 \ + ChangeLog.2008 ChangeLog.2009 +-CLEANFILES += libtool libtoolize libtoolize.tmp \ ++CLEANFILES += $(host_alias)-libtool libtoolize libtoolize.tmp \ + $(auxdir)/ltmain.tmp $(m4dir)/ltversion.tmp + + ## We build ltversion.m4 here, instead of from config.status, +@@ -337,7 +337,7 @@ update_mans = \ + PATH=.$(PATH_SEPARATOR)$$PATH; export PATH; \ + $(HELP2MAN) --output=$@ + $(srcdir)/doc/libtool.1: $(srcdir)/$(auxdir)/ltmain.sh +- $(update_mans) --help-option=--help-all libtool ++ $(update_mans) --help-option=--help-all ${build_alias}-libtool + $(srcdir)/doc/libtoolize.1: $(srcdir)/libtoolize.in + $(update_mans) libtoolize + +@@ -523,12 +523,12 @@ TESTS_ENVIRONMENT = MAKE="$(MAKE)" CC="$ + + BUILDCHECK_ENVIRONMENT = _lt_pkgdatadir="$(abs_top_srcdir)" \ + LIBTOOLIZE="$(abs_top_builddir)/libtoolize" \ +- LIBTOOL="$(abs_top_builddir)/libtool" \ ++ LIBTOOL="$(abs_top_builddir)/$(host_alias)-libtool" \ + tst_aclocaldir="$(abs_top_srcdir)/libltdl/m4" + + INSTALLCHECK_ENVIRONMENT = \ + LIBTOOLIZE="$(bindir)/`echo libtoolize | sed '$(program_transform_name)'`" \ +- LIBTOOL="$(bindir)/`echo libtool | sed '$(program_transform_name)'`" \ ++ LIBTOOL="$(bindir)/`echo $(host_alias)-libtool | sed '$(program_transform_name)'`" \ + LTDLINCL="-I$(includedir)" \ + LIBLTDL="$(libdir)/libltdl.la" \ + tst_aclocaldir="$(aclocaldir)" +@@ -679,7 +679,7 @@ if HAVE_FC + TESTS += $(FC_TESTS) + endif + +-tests/demo-conf.test: libtool ++tests/demo-conf.test: $(host_alias)-libtool + + EXTRA_DIST += $(srcdir)/tests/defs.in tests/defs.m4sh \ + $(COMMON_TESTS) $(CXX_TESTS) $(F77_TESTS) $(FC_TESTS) diff --git a/meta/packages/libtool/libtool/trailingslash.patch b/meta/packages/libtool/libtool/trailingslash.patch new file mode 100644 index 000000000..f51c06406 --- /dev/null +++ b/meta/packages/libtool/libtool/trailingslash.patch @@ -0,0 +1,24 @@ +A command like /bin/sh ../../i586-poky-linux-libtool --mode=install /usr/bin/install -c gck-roots-store-standalone.la '/media/data1/builds/poky1/tmp/work/core2-poky-linux/gnome-keyring-2.26.1-r1/image/usr/lib/gnome-keyring/standalone/' fails (e.g. gnome-keyring or pulseaudio) + +This is because libdir has a trailing slash which breaks the comparision. + +RP 2/1/10 + +Index: libtool-2.2.10/libltdl/config/ltmain.m4sh +=================================================================== +--- libtool-2.2.10.orig/libltdl/config/ltmain.m4sh ++++ libtool-2.2.10/libltdl/config/ltmain.m4sh +@@ -1634,8 +1634,12 @@ func_mode_install () + dir="$dir$objdir" + + if test -n "$relink_command"; then ++ # Strip any trailing slash from the destination. ++ func_stripname '' '/' "$libdir" ++ destlibdir=$func_stripname_result ++ + # Determine the prefix the user has applied to our future dir. +- inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` ++ inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$destlibdir\$%%"` + + # Don't allow the user to place us outside of our expected + # location b/c this prevents finding dependent libraries that diff --git a/meta/packages/libtool/libtool_2.2.10.bb b/meta/packages/libtool/libtool_2.2.10.bb new file mode 100644 index 000000000..cca3b1ea4 --- /dev/null +++ b/meta/packages/libtool/libtool_2.2.10.bb @@ -0,0 +1,33 @@ +require libtool.inc +DEPENDS = "libtool-native" + +PR = "r0" + +PACKAGES =+ "libltdl libltdl-dev libltdl-dbg" +FILES_${PN} += "${datadir}/aclocal*" +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_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 +} diff --git a/meta/packages/libtool/libtool_2.2.6.bb b/meta/packages/libtool/libtool_2.2.6.bb deleted file mode 100644 index e5deac7c4..000000000 --- a/meta/packages/libtool/libtool_2.2.6.bb +++ /dev/null @@ -1,36 +0,0 @@ -require libtool.inc - -PR = "r21" - -SRC_URI = "${GNU_MIRROR}/libtool/libtool-${PV}a.tar.gz \ - file://trailingslash.patch;patch=1 \ - file://dolt.m4" - -PACKAGES =+ "libltdl libltdl-dev libltdl-dbg" -FILES_${PN} += "${datadir}/aclocal*" -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_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 -} -- cgit v1.2.3