diff options
author | Martin Schlemmer <azarah@gentoo.org> | 2005-09-02 21:12:09 +0000 |
---|---|---|
committer | Martin Schlemmer <azarah@gentoo.org> | 2005-09-02 21:12:09 +0000 |
commit | 0530ba9b90181b602c9c75b1b074f5025036ccf8 (patch) | |
tree | ef64a1c5481e5f4ba9b487c52824c2e22b20dba6 /eclass | |
parent | Marked 0.7.0-r1 stable on amd64. Removed old ebuilds. (diff) | |
download | historical-0530ba9b90181b602c9c75b1b074f5025036ccf8.tar.gz historical-0530ba9b90181b602c9c75b1b074f5025036ccf8.tar.bz2 historical-0530ba9b90181b602c9c75b1b074f5025036ccf8.zip |
Merge uclibctoolize() stuff with elibtoolize(), and add required
patches to make elibtoolize not bork on portage patch failing.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/ELT-patches/portage/1.2.0 | 13 | ||||
-rw-r--r-- | eclass/ELT-patches/portage/1.3.0c | 66 | ||||
-rw-r--r-- | eclass/ELT-patches/uclibc-conf/1.2.0 | 48 | ||||
-rw-r--r-- | eclass/ELT-patches/uclibc-conf/1.3.0c | 48 | ||||
-rw-r--r-- | eclass/ELT-patches/uclibc-ltconf/1.2.0 | 36 | ||||
-rw-r--r-- | eclass/ELT-patches/uclibc-ltconf/1.3.0 | 39 | ||||
-rw-r--r-- | eclass/libtool.eclass | 74 |
7 files changed, 284 insertions, 40 deletions
diff --git a/eclass/ELT-patches/portage/1.2.0 b/eclass/ELT-patches/portage/1.2.0 new file mode 100644 index 000000000000..0d0102d8c73c --- /dev/null +++ b/eclass/ELT-patches/portage/1.2.0 @@ -0,0 +1,13 @@ +# Dummy patch, not needed by libtool-1.2 + +--- ltmain.sh 2005-09-02 21:42:18.000000000 +0200 ++++ ltmain.sh 2005-09-02 21:42:34.000000000 +0200 +@@ -29,7 +29,7 @@ + + # Constants. + PROGRAM=ltmain.sh +-PACKAGE=libtool ++PACKAGE=libtool + VERSION=1.2 + + default_mode= diff --git a/eclass/ELT-patches/portage/1.3.0c b/eclass/ELT-patches/portage/1.3.0c new file mode 100644 index 000000000000..d2166f13a841 --- /dev/null +++ b/eclass/ELT-patches/portage/1.3.0c @@ -0,0 +1,66 @@ +--- ltmain.sh 2005-09-02 22:19:17.000000000 +0200 ++++ ltmain.sh 2005-09-02 22:20:55.000000000 +0200 +@@ -3769,9 +3769,50 @@ + $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 + exit 1 + fi +- newdependency_libs="$newdependency_libs $libdir/$name" ++ # We do not want portage's install root ($D) present. Check only for ++ # this if the .la is being installed. ++ if test "$installed" = yes && test "$D"; then ++ eval mynewdependency_lib=`echo "$libdir/$name" |sed -e "s:$D:/:g" -e 's:/\+:/:g'` ++ else ++ mynewdependency_lib="$libdir/$name" ++ fi ++ # Do not add duplicates ++ if test "$mynewdependency_lib"; then ++ my_little_ninja_foo_1=`echo $newdependency_libs |$EGREP -e "$mynewdependency_lib"` ++ if test -z "$my_little_ninja_foo_1"; then ++ newdependency_libs="$newdependency_libs $mynewdependency_lib" ++ fi ++ fi ++ ;; ++ *) ++ if test "$installed" = yes; then ++ # Rather use S=WORKDIR if our version of portage supports it. ++ # This is because some ebuild (gcc) do not use $S as buildroot. ++ if test "$PWORKDIR"; then ++ S="$PWORKDIR" ++ fi ++ # We do not want portage's build root ($S) present. ++ my_little_ninja_foo_2=`echo $deplib |$EGREP -e "$S"` ++ if test -n "$my_little_ninja_foo_2" && test "$S"; then ++ mynewdependency_lib="" ++ # We do not want portage's install root ($D) present. ++ my_little_ninja_foo_3=`echo $deplib |$EGREP -e "$D"` ++ elif test -n "$my_little_ninja_foo_3" && test "$D"; then ++ eval mynewdependency_lib=`echo "$deplib" |sed -e "s:$D:/:g" -e 's:/\+:/:g'` ++ else ++ mynewdependency_lib="$deplib" ++ fi ++ else ++ mynewdependency_lib="$deplib" ++ fi ++ # Do not add duplicates ++ if test "$mynewdependency_lib"; then ++ my_little_ninja_foo_4=`echo $newdependency_libs |$EGREP -e "$mynewdependency_lib"` ++ if test -z "$my_little_ninja_foo_4"; then ++ newdependency_libs="$newdependency_libs $mynewdependency_lib" ++ fi ++ fi + ;; +- *) newdependency_libs="$newdependency_libs $deplib" ;; + esac + done + dependency_libs="$newdependency_libs" +@@ -3799,6 +3840,10 @@ + dlprefiles="$newdlprefiles" + fi + $rm $output ++ # Do not add duplicates ++ if test "$installed" = yes && test "$D"; then ++ install_libdir=`echo "$install_libdir" |sed -e "s:$D:/:g" -e 's:/\+:/:g'` ++ fi + $echo > $output "\ + # $outputname - a libtool library file + # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP diff --git a/eclass/ELT-patches/uclibc-conf/1.2.0 b/eclass/ELT-patches/uclibc-conf/1.2.0 new file mode 100644 index 000000000000..acd804c8f404 --- /dev/null +++ b/eclass/ELT-patches/uclibc-conf/1.2.0 @@ -0,0 +1,48 @@ +--- configure.libltdl~ Fri Jun 11 08:54:04 2004 ++++ configure Fri Jun 11 08:56:33 2004 +@@ -1978,6 +1978,11 @@ + lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` + ;; + ++linux-uclibc*) ++ lt_cv_deplibs_check_method=pass_all ++ lt_cv_file_magic_test_file=`echo /lib/libuClibc*.so` ++ ;; ++ + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' +@@ -3030,7 +3035,7 @@ + + # Transform linux* to *-*-linux-gnu*, to support old configure scripts. + case $host_os in +-linux-gnu*) ;; ++linux-gnu*|linux-uclibc*) ;; + linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` + esac + +@@ -4504,6 +4509,24 @@ + dynamic_linker='GNU/Linux ld.so' + ;; + ++linux-uclibc*) ++ version_type=linux ++ need_lib_prefix=no ++ need_version=no ++ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' ++ soname_spec='${libname}${release}.so$major' ++ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' ++ shlibpath_var=LD_LIBRARY_PATH ++ shlibpath_overrides_runpath=no ++ # This implies no fast_install, which is unacceptable. ++ # Some rework will be needed to allow for fast_install ++ # before this can be enabled. ++ # Note: copied from linux-gnu, and may not be appropriate. ++ hardcode_into_libs=yes ++ # Assume using the uClibc dynamic linker. ++ dynamic_linker="uClibc ld.so" ++ ;; ++ + netbsd*) + version_type=sunos + need_lib_prefix=no diff --git a/eclass/ELT-patches/uclibc-conf/1.3.0c b/eclass/ELT-patches/uclibc-conf/1.3.0c new file mode 100644 index 000000000000..03efc5dc9c86 --- /dev/null +++ b/eclass/ELT-patches/uclibc-conf/1.3.0c @@ -0,0 +1,48 @@ +--- configure.libltdl~ Fri Jun 11 08:54:04 2004 ++++ configure Fri Jun 11 08:56:33 2004 +@@ -1978,6 +1978,11 @@ + lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` + ;; + ++linux-uclibc*) ++ lt_cv_deplibs_check_method=pass_all ++ lt_cv_file_magic_test_file=`echo /lib/libuClibc*.so` ++ ;; ++ + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' +@@ -3030,7 +3035,7 @@ + + # Transform linux* to *-*-linux-gnu*, to support old configure scripts. + case "$host_os" in +-linux-gnu*) ;; ++linux-gnu*|linux-uclibc*) ;; + linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` + esac + +@@ -4504,6 +4509,24 @@ + dynamic_linker='GNU/Linux ld.so' + ;; + ++linux-uclibc*) ++ version_type=linux ++ need_lib_prefix=no ++ need_version=no ++ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' ++ soname_spec='${libname}${release}.so$major' ++ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' ++ shlibpath_var=LD_LIBRARY_PATH ++ shlibpath_overrides_runpath=no ++ # This implies no fast_install, which is unacceptable. ++ # Some rework will be needed to allow for fast_install ++ # before this can be enabled. ++ # Note: copied from linux-gnu, and may not be appropriate. ++ hardcode_into_libs=yes ++ # Assume using the uClibc dynamic linker. ++ dynamic_linker="uClibc ld.so" ++ ;; ++ + netbsd*) + version_type=sunos + need_lib_prefix=no diff --git a/eclass/ELT-patches/uclibc-ltconf/1.2.0 b/eclass/ELT-patches/uclibc-ltconf/1.2.0 new file mode 100644 index 000000000000..bbc6bc96571b --- /dev/null +++ b/eclass/ELT-patches/uclibc-ltconf/1.2.0 @@ -0,0 +1,36 @@ +--- ltconfig.uclibc 2004-01-14 22:07:42.000000000 +0100 ++++ ltconfig 2004-03-10 15:43:37.000000000 +0100 +@@ -603,6 +603,7 @@ + # Transform linux* to *-*-linux-gnu*, to support old configure scripts. + case $host_os in + linux-gnu*) ;; ++linux-uclibc*) ;; + linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` + esac + +@@ -1259,6 +1260,25 @@ + fi + ;; + ++linux-uclibc*) ++ version_type=linux ++ need_lib_prefix=no ++ need_version=no ++ library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so' ++ soname_spec='${libname}${release}.so.$major' ++ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' ++ shlibpath_var=LD_LIBRARY_PATH ++ shlibpath_overrides_runpath=no ++ deplibs_check_method=pass_all ++ # This implies no fast_install, which is unacceptable. ++ # Some rework will be needed to allow for fast_install ++ # before this can be enabled. ++ # Note: copied from linux-gnu, and may not be appropriate. ++ hardcode_into_libs=yes ++ # Assume using the uClibc dynamic linker. ++ dynamic_linker="uClibc ld.so" ++ ;; ++ + netbsd* | openbsd*) + version_type=sunos + library_names_spec='${libname}${release}.so.$versuffix' diff --git a/eclass/ELT-patches/uclibc-ltconf/1.3.0 b/eclass/ELT-patches/uclibc-ltconf/1.3.0 new file mode 100644 index 000000000000..0a5a9ead8f0c --- /dev/null +++ b/eclass/ELT-patches/uclibc-ltconf/1.3.0 @@ -0,0 +1,39 @@ +--- ltconfig.uclibc 2004-01-14 22:07:42.000000000 +0100 ++++ ltconfig 2004-03-10 15:43:37.000000000 +0100 +@@ -603,6 +603,7 @@ + # Transform linux* to *-*-linux-gnu*, to support old configure scripts. + case $host_os in + linux-gnu*) ;; ++linux-uclibc*) ;; + linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` + esac + +@@ -1259,6 +1260,28 @@ + dynamic_linker='GNU/Linux ld.so' + ;; + ++linux-uclibc*) ++ version_type=linux ++ need_lib_prefix=no ++ need_version=no ++ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' ++ soname_spec='${libname}${release}.so$major' ++ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' ++ shlibpath_var=LD_LIBRARY_PATH ++ shlibpath_overrides_runpath=no ++ # deplibs_check_method=pass_all ++ deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ++ file_magic_cmd=/usr/bin/file ++ file_magic_test_file=`echo /lib/libuClibc-*.so` ++ # This implies no fast_install, which is unacceptable. ++ # Some rework will be needed to allow for fast_install ++ # before this can be enabled. ++ # Note: copied from linux-gnu, and may not be appropriate. ++ hardcode_into_libs=yes ++ # Assume using the uClibc dynamic linker. ++ dynamic_linker="uClibc ld.so" ++ ;; ++ + netbsd*) + need_lib_prefix=no + need_version=no diff --git a/eclass/libtool.eclass b/eclass/libtool.eclass index aa7c86fec026..f924016db544 100644 --- a/eclass/libtool.eclass +++ b/eclass/libtool.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/libtool.eclass,v 1.52 2005/09/02 10:02:50 azarah Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/libtool.eclass,v 1.53 2005/09/02 21:12:09 azarah Exp $ # # Author: Martin Schlemmer <azarah@gentoo.org> # @@ -22,6 +22,7 @@ ELIBTOOL_VERSION="2.0.2" ELT_PATCH_DIR="${PORTDIR}/eclass/ELT-patches" ELT_APPLIED_PATCHES= +ELT_LTMAIN_SH= # # Returns all the directories containing ltmain.sh @@ -66,7 +67,11 @@ ELT_walk_patches() { local y= local ret=1 local patch_dir= - local version=$(eval $(grep -e '^[[:space:]]*VERSION=' $1); \ + local version= + local ltmain_sh=$1 + + [[ $1 == *"/configure" ]] && ltmain_sh=${ELT_LTMAIN_SH} + version=$(eval $(grep -e '^[[:space:]]*VERSION=' "${ltmain_sh}"); \ echo "${VERSION}") if [[ -n $2 ]] ; then @@ -118,7 +123,8 @@ elibtoolize() { local do_only_patches="no" local deptoremove= local my_dirlist= - local elt_patches="portage relink max_cmd_len sed test tmp" + local elt_patches="portage relink max_cmd_len sed test tmp \ + uclibc-conf uclibc-ltconf" local start_dir="${PWD}" my_dirlist="$(ELT_find_ltmain_sh)" @@ -176,6 +182,7 @@ elibtoolize() { for x in ${my_dirlist} ; do local tmp=$(echo "${x}" | sed -e "s|${WORKDIR}||") export ELT_APPLIED_PATCHES= + export ELT_LTMAIN_SH="${x}/ltmain.sh" [[ -f ${x}/.elibtoolized ]] && continue @@ -204,6 +211,24 @@ elibtoolize() { ret=$? fi ;; + "uclibc-conf") + if [[ -e ${x}/configure ]] && \ + grep 'Transform linux' "${x}/configure" > /dev/null ; then + ELT_walk_patches "${x}/configure" "${y}" + ret=$? + # ltmain.sh and co might be in a subdirectory ... + elif [[ ! -e ${x}/configure && -e ${x}/../configure ]] && \ + grep 'Transform linux' "${x}/../configure" > /dev/null ; then + ELT_walk_patches "${x}/../configure" "${y}" + ret=$? + fi + ;; + "uclibc-ltconf") + if [[ -e ${x}/ltconfig ]] ; then + ELT_walk_patches "${x}/ltconfig" "${y}" + ret=$? + fi + ;; *) ELT_walk_patches "${x}/ltmain.sh" "${y}" ret=$? @@ -246,6 +271,10 @@ elibtoolize() { ELT_APPLIED_PATCHES="portage" fi ;; + "uclibc-"*) + [[ ${CHOST} == *"-uclibc" ]] && \ + ewarn " uClibc patch set '${y}' failed to apply!" + ;; esac fi done @@ -281,46 +310,11 @@ elibtoolize() { done cd "${start_dir}" - - uclibctoolize } uclibctoolize() { - [[ -n ${NO_UCLIBCTOOLIZE} ]] && return 0 - - local errmsg="" - [[ ${CTARGET:-${CHOST}} == *-uclibc ]] \ - && errmsg="PLEASE CHECK" \ - || errmsg="Already patched" - local targets="" - local x - - if [[ -z $* ]] ; then - targets=$(find ${S} -name configure -o -name ltconfig) - fi - - einfo "Applying uClibc/libtool patches ..." - for x in ${targets} ; do - [[ ! -s ${x} ]] && continue - case ${x##*/} in - configure) - if grep 'Transform linux' "${x}" > /dev/null ; then - ebegin " Fixing \${S}${x/${S}}" - patch -p0 "${x}" "${ELT_PATCH_DIR}/uclibc/configure.patch" > /dev/null - eend $? "${errmsg} ${x}" - fi - ;; - - ltconfig) - local ver=$(grep '^VERSION=' ${x}) - ver=${ver/VERSION=} - [[ ${ver:0:3} == "1.4" ]] && ver="1.3" # 1.4 and 1.3 are compat - ebegin " Fixing \${S}${x/${S}}" - patch -p0 "${x}" "${ELT_PATCH_DIR}/uclibc/ltconfig-${ver:0:3}.patch" > /dev/null - eend $? "${errmsg} ${x}" - ;; - esac - done + ewarn "uclibctoolize() is depreciated, please just use libtoolize()!" + elibtoolize } darwintoolize() { |