commit:     754124d7de028fc8c203cf4940b9bcad7e59f5a9
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 23 15:09:49 2017 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Thu Mar 23 15:10:02 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=754124d7

sys-devel/libtool: add Prefix keywords and patches

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 .../libtool/files/libtool-2.2.10-eprefix.patch     | 11 +++++
 .../libtool-2.2.6a-darwin-module-bundle.patch      | 24 +++++++++++
 .../libtool-2.4.6-darwin-use-linux-version.patch   | 13 ++++++
 sys-devel/libtool/files/libtool-2.4.6-mint.patch   | 49 ++++++++++++++++++++++
 ...libtool-9999.ebuild => libtool-2.4.6-r4.ebuild} | 37 +++++++++++++---
 sys-devel/libtool/libtool-9999.ebuild              | 24 +++++++++--
 6 files changed, 148 insertions(+), 10 deletions(-)

diff --git a/sys-devel/libtool/files/libtool-2.2.10-eprefix.patch 
b/sys-devel/libtool/files/libtool-2.2.10-eprefix.patch
new file mode 100644
index 00000000000..5a2980d2979
--- /dev/null
+++ b/sys-devel/libtool/files/libtool-2.2.10-eprefix.patch
@@ -0,0 +1,11 @@
+--- ./libltdl/m4/libtool.m4.orig       2010-07-02 12:41:07.000000000 +0200
++++ ./libltdl/m4/libtool.m4    2010-07-02 12:45:39.000000000 +0200
+@@ -2087,7 +2087,7 @@
+     mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
+       $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
+   esac
+-  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
++  sys_lib_search_path_spec=`$ECHO "@GENTOO_PORTAGE_EPREFIX@/lib 
@GENTOO_PORTAGE_EPREFIX@/usr/lib $lt_search_path_spec" | $lt_NL2SP`
+ else
+   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+ fi])

diff --git a/sys-devel/libtool/files/libtool-2.2.6a-darwin-module-bundle.patch 
b/sys-devel/libtool/files/libtool-2.2.6a-darwin-module-bundle.patch
new file mode 100644
index 00000000000..c6b63ed3276
--- /dev/null
+++ b/sys-devel/libtool/files/libtool-2.2.6a-darwin-module-bundle.patch
@@ -0,0 +1,24 @@
+In Gentoo Prefix we go by Apple's convention to give modules the .bundle
+extension.
+http://developer.apple.com/documentation/DeveloperTools/Conceptual/XcodeBuildSystem/500-Linking/bs_linking.html
+(Above link was removed by Apple, the link below contains a copy:
+http://disanji.net/iOS_Doc/#documentation/DeveloperTools/Conceptual/XcodeBuildSystem/500-Linking/bs_linking.html,
+in case it disappears also, the relevant quote:
+
+Bundle. Bundles are executable files that can be loaded at runtime by
+other products. Plug-ins are implemented using bundles. The term bundle
+in this context refers to the binary itself, not to a structured
+hierarchy. Bundles have the .bundle extension; for example,
+MyBundle.bundle.)
+
+--- libltdl/m4/libtool.m4
++++ libltdl/m4/libtool.m4
+@@ -2271,7 +2271,7 @@
+   soname_spec='${libname}${release}${major}$shared_ext'
+   shlibpath_overrides_runpath=yes
+   shlibpath_var=DYLD_LIBRARY_PATH
+-  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
++  shrext_cmds='`test .$module = .yes && echo .bundle || echo .dylib`'
+ m4_if([$1], [],[
+   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
+   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'

diff --git 
a/sys-devel/libtool/files/libtool-2.4.6-darwin-use-linux-version.patch 
b/sys-devel/libtool/files/libtool-2.4.6-darwin-use-linux-version.patch
new file mode 100644
index 00000000000..b4409815f8b
--- /dev/null
+++ b/sys-devel/libtool/files/libtool-2.4.6-darwin-use-linux-version.patch
@@ -0,0 +1,13 @@
+* revert old 1.5 behaviour
+
+--- libtool-2.4.6/m4/libtool.m4
++++ libtool-2.4.6/m4/libtool.m4
+@@ -2272,7 +2272,7 @@
+   version_type=darwin
+   need_lib_prefix=no
+   need_version=no
+-  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
++  library_names_spec='$libname$release$versuffix$shared_ext 
$libname$release$major$shared_ext $libname$shared_ext'
+   soname_spec='$libname$release$major$shared_ext'
+   shlibpath_overrides_runpath=yes
+   shlibpath_var=DYLD_LIBRARY_PATH

diff --git a/sys-devel/libtool/files/libtool-2.4.6-mint.patch 
b/sys-devel/libtool/files/libtool-2.4.6-mint.patch
new file mode 100644
index 00000000000..341a0f02ef1
--- /dev/null
+++ b/sys-devel/libtool/files/libtool-2.4.6-mint.patch
@@ -0,0 +1,49 @@
+Patch by Alan Hourihane
+
+http://bugs.gentoo.org/show_bug.cgi?id=266984
+
+diff -ur libtool-2.2.6/configure libtool-2.2.6-mint/configure
+--- libtool-2.2.6/configure    2008-09-07 17:52:50.000000000 +0000
++++ libtool-2.2.6/configure    2009-04-21 08:49:27.000000000 +0000
+@@ -4986,6 +4986,11 @@
+     lt_cv_sys_max_cmd_len=8192;
+     ;;
+ 
++  mint*)
++    # On MiNT this can take a long time and run out of memory.
++    lt_cv_sys_max_cmd_len=8192;
++    ;;
++
+   amigaos*)
+     # On AmigaOS with pdksh, this test takes hours, literally.
+     # So we just punt and use a minimum line length of 8192.
+diff -ur libtool-2.2.6/libltdl/configure libtool-2.2.6-mint/libltdl/configure
+--- libtool-2.2.6/libltdl/configure    2008-09-07 17:53:05.000000000 +0000
++++ libtool-2.2.6/libltdl/configure    2009-04-21 08:50:08.000000000 +0000
+@@ -4422,6 +4422,11 @@
+     lt_cv_sys_max_cmd_len=8192;
+     ;;
+ 
++  mint*)
++    # On MiNT this can take a long time and run out of memory.
++    lt_cv_sys_max_cmd_len=8192;
++    ;;
++
+   amigaos*)
+     # On AmigaOS with pdksh, this test takes hours, literally.
+     # So we just punt and use a minimum line length of 8192.
+diff -ur libtool-2.2.6/libltdl/m4/libtool.m4 
libtool-2.2.6-mint/libltdl/m4/libtool.m4
+--- libtool-2.2.6/m4/libtool.m4        2008-09-05 11:54:41.000000000 +0000
++++ libtool-2.2.6/m4/libtool.m4        2009-04-21 08:50:26.000000000 +0000
+@@ -1527,6 +1527,11 @@
+     lt_cv_sys_max_cmd_len=8192;
+     ;;
+ 
++  mint*)
++    # On MiNT this can take a long time and run out of memory.
++    lt_cv_sys_max_cmd_len=8192;
++    ;;
++
+   amigaos*)
+     # On AmigaOS with pdksh, this test takes hours, literally.
+     # So we just punt and use a minimum line length of 8192.

diff --git a/sys-devel/libtool/libtool-9999.ebuild 
b/sys-devel/libtool/libtool-2.4.6-r4.ebuild
similarity index 56%
copy from sys-devel/libtool/libtool-9999.ebuild
copy to sys-devel/libtool/libtool-2.4.6-r4.ebuild
index 22a5d3c1043..5f8b2ec4d17 100644
--- a/sys-devel/libtool/libtool-9999.ebuild
+++ b/sys-devel/libtool/libtool-2.4.6-r4.ebuild
@@ -5,15 +5,15 @@ EAPI="5"
 
 LIBTOOLIZE="true" #225559
 WANT_LIBTOOL="none"
-inherit eutils autotools multilib unpacker
+inherit eutils autotools multilib unpacker prefix
 
 if [[ ${PV} == "9999" ]] ; then
        EGIT_REPO_URI="git://git.savannah.gnu.org/${PN}.git
                http://git.savannah.gnu.org/r/${PN}.git";
-       inherit git-r3
+       inherit git-2
 else
        SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
-       KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 
~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+       KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 
~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd 
~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint 
~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
 fi
 
 DESCRIPTION="A shared library tool for developers"
@@ -34,7 +34,7 @@ DEPEND="${RDEPEND}
 
 src_unpack() {
        if [[ ${PV} == "9999" ]] ; then
-               git-r3_src_unpack
+               git-2_src_unpack
                cd "${S}"
                ./bootstrap || die
        else
@@ -46,6 +46,29 @@ src_prepare() {
        use vanilla && return 0
 
        epatch "${FILESDIR}"/${PN}-2.4.3-use-linux-version-in-fbsd.patch #109105
+       epatch "${FILESDIR}"/${P}-link-specs.patch
+       epatch "${FILESDIR}"/${P}-link-fsanitize.patch #573744
+       epatch "${FILESDIR}"/${P}-link-fuse-ld.patch
+       epatch "${FILESDIR}"/${P}-libtoolize-slow.patch
+       epatch "${FILESDIR}"/${P}-libtoolize-delay-help.patch
+       epatch "${FILESDIR}"/${P}-sed-quote-speedup.patch #542252
+       epatch "${FILESDIR}"/${P}-ppc64le.patch #581314
+
+       epatch "${FILESDIR}"/${PN}-2.4.6-mint.patch
+       epatch "${FILESDIR}"/${PN}-2.2.6a-darwin-module-bundle.patch
+       epatch "${FILESDIR}"/${PN}-2.4.6-darwin-use-linux-version.patch
+       if use prefix ; then
+               # seems that libtool has to know about EPREFIX a little bit
+               # better, since it fails to find prefix paths to search libs
+               # from, resulting in some packages building static only, since
+               # libtool is fooled into thinking that libraries are unavailable
+               # (argh...). This could also be fixed by making the gcc wrapper
+               # return the correct result for -print-search-dirs (doesn't
+               # include prefix dirs ...).
+               epatch "${FILESDIR}"/${PN}-2.2.10-eprefix.patch
+               eprefixify m4/libtool.m4
+       fi
+
        pushd libltdl >/dev/null
        AT_NOELIBTOOLIZE=yes eautoreconf
        popd >/dev/null
@@ -64,12 +87,14 @@ src_configure() {
        # to find a bash shell.  if /bin/sh is bash, it uses that.  this can
        # cause problems for people who switch /bin/sh on the fly to other
        # shells, so just force libtool to use /bin/bash all the time.
-       export CONFIG_SHELL=/bin/bash
+       export CONFIG_SHELL=$(type -P bash)
 
        # Do not bother hardcoding the full path to sed.  Just rely on $PATH. 
#574550
        export ac_cv_path_SED=$(basename "$(type -P sed)")
 
-       ECONF_SOURCE=${S} econf --disable-ltdl-install
+       local myconf
+       [[ ${CHOST} == *-darwin* ]] && myconf="--program-prefix=g"
+       ECONF_SOURCE=${S} econf ${myconf} --disable-ltdl-install
 }
 
 src_test() {

diff --git a/sys-devel/libtool/libtool-9999.ebuild 
b/sys-devel/libtool/libtool-9999.ebuild
index 22a5d3c1043..c6a8101849e 100644
--- a/sys-devel/libtool/libtool-9999.ebuild
+++ b/sys-devel/libtool/libtool-9999.ebuild
@@ -5,7 +5,7 @@ EAPI="5"
 
 LIBTOOLIZE="true" #225559
 WANT_LIBTOOL="none"
-inherit eutils autotools multilib unpacker
+inherit eutils autotools multilib unpacker prefix
 
 if [[ ${PV} == "9999" ]] ; then
        EGIT_REPO_URI="git://git.savannah.gnu.org/${PN}.git
@@ -13,7 +13,7 @@ if [[ ${PV} == "9999" ]] ; then
        inherit git-r3
 else
        SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
-       KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 
~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+       KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 
~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-aix ~x64-cygwin 
~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos 
~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
 fi
 
 DESCRIPTION="A shared library tool for developers"
@@ -46,6 +46,20 @@ src_prepare() {
        use vanilla && return 0
 
        epatch "${FILESDIR}"/${PN}-2.4.3-use-linux-version-in-fbsd.patch #109105
+       epatch "${FILESDIR}"/${PN}-2.4.6-mint.patch
+       epatch "${FILESDIR}"/${PN}-2.2.6a-darwin-module-bundle.patch
+       epatch "${FILESDIR}"/${PN}-2.4.6-darwin-use-linux-version.patch
+       if use prefix ; then
+               # seems that libtool has to know about EPREFIX a little bit
+               # better, since it fails to find prefix paths to search libs
+               # from, resulting in some packages building static only, since
+               # libtool is fooled into thinking that libraries are unavailable
+               # (argh...). This could also be fixed by making the gcc wrapper
+               # return the correct result for -print-search-dirs (doesn't
+               # include prefix dirs ...).
+               epatch "${FILESDIR}"/${PN}-2.2.10-eprefix.patch
+               eprefixify m4/libtool.m4
+       fi
        pushd libltdl >/dev/null
        AT_NOELIBTOOLIZE=yes eautoreconf
        popd >/dev/null
@@ -64,12 +78,14 @@ src_configure() {
        # to find a bash shell.  if /bin/sh is bash, it uses that.  this can
        # cause problems for people who switch /bin/sh on the fly to other
        # shells, so just force libtool to use /bin/bash all the time.
-       export CONFIG_SHELL=/bin/bash
+       export CONFIG_SHELL=$(type -P bash)
 
        # Do not bother hardcoding the full path to sed.  Just rely on $PATH. 
#574550
        export ac_cv_path_SED=$(basename "$(type -P sed)")
 
-       ECONF_SOURCE=${S} econf --disable-ltdl-install
+       local myconf
+       [[ ${CHOST} == *-darwin* ]] && myconf="--program-prefix=g"
+       ECONF_SOURCE=${S} econf ${myconf} --disable-ltdl-install
 }
 
 src_test() {

Reply via email to