public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/libtool/files/, sys-devel/libtool/
@ 2016-02-13  8:54 Mike Frysinger
  0 siblings, 0 replies; 4+ messages in thread
From: Mike Frysinger @ 2016-02-13  8:54 UTC (permalink / raw
  To: gentoo-commits

commit:     5f4225eb727dcd8cc0eebd60620d4b2b160712aa
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 13 08:49:22 2016 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sat Feb 13 08:51:55 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5f4225eb

sys-devel/libtool: add various upstream patches #542252 #573744 #574550

Three sets of fixes here, mostly from upstream:
 - speed up libtool/libtoolize #542252
 - update some set of flags accepted at link time #573744
 - make $SED look up use $PATH at runtime #574550

 .../libtool-2.4.6-libtoolize-delay-help.patch      |  53 ++++
 .../files/libtool-2.4.6-libtoolize-slow.patch      | 118 +++++++++
 .../files/libtool-2.4.6-link-fsanitize.patch       |  58 +++++
 .../libtool/files/libtool-2.4.6-link-fuse-ld.patch |  54 +++++
 .../libtool/files/libtool-2.4.6-link-specs.patch   |  57 +++++
 .../files/libtool-2.4.6-sed-quote-speedup.patch    | 268 +++++++++++++++++++++
 sys-devel/libtool/libtool-2.4.6-r2.ebuild          |  93 +++++++
 7 files changed, 701 insertions(+)

diff --git a/sys-devel/libtool/files/libtool-2.4.6-libtoolize-delay-help.patch b/sys-devel/libtool/files/libtool-2.4.6-libtoolize-delay-help.patch
new file mode 100644
index 0000000..974cd44
--- /dev/null
+++ b/sys-devel/libtool/files/libtool-2.4.6-libtoolize-delay-help.patch
@@ -0,0 +1,53 @@
+https://lists.gnu.org/archive/html/libtool-patches/2016-02/msg00002.html
+
+From 53419307d5b44e5b0cff80d76f88ea02f237b747 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sat, 13 Feb 2016 03:32:20 -0500
+Subject: [PATCH] libtoolize: don't execute automake and autoconf on every
+ invocation.
+
+Same fix as applied to libtool in commit 408cfb9c5fa8a666917167ffb806cb
+to delay use of automake/autoconf to when the --help option is actually
+specified.
+
+* libtoolize.in (func_help): Override func_help() from
+gl/build-aux/options-parser to only run automake --version and
+autoconf --version when libtool --help is executed on the command
+line.
+---
+ libtoolize.in | 12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/libtoolize.in b/libtoolize.in
+index 3fe61ce..0d4af3d 100644
+--- a/libtoolize.in
++++ b/libtoolize.in
+@@ -94,7 +94,12 @@ usage_message="Options:
+ "
+ 
+ # Additional text appended to 'usage_message' in response to '--help'.
+-long_help_message=$long_help_message"
++func_help ()
++{
++    $debug_cmd
++
++    func_usage_message
++    $ECHO "$long_help_message
+        'environment'   show warnings about LIBTOOLIZE_OPTIONS content
+        'file'          show warnings about file copying and linking
+ 
+@@ -120,8 +125,9 @@ include the following information:
+ 
+ Report bugs to <@PACKAGE_BUGREPORT@>.
+ GNU @PACKAGE@ home page: <@PACKAGE_URL@>.
+-General help using GNU software: <http://www.gnu.org/gethelp/>.
+-"
++General help using GNU software: <http://www.gnu.org/gethelp/>."
++    exit 0
++}
+ 
+ warning_categories='environment file'
+ 
+-- 
+2.6.2
+

diff --git a/sys-devel/libtool/files/libtool-2.4.6-libtoolize-slow.patch b/sys-devel/libtool/files/libtool-2.4.6-libtoolize-slow.patch
new file mode 100644
index 0000000..abddee1
--- /dev/null
+++ b/sys-devel/libtool/files/libtool-2.4.6-libtoolize-slow.patch
@@ -0,0 +1,118 @@
+From 351a88feee66eda6ce33eb06acdebb8e9c6d6716 Mon Sep 17 00:00:00 2001
+From: Pavel Raiskup <praiskup@redhat.com>
+Date: Fri, 18 Sep 2015 23:17:07 +0200
+Subject: [PATCH] libtoolize: fix infinite recursion in m4
+
+Some projects use this construct in configure.ac:
+
+  m4_define([version], m4_include([version]))
+  pkg_version=version
+
+When the m4_include builtin is undefined (as was done in
+libtoolize and extract-trace scripts), the call to this 'version'
+macro enters an infinite recursion (until ENOMEM).  So rather
+re-define all potentially dangerous macros by empty strings,
+suggested by Eric Blake.
+
+While we are on it, merge the macro-"blacklist" with similar list
+implemented in gettext, except for 'm4_esyscmd'.  It's kept
+defined because we already trace AC_INIT macro for package
+version, while it is often specified by
+m4_esyscmd(git-version-gen).  Similarly to m4_include, m4_esyscmd
+might be opt-in-blacklisted in future.
+
+References:
+http://lists.gnu.org/archive/html/libtool/2015-09/msg00000.html
+https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=764580
+
+* gl/build-aux/extract-trace (_G_mini): Redefine trace-breaking
+macros to empty strings rather than undefining those.  Use 'dnl'
+for comments.
+* bootstrap: Likewise, sync with extract-trace.
+* NEWS: Document.
+* NO-THANKS: Mention Hiroyuki Sato.
+
+Signed-off-by: Pavel Raiskup <praiskup@redhat.com>
+---
+ NEWS                       |  4 ++++
+ NO-THANKS                  |  1 +
+ bootstrap                  | 42 +++++++++++++++++++++++++++---------------
+ gl/build-aux/extract-trace | 42 +++++++++++++++++++++++++++---------------
+ 4 files changed, 59 insertions(+), 30 deletions(-)
+
+diff --git a/gl/build-aux/extract-trace b/gl/build-aux/extract-trace
+index 315a32a..c6abd21 100755
+--- a/gl/build-aux/extract-trace
++++ b/gl/build-aux/extract-trace
+@@ -329,29 +329,41 @@ func_extract_trace ()
+     # arguments to Autocof functions, but without following
+     # 'm4_s?include' files.
+     _G_mini='
+-        # Initialisation.
++        dnl  Initialisation.
+         m4_changequote([,])
+         m4_define([m4_copy],   [m4_define([$2], m4_defn([$1]))])
+         m4_define([m4_rename], [m4_copy([$1], [$2])m4_undefine([$1])])
+ 
+-        # Disable these macros.
+-        m4_undefine([m4_dnl])
+-        m4_undefine([m4_include])
+-        m4_undefine([m4_m4exit])
+-        m4_undefine([m4_m4wrap])
+-        m4_undefine([m4_maketemp])
++        dnl  Replace macros which may abort m4 with a no-op variant.
++        m4_pushdef([m4_assert])
++        m4_pushdef([m4_exit])
++        m4_pushdef([m4_fatal])
++        m4_pushdef([m4_m4exit])
+ 
+-        # Copy and rename macros not handled by "m4 --prefix".
++        dnl  Replace macros that might break stderr of m4.
++        m4_pushdef([m4_errprint])
++        m4_pushdef([m4_errprintn])
++        m4_pushdef([m4_include])
++        m4_pushdef([m4_warn])
++
++        dnl  Avoid side-effects of tracing by extract-trace.
++        m4_pushdef([m4_maketemp])
++        m4_pushdef([m4_mkstemp])
++
++        dnl  TODO: reasons for this
++        m4_pushdef([m4_dnl])
++        m4_pushdef([m4_m4wrap])
++
++        dnl  Copy and rename macros not handled by "m4 --prefix".
+         m4_define([dnl],         [m4_builtin([dnl])])
+         m4_copy([m4_define],     [m4_defun])
+         m4_rename([m4_ifelse],   [m4_if])
+-        m4_ifdef([m4_mkstemp],   [m4_undefine([m4_mkstemp])])
+         m4_rename([m4_patsubst], [m4_bpatsubst])
+         m4_rename([m4_regexp],   [m4_bregexp])
+ 
+-        # "m4sugar.mini" - useful m4-time macros for dynamic arguments.
+-        # If we discover packages that need more m4 macros defined in
+-        # order to bootstrap correctly, add them here:
++        dnl  "m4sugar.mini" - useful m4-time macros for dynamic arguments.
++        dnl  If we discover packages that need more m4 macros defined in
++        dnl  order to bootstrap correctly, add them here:
+         m4_define([m4_bmatch],
+             [m4_if([$#], 0, [], [$#], 1, [], [$#], 2, [$2],
+                    [m4_if(m4_bregexp([$1], [$2]), -1,
+@@ -362,11 +374,11 @@ func_extract_trace ()
+         m4_define([m4_require], [$1])
+         m4_define([m4_shift3], [m4_shift(m4shift(m4shift($@)))])
+ 
+-        # "autoconf.mini" - things from autoconf macros we care about.
++        dnl  "autoconf.mini" - things from autoconf macros we care about.
+         m4_copy([m4_defun], [AC_DEFUN])
+ 
+-        # Dummy definitions for the macros we want to trace.
+-        # AM_INIT_AUTOMAKE at least produces no trace without this.
++        dnl  Dummy definitions for the macros we want to trace.
++        dnl  AM_INIT_AUTOMAKE at least produces no trace without this.
+     '
+ 
+     _G_save=$IFS
+-- 
+2.6.2
+

diff --git a/sys-devel/libtool/files/libtool-2.4.6-link-fsanitize.patch b/sys-devel/libtool/files/libtool-2.4.6-link-fsanitize.patch
new file mode 100644
index 0000000..c1ea8a8
--- /dev/null
+++ b/sys-devel/libtool/files/libtool-2.4.6-link-fsanitize.patch
@@ -0,0 +1,58 @@
+https://bugs.gentoo.org/573744
+
+From a5c6466528c060cc4660ad0319c00740db0e42ba Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston Sequoia <jeremyhu@macports.org>
+Date: Sun, 18 Oct 2015 21:55:39 -0700
+Subject: [PATCH] libtool: fix GCC/clang linking with -fsanitize=*
+
+References:
+https://lists.gnu.org/archive/html/libtool/2014-04/msg00026.html
+
+* build-aux/ltmain.in (func_mode_link): Pass -fsanitize=* to the
+linker to allow trivial use of the clang address sanitizer.
+
+Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@macports.org>
+Copyright-paperwork-exempt: Yes
+---
+ build-aux/ltmain.in | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
+index 1cbe875..2a5aaad 100644
+--- a/build-aux/ltmain.in
++++ b/build-aux/ltmain.in
+@@ -5382,10 +5382,11 @@ func_mode_link ()
+       # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
+       # -specs=*             GCC specs files
+       # -stdlib=*            select c++ std lib with clang
++      # -fsanitize=*         Clang/GCC memory and address sanitizer
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+       -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+       -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
+-      -specs=*)
++      -specs=*|-fsanitize=*)
+         func_quote_for_eval "$arg"
+ 	arg=$func_quote_for_eval_result
+         func_append compile_command " $arg"
+
+patch the generated file too to keep help2man from generating man pages
+https://bugs.gentoo.org/556512
+
+--- a/build-aux/ltmain.sh
++++ b/build-aux/ltmain.sh
+@@ -5382,10 +5382,11 @@ func_mode_link ()
+       # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
+       # -specs=*             GCC specs files
+       # -stdlib=*            select c++ std lib with clang
++      # -fsanitize=*         Clang/GCC memory and address sanitizer
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+       -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+       -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
+-      -specs=*)
++      -specs=*|-fsanitize=*)
+         func_quote_for_eval "$arg"
+ 	arg=$func_quote_for_eval_result
+         func_append compile_command " $arg"
+-- 
+2.6.2
+

diff --git a/sys-devel/libtool/files/libtool-2.4.6-link-fuse-ld.patch b/sys-devel/libtool/files/libtool-2.4.6-link-fuse-ld.patch
new file mode 100644
index 0000000..55ec5ae
--- /dev/null
+++ b/sys-devel/libtool/files/libtool-2.4.6-link-fuse-ld.patch
@@ -0,0 +1,54 @@
+https://lists.gnu.org/archive/html/libtool-patches/2015-03/msg00000.html
+https://lists.gnu.org/archive/html/libtool-patches/2016-02/msg00001.html
+
+From 2f258b87ce4415edede1b2a84a3a7dbcf44555c2 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Mon, 16 Mar 2015 18:17:31 -0400
+Subject: [PATCH] libtool: pass through -fuse-ld flags
+
+Starting with gcc-4.8, there's a -fuse-ld flag that can be used to select
+between bfd & gold.  Make sure we pass it through to the linking stage.
+
+* build-aux/ltmain.in (func_mode_link): Pass -fuse-ld=* flags through.
+---
+ build-aux/ltmain.in | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
+index 2a5aaad..4c24d5d 100644
+--- a/build-aux/ltmain.in
++++ b/build-aux/ltmain.in
+@@ -5383,10 +5383,11 @@ func_mode_link ()
+       # -specs=*             GCC specs files
+       # -stdlib=*            select c++ std lib with clang
+       # -fsanitize=*         Clang/GCC memory and address sanitizer
++      # -fuse-ld=*           Linker select flags for GCC
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+       -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+       -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
+-      -specs=*|-fsanitize=*)
++      -specs=*|-fsanitize=*|-fuse-ld=*)
+         func_quote_for_eval "$arg"
+ 	arg=$func_quote_for_eval_result
+         func_append compile_command " $arg"
+
+patch the generated file too to keep help2man from generating man pages
+https://bugs.gentoo.org/556512
+
+--- a/build-aux/ltmain.sh
++++ b/build-aux/ltmain.sh
+@@ -5383,10 +5383,11 @@ func_mode_link ()
+       # -specs=*             GCC specs files
+       # -stdlib=*            select c++ std lib with clang
+       # -fsanitize=*         Clang/GCC memory and address sanitizer
++      # -fuse-ld=*           Linker select flags for GCC
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+       -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+       -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
+-      -specs=*|-fsanitize=*)
++      -specs=*|-fsanitize=*|-fuse-ld=*)
+         func_quote_for_eval "$arg"
+ 	arg=$func_quote_for_eval_result
+         func_append compile_command " $arg"
+-- 
+2.3.2

diff --git a/sys-devel/libtool/files/libtool-2.4.6-link-specs.patch b/sys-devel/libtool/files/libtool-2.4.6-link-specs.patch
new file mode 100644
index 0000000..a8fbf28
--- /dev/null
+++ b/sys-devel/libtool/files/libtool-2.4.6-link-specs.patch
@@ -0,0 +1,57 @@
+From 702a97fbb09bd7088a50f2b239016d1e32843c24 Mon Sep 17 00:00:00 2001
+From: Pavel Raiskup <praiskup@redhat.com>
+Date: Fri, 18 Sep 2015 10:36:43 +0200
+Subject: [PATCH] libtool: fix GCC linking with -specs=*
+
+References:
+https://bugzilla.redhat.com/show_bug.cgi?id=985592
+
+* build-aux/ltmain.in (func_mode_link): Pass -specs=*
+to the linker, Fedora uses this option for hardening.
+
+Signed-off-by: Pavel Raiskup <praiskup@redhat.com>
+---
+ build-aux/ltmain.in | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
+index d5cf07a..0c40da0 100644
+--- a/build-aux/ltmain.in
++++ b/build-aux/ltmain.in
+@@ -5360,10 +5360,12 @@ func_mode_link ()
+       # -tp=*                Portland pgcc target processor selection
+       # --sysroot=*          for sysroot support
+       # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
++      # -specs=*             GCC specs files
+       # -stdlib=*            select c++ std lib with clang
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+       -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+-      -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*)
++      -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
++      -specs=*)
+         func_quote_for_eval "$arg"
+ 	arg=$func_quote_for_eval_result
+         func_append compile_command " $arg"
+
+patch the generated file too to keep help2man from generating man pages
+https://bugs.gentoo.org/556512
+
+--- a/build-aux/ltmain.sh
++++ b/build-aux/ltmain.sh
+@@ -5360,10 +5360,12 @@ func_mode_link ()
+       # -tp=*                Portland pgcc target processor selection
+       # --sysroot=*          for sysroot support
+       # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
++      # -specs=*             GCC specs files
+       # -stdlib=*            select c++ std lib with clang
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+       -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+-      -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*)
++      -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
++      -specs=*)
+         func_quote_for_eval "$arg"
+ 	arg=$func_quote_for_eval_result
+         func_append compile_command " $arg"
+-- 
+2.6.2
+

diff --git a/sys-devel/libtool/files/libtool-2.4.6-sed-quote-speedup.patch b/sys-devel/libtool/files/libtool-2.4.6-sed-quote-speedup.patch
new file mode 100644
index 0000000..0eeffac
--- /dev/null
+++ b/sys-devel/libtool/files/libtool-2.4.6-sed-quote-speedup.patch
@@ -0,0 +1,268 @@
+https://bugs.gentoo.org/542252
+
+From 32f0df9835ac15ac17e04be57c368172c3ad1d19 Mon Sep 17 00:00:00 2001
+From: Pavel Raiskup <praiskup@redhat.com>
+Date: Sun, 4 Oct 2015 21:55:03 +0200
+Subject: [PATCH] libtool: mitigate the $sed_quote_subst slowdown
+
+When it is reasonably possible, use shell implementation for
+quoting.
+
+References:
+http://lists.gnu.org/archive/html/libtool/2015-03/msg00005.html
+http://lists.gnu.org/archive/html/libtool/2015-02/msg00000.html
+https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20006
+
+* gl/build-aux/funclib.sh (func_quote): New function that can be
+used as substitution for '$SED $sed_quote_subst' call.
+* build-aux/ltmain.in (func_emit_wrapper): Use func_quote instead
+of '$SED $sed_quote_subst'.
+(func_mode_link): Likewise.
+* NEWS: Document.
+* bootstrap: Sync with funclib.sh.
+---
+ NEWS                    |  3 +++
+ bootstrap               | 61 +++++++++++++++++++++++++++++++++++++++++++------
+ build-aux/ltmain.in     | 10 ++++----
+ gl/build-aux/funclib.sh | 61 +++++++++++++++++++++++++++++++++++++++++++------
+ 4 files changed, 117 insertions(+), 18 deletions(-)
+
+diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
+index 0c40da0..24acefd 100644
+--- a/build-aux/ltmain.in
++++ b/build-aux/ltmain.in
+@@ -3346,7 +3346,8 @@ else
+   if test \"\$libtool_execute_magic\" != \"$magic\"; then
+     file=\"\$0\""
+ 
+-    qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
++    func_quote "$ECHO"
++    qECHO=$func_quote_result
+     $ECHO "\
+ 
+ # A function that is used when there is no print builtin or printf.
+@@ -8596,8 +8597,8 @@ EOF
+ 	    relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+ 	  fi
+ 	done
+-	relink_command="(cd `pwd`; $relink_command)"
+-	relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
++	func_quote "(cd `pwd`; $relink_command)"
++	relink_command=$func_quote_result
+       fi
+ 
+       # Only actually do things if not in dry run mode.
+@@ -8843,7 +8844,8 @@ EOF
+       done
+       # Quote the link command for shipping.
+       relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+-      relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
++      func_quote "$relink_command"
++      relink_command=$func_quote_result
+       if test yes = "$hardcode_automatic"; then
+ 	relink_command=
+       fi
+diff --git a/gl/build-aux/funclib.sh b/gl/build-aux/funclib.sh
+index 39d972e..47d8b95 100644
+--- a/build-aux/funclib.sh
++++ b/build-aux/funclib.sh
+@@ -1,5 +1,5 @@
+ # Set a version string for this script.
+-scriptversion=2015-01-20.17; # UTC
++scriptversion=2015-10-04.22; # UTC
+ 
+ # General shell script boiler plate, and helper functions.
+ # Written by Gary V. Vaughan, 2004
+@@ -1026,6 +1026,57 @@ func_relative_path ()
+ }
+ 
+ 
++# func_quote ARG
++# --------------
++# Aesthetically quote one ARG, store the result into $func_quote_result.  Note
++# that we keep attention to performance here (so far O(N) complexity as long as
++# func_append is O(1)).
++func_quote ()
++{
++    $debug_cmd
++
++    func_quote_result=$1
++
++    case $func_quote_result in
++      *[\\\`\"\$]*)
++        case $func_quote_result in
++          *[\[\*\?]*)
++            func_quote_result=`$ECHO "$func_quote_result" | $SED "$sed_quote_subst"`
++            return 0
++            ;;
++        esac
++
++        func_quote_old_IFS=$IFS
++        for _G_char in '\' '`' '"' '$'
++        do
++          # STATE($1) PREV($2) SEPARATOR($3)
++          set start "" ""
++          func_quote_result=dummy"$_G_char$func_quote_result$_G_char"dummy
++          IFS=$_G_char
++          for _G_part in $func_quote_result
++          do
++            case $1 in
++            quote)
++              func_append func_quote_result "$3$2"
++              set quote "$_G_part" "\\$_G_char"
++              ;;
++            start)
++              set first "" ""
++              func_quote_result=
++              ;;
++            first)
++              set quote "$_G_part" ""
++              ;;
++            esac
++          done
++          IFS=$func_quote_old_IFS
++        done
++        ;;
++      *) ;;
++    esac
++}
++
++
+ # func_quote_for_eval ARG...
+ # --------------------------
+ # Aesthetically quote ARGs to be evaled later.
+@@ -1042,12 +1093,8 @@ func_quote_for_eval ()
+     func_quote_for_eval_unquoted_result=
+     func_quote_for_eval_result=
+     while test 0 -lt $#; do
+-      case $1 in
+-        *[\\\`\"\$]*)
+-	  _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;;
+-        *)
+-          _G_unquoted_arg=$1 ;;
+-      esac
++      func_quote "$1"
++      _G_unquoted_arg=$func_quote_result
+       if test -n "$func_quote_for_eval_unquoted_result"; then
+ 	func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg"
+       else
+
+patch the generated file too to keep help2man from generating man pages
+https://bugs.gentoo.org/556512
+
+--- a/build-aux/ltmain.sh
++++ b/build-aux/ltmain.sh
+@@ -1,5 +1,5 @@
+ # Set a version string for this script.
+-scriptversion=2015-01-20.17; # UTC
++scriptversion=2015-10-04.22; # UTC
+ 
+ # General shell script boiler plate, and helper functions.
+ # Written by Gary V. Vaughan, 2004
+@@ -1026,6 +1026,57 @@ func_relative_path ()
+ }
+ 
+ 
++# func_quote ARG
++# --------------
++# Aesthetically quote one ARG, store the result into $func_quote_result.  Note
++# that we keep attention to performance here (so far O(N) complexity as long as
++# func_append is O(1)).
++func_quote ()
++{
++    $debug_cmd
++
++    func_quote_result=$1
++
++    case $func_quote_result in
++      *[\\\`\"\$]*)
++        case $func_quote_result in
++          *[\[\*\?]*)
++            func_quote_result=`$ECHO "$func_quote_result" | $SED "$sed_quote_subst"`
++            return 0
++            ;;
++        esac
++
++        func_quote_old_IFS=$IFS
++        for _G_char in '\' '`' '"' '$'
++        do
++          # STATE($1) PREV($2) SEPARATOR($3)
++          set start "" ""
++          func_quote_result=dummy"$_G_char$func_quote_result$_G_char"dummy
++          IFS=$_G_char
++          for _G_part in $func_quote_result
++          do
++            case $1 in
++            quote)
++              func_append func_quote_result "$3$2"
++              set quote "$_G_part" "\\$_G_char"
++              ;;
++            start)
++              set first "" ""
++              func_quote_result=
++              ;;
++            first)
++              set quote "$_G_part" ""
++              ;;
++            esac
++          done
++          IFS=$func_quote_old_IFS
++        done
++        ;;
++      *) ;;
++    esac
++}
++
++
+ # func_quote_for_eval ARG...
+ # --------------------------
+ # Aesthetically quote ARGs to be evaled later.
+@@ -1042,12 +1093,8 @@ func_quote_for_eval ()
+     func_quote_for_eval_unquoted_result=
+     func_quote_for_eval_result=
+     while test 0 -lt $#; do
+-      case $1 in
+-        *[\\\`\"\$]*)
+-	  _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;;
+-        *)
+-          _G_unquoted_arg=$1 ;;
+-      esac
++      func_quote "$1"
++      _G_unquoted_arg=$func_quote_result
+       if test -n "$func_quote_for_eval_unquoted_result"; then
+ 	func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg"
+       else
+@@ -3346,7 +3346,8 @@ else
+   if test \"\$libtool_execute_magic\" != \"$magic\"; then
+     file=\"\$0\""
+ 
+-    qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
++    func_quote "$ECHO"
++    qECHO=$func_quote_result
+     $ECHO "\
+ 
+ # A function that is used when there is no print builtin or printf.
+@@ -8596,8 +8597,8 @@ EOF
+ 	    relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+ 	  fi
+ 	done
+-	relink_command="(cd `pwd`; $relink_command)"
+-	relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
++	func_quote "(cd `pwd`; $relink_command)"
++	relink_command=$func_quote_result
+       fi
+ 
+       # Only actually do things if not in dry run mode.
+@@ -8843,7 +8844,8 @@ EOF
+       done
+       # Quote the link command for shipping.
+       relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+-      relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
++      func_quote "$relink_command"
++      relink_command=$func_quote_result
+       if test yes = "$hardcode_automatic"; then
+ 	relink_command=
+       fi
+-- 
+2.6.2
+

diff --git a/sys-devel/libtool/libtool-2.4.6-r2.ebuild b/sys-devel/libtool/libtool-2.4.6-r2.ebuild
new file mode 100644
index 0000000..7e8b7ef
--- /dev/null
+++ b/sys-devel/libtool/libtool-2.4.6-r2.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+LIBTOOLIZE="true" #225559
+WANT_LIBTOOL="none"
+inherit eutils autotools multilib unpacker
+
+if [[ ${PV} == "9999" ]] ; then
+	EGIT_REPO_URI="git://git.savannah.gnu.org/${PN}.git
+		http://git.savannah.gnu.org/r/${PN}.git"
+	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"
+fi
+
+DESCRIPTION="A shared library tool for developers"
+HOMEPAGE="https://www.gnu.org/software/libtool/"
+
+LICENSE="GPL-2"
+SLOT="2"
+IUSE="vanilla"
+
+# Pull in libltdl directly until we convert packages to the new dep.
+RDEPEND="sys-devel/gnuconfig
+	>=sys-devel/autoconf-2.69
+	>=sys-devel/automake-1.13
+	dev-libs/libltdl:0"
+DEPEND="${RDEPEND}
+	app-arch/xz-utils"
+[[ ${PV} == "9999" ]] && DEPEND+=" sys-apps/help2man"
+
+src_unpack() {
+	if [[ ${PV} == "9999" ]] ; then
+		git-2_src_unpack
+		cd "${S}"
+		./bootstrap || die
+	else
+		unpacker_src_unpack
+	fi
+}
+
+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
+	pushd libltdl >/dev/null
+	AT_NOELIBTOOLIZE=yes eautoreconf
+	popd >/dev/null
+	AT_NOELIBTOOLIZE=yes eautoreconf
+	epunt_cxx
+
+	# Make sure timestamps don't trigger a rebuild of man pages. #556512
+	if [[ ${PV} != "9999" ]] ; then
+		touch doc/*.1
+		export HELP2MAN=false
+	fi
+}
+
+src_configure() {
+	# the libtool script uses bash code in it and at configure time, tries
+	# 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
+
+	# 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
+}
+
+src_test() {
+	emake check
+}
+
+src_install() {
+	default
+
+	local x
+	while read -d $'\0' -r x ; do
+		ln -sf "${EPREFIX}"/usr/share/gnuconfig/${x##*/} "${x}" || die
+	done < <(find "${ED}" '(' -name config.guess -o -name config.sub ')' -print0)
+}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-devel/libtool/files/, sys-devel/libtool/
@ 2017-03-23 15:10 Fabian Groffen
  0 siblings, 0 replies; 4+ messages in thread
From: Fabian Groffen @ 2017-03-23 15:10 UTC (permalink / raw
  To: gentoo-commits

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() {


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-devel/libtool/files/, sys-devel/libtool/
@ 2019-12-28 15:19 Lars Wendler
  0 siblings, 0 replies; 4+ messages in thread
From: Lars Wendler @ 2019-12-28 15:19 UTC (permalink / raw
  To: gentoo-commits

commit:     2dd4b4a5f9ab6a5dd9c91489f88576d992a34918
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 23 23:02:51 2019 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Sat Dec 28 15:19:21 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2dd4b4a5

sys-devel/libtool: Port to EAPI 7

* Rebase all patches

Acked-by: Lars Wendler <polynomial-c <AT> gentoo.org>
Package-Manager: Portage-2.3.82, Repoman-2.3.20
Signed-off-by: David Seifert <soap <AT> gentoo.org>
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 .../libtool-2.2.6a-darwin-module-bundle.patch      |   8 +-
 .../libtool-2.4.3-use-linux-version-in-fbsd.patch  |   8 +-
 .../libtool-2.4.6-darwin-use-linux-version.patch   |   6 +-
 .../files/libtool-2.4.6-link-fsanitize.patch       |  16 +--
 .../libtool/files/libtool-2.4.6-link-fuse-ld.patch |  15 +--
 .../libtool/files/libtool-2.4.6-link-specs.patch   |  16 +--
 sys-devel/libtool/files/libtool-2.4.6-mint.patch   |  21 ++--
 .../files/libtool-2.4.6-pthread_bootstrapped.patch |   6 +-
 .../files/libtool-2.4.6-sed-quote-speedup.patch    |  41 +++-----
 sys-devel/libtool/libtool-2.4.6-r6.ebuild          | 114 +++++++++++++++++++++
 10 files changed, 156 insertions(+), 95 deletions(-)

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
index c6b63ed3276..81364d4d02a 100644
--- 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
@@ -11,10 +11,10 @@ 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'
+--- a/m4/libtool.m4
++++ b/m4/libtool.m4
+@@ -2645,7 +2645,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`'

diff --git a/sys-devel/libtool/files/libtool-2.4.3-use-linux-version-in-fbsd.patch b/sys-devel/libtool/files/libtool-2.4.3-use-linux-version-in-fbsd.patch
index 8244eaa7e3e..aa1e870649b 100644
--- a/sys-devel/libtool/files/libtool-2.4.3-use-linux-version-in-fbsd.patch
+++ b/sys-devel/libtool/files/libtool-2.4.3-use-linux-version-in-fbsd.patch
@@ -7,7 +7,7 @@ http://bugs.gentoo.org/109105
 
 --- a/m4/libtool.m4
 +++ b/m4/libtool.m4
-@@ -1375,7 +1375,14 @@
+@@ -2666,7 +2666,14 @@
      *) objformat=elf ;;
      esac
    fi
@@ -22,9 +22,9 @@ http://bugs.gentoo.org/109105
 +
    case $version_type in
      freebsd-elf*)
-       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-@@ -1386,6 +1392,12 @@
-       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+       library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+@@ -2678,6 +2685,12 @@
+       library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
        need_version=yes
        ;;
 +    linux)

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
index b4409815f8b..aded304989d 100644
--- 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
@@ -1,8 +1,8 @@
 * revert old 1.5 behaviour
 
---- libtool-2.4.6/m4/libtool.m4
-+++ libtool-2.4.6/m4/libtool.m4
-@@ -2272,7 +2272,7 @@
+--- a/m4/libtool.m4
++++ b/m4/libtool.m4
+@@ -2641,7 +2641,7 @@
    version_type=darwin
    need_lib_prefix=no
    need_version=no

diff --git a/sys-devel/libtool/files/libtool-2.4.6-link-fsanitize.patch b/sys-devel/libtool/files/libtool-2.4.6-link-fsanitize.patch
index c1ea8a82940..853a22eff54 100644
--- a/sys-devel/libtool/files/libtool-2.4.6-link-fsanitize.patch
+++ b/sys-devel/libtool/files/libtool-2.4.6-link-fsanitize.patch
@@ -13,15 +13,10 @@ linker to allow trivial use of the clang address sanitizer.
 
 Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@macports.org>
 Copyright-paperwork-exempt: Yes
----
- build-aux/ltmain.in | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
 
-diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
-index 1cbe875..2a5aaad 100644
 --- a/build-aux/ltmain.in
 +++ b/build-aux/ltmain.in
-@@ -5382,10 +5382,11 @@ func_mode_link ()
+@@ -5362,10 +5362,11 @@
        # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
        # -specs=*             GCC specs files
        # -stdlib=*            select c++ std lib with clang
@@ -34,13 +29,9 @@ index 1cbe875..2a5aaad 100644
          func_quote_for_eval "$arg"
  	arg=$func_quote_for_eval_result
          func_append compile_command " $arg"
-
-patch the generated file too to keep help2man from generating man pages
-https://bugs.gentoo.org/556512
-
 --- a/build-aux/ltmain.sh
 +++ b/build-aux/ltmain.sh
-@@ -5382,10 +5382,11 @@ func_mode_link ()
+@@ -7274,10 +7274,11 @@
        # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
        # -specs=*             GCC specs files
        # -stdlib=*            select c++ std lib with clang
@@ -53,6 +44,3 @@ https://bugs.gentoo.org/556512
          func_quote_for_eval "$arg"
  	arg=$func_quote_for_eval_result
          func_append compile_command " $arg"
--- 
-2.6.2
-

diff --git a/sys-devel/libtool/files/libtool-2.4.6-link-fuse-ld.patch b/sys-devel/libtool/files/libtool-2.4.6-link-fuse-ld.patch
index 55ec5ae9e0a..f6c0a3dc89f 100644
--- a/sys-devel/libtool/files/libtool-2.4.6-link-fuse-ld.patch
+++ b/sys-devel/libtool/files/libtool-2.4.6-link-fuse-ld.patch
@@ -10,15 +10,10 @@ Starting with gcc-4.8, there's a -fuse-ld flag that can be used to select
 between bfd & gold.  Make sure we pass it through to the linking stage.
 
 * build-aux/ltmain.in (func_mode_link): Pass -fuse-ld=* flags through.
----
- build-aux/ltmain.in | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
 
-diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
-index 2a5aaad..4c24d5d 100644
 --- a/build-aux/ltmain.in
 +++ b/build-aux/ltmain.in
-@@ -5383,10 +5383,11 @@ func_mode_link ()
+@@ -5363,10 +5363,11 @@
        # -specs=*             GCC specs files
        # -stdlib=*            select c++ std lib with clang
        # -fsanitize=*         Clang/GCC memory and address sanitizer
@@ -31,13 +26,9 @@ index 2a5aaad..4c24d5d 100644
          func_quote_for_eval "$arg"
  	arg=$func_quote_for_eval_result
          func_append compile_command " $arg"
-
-patch the generated file too to keep help2man from generating man pages
-https://bugs.gentoo.org/556512
-
 --- a/build-aux/ltmain.sh
 +++ b/build-aux/ltmain.sh
-@@ -5383,10 +5383,11 @@ func_mode_link ()
+@@ -7275,10 +7275,11 @@
        # -specs=*             GCC specs files
        # -stdlib=*            select c++ std lib with clang
        # -fsanitize=*         Clang/GCC memory and address sanitizer
@@ -50,5 +41,3 @@ https://bugs.gentoo.org/556512
          func_quote_for_eval "$arg"
  	arg=$func_quote_for_eval_result
          func_append compile_command " $arg"
--- 
-2.3.2

diff --git a/sys-devel/libtool/files/libtool-2.4.6-link-specs.patch b/sys-devel/libtool/files/libtool-2.4.6-link-specs.patch
index a8fbf28f80c..c7720935d8f 100644
--- a/sys-devel/libtool/files/libtool-2.4.6-link-specs.patch
+++ b/sys-devel/libtool/files/libtool-2.4.6-link-specs.patch
@@ -10,15 +10,10 @@ https://bugzilla.redhat.com/show_bug.cgi?id=985592
 to the linker, Fedora uses this option for hardening.
 
 Signed-off-by: Pavel Raiskup <praiskup@redhat.com>
----
- build-aux/ltmain.in | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
 
-diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
-index d5cf07a..0c40da0 100644
 --- a/build-aux/ltmain.in
 +++ b/build-aux/ltmain.in
-@@ -5360,10 +5360,12 @@ func_mode_link ()
+@@ -5360,10 +5360,12 @@
        # -tp=*                Portland pgcc target processor selection
        # --sysroot=*          for sysroot support
        # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
@@ -32,13 +27,9 @@ index d5cf07a..0c40da0 100644
          func_quote_for_eval "$arg"
  	arg=$func_quote_for_eval_result
          func_append compile_command " $arg"
-
-patch the generated file too to keep help2man from generating man pages
-https://bugs.gentoo.org/556512
-
 --- a/build-aux/ltmain.sh
 +++ b/build-aux/ltmain.sh
-@@ -5360,10 +5360,12 @@ func_mode_link ()
+@@ -7272,10 +7272,12 @@
        # -tp=*                Portland pgcc target processor selection
        # --sysroot=*          for sysroot support
        # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
@@ -52,6 +43,3 @@ https://bugs.gentoo.org/556512
          func_quote_for_eval "$arg"
  	arg=$func_quote_for_eval_result
          func_append compile_command " $arg"
--- 
-2.6.2
-

diff --git a/sys-devel/libtool/files/libtool-2.4.6-mint.patch b/sys-devel/libtool/files/libtool-2.4.6-mint.patch
index 341a0f02ef1..4fe5bcede5a 100644
--- a/sys-devel/libtool/files/libtool-2.4.6-mint.patch
+++ b/sys-devel/libtool/files/libtool-2.4.6-mint.patch
@@ -2,10 +2,9 @@ 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 @@
+--- a/configure
++++ b/configure
+@@ -5897,6 +5897,11 @@
      lt_cv_sys_max_cmd_len=8192;
      ;;
  
@@ -17,10 +16,9 @@ diff -ur libtool-2.2.6/configure libtool-2.2.6-mint/configure
    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 @@
+--- a/libltdl/configure
++++ b/libltdl/configure
+@@ -4782,6 +4782,11 @@
      lt_cv_sys_max_cmd_len=8192;
      ;;
  
@@ -32,10 +30,9 @@ diff -ur libtool-2.2.6/libltdl/configure libtool-2.2.6-mint/libltdl/configure
    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 @@
+--- a/m4/libtool.m4
++++ b/m4/libtool.m4
+@@ -1708,6 +1708,11 @@
      lt_cv_sys_max_cmd_len=8192;
      ;;
  

diff --git a/sys-devel/libtool/files/libtool-2.4.6-pthread_bootstrapped.patch b/sys-devel/libtool/files/libtool-2.4.6-pthread_bootstrapped.patch
index 54461ccc54e..b093d74266f 100644
--- a/sys-devel/libtool/files/libtool-2.4.6-pthread_bootstrapped.patch
+++ b/sys-devel/libtool/files/libtool-2.4.6-pthread_bootstrapped.patch
@@ -1,8 +1,8 @@
 https://bugs.gentoo.org/650876
 
---- libtool-2.4.6/build-aux/ltmain.sh
-+++ libtool-2.4.6/build-aux/ltmain.sh
-@@ -7079,6 +7079,16 @@
+--- a/build-aux/ltmain.sh
++++ b/build-aux/ltmain.sh
+@@ -7127,6 +7127,16 @@
  	    *" $arg "*) ;;
  	    * ) func_append new_inherited_linker_flags " $arg" ;;
  	esac

diff --git a/sys-devel/libtool/files/libtool-2.4.6-sed-quote-speedup.patch b/sys-devel/libtool/files/libtool-2.4.6-sed-quote-speedup.patch
index 0eeffac7a0d..580d635d04a 100644
--- a/sys-devel/libtool/files/libtool-2.4.6-sed-quote-speedup.patch
+++ b/sys-devel/libtool/files/libtool-2.4.6-sed-quote-speedup.patch
@@ -20,18 +20,10 @@ of '$SED $sed_quote_subst'.
 (func_mode_link): Likewise.
 * NEWS: Document.
 * bootstrap: Sync with funclib.sh.
----
- NEWS                    |  3 +++
- bootstrap               | 61 +++++++++++++++++++++++++++++++++++++++++++------
- build-aux/ltmain.in     | 10 ++++----
- gl/build-aux/funclib.sh | 61 +++++++++++++++++++++++++++++++++++++++++++------
- 4 files changed, 117 insertions(+), 18 deletions(-)
 
-diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
-index 0c40da0..24acefd 100644
 --- a/build-aux/ltmain.in
 +++ b/build-aux/ltmain.in
-@@ -3346,7 +3346,8 @@ else
+@@ -3346,7 +3346,8 @@
    if test \"\$libtool_execute_magic\" != \"$magic\"; then
      file=\"\$0\""
  
@@ -41,7 +33,7 @@ index 0c40da0..24acefd 100644
      $ECHO "\
  
  # A function that is used when there is no print builtin or printf.
-@@ -8596,8 +8597,8 @@ EOF
+@@ -8598,8 +8599,8 @@
  	    relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
  	  fi
  	done
@@ -52,7 +44,7 @@ index 0c40da0..24acefd 100644
        fi
  
        # Only actually do things if not in dry run mode.
-@@ -8843,7 +8844,8 @@ EOF
+@@ -8845,7 +8846,8 @@
        done
        # Quote the link command for shipping.
        relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
@@ -62,8 +54,6 @@ index 0c40da0..24acefd 100644
        if test yes = "$hardcode_automatic"; then
  	relink_command=
        fi
-diff --git a/gl/build-aux/funclib.sh b/gl/build-aux/funclib.sh
-index 39d972e..47d8b95 100644
 --- a/build-aux/funclib.sh
 +++ b/build-aux/funclib.sh
 @@ -1,5 +1,5 @@
@@ -73,7 +63,7 @@ index 39d972e..47d8b95 100644
  
  # General shell script boiler plate, and helper functions.
  # Written by Gary V. Vaughan, 2004
-@@ -1026,6 +1026,57 @@ func_relative_path ()
+@@ -1026,6 +1026,57 @@
  }
  
  
@@ -131,7 +121,7 @@ index 39d972e..47d8b95 100644
  # func_quote_for_eval ARG...
  # --------------------------
  # Aesthetically quote ARGs to be evaled later.
-@@ -1042,12 +1093,8 @@ func_quote_for_eval ()
+@@ -1042,12 +1093,8 @@
      func_quote_for_eval_unquoted_result=
      func_quote_for_eval_result=
      while test 0 -lt $#; do
@@ -146,20 +136,18 @@ index 39d972e..47d8b95 100644
        if test -n "$func_quote_for_eval_unquoted_result"; then
  	func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg"
        else
-
-patch the generated file too to keep help2man from generating man pages
-https://bugs.gentoo.org/556512
-
 --- a/build-aux/ltmain.sh
 +++ b/build-aux/ltmain.sh
-@@ -1,5 +1,5 @@
+@@ -64,7 +64,7 @@
+ # libraries, which are installed to $pkgauxdir.
+ 
  # Set a version string for this script.
 -scriptversion=2015-01-20.17; # UTC
 +scriptversion=2015-10-04.22; # UTC
  
  # General shell script boiler plate, and helper functions.
  # Written by Gary V. Vaughan, 2004
-@@ -1026,6 +1026,57 @@ func_relative_path ()
+@@ -1091,6 +1091,57 @@
  }
  
  
@@ -217,7 +205,7 @@ https://bugs.gentoo.org/556512
  # func_quote_for_eval ARG...
  # --------------------------
  # Aesthetically quote ARGs to be evaled later.
-@@ -1042,12 +1093,8 @@ func_quote_for_eval ()
+@@ -1107,12 +1158,8 @@
      func_quote_for_eval_unquoted_result=
      func_quote_for_eval_result=
      while test 0 -lt $#; do
@@ -232,7 +220,7 @@ https://bugs.gentoo.org/556512
        if test -n "$func_quote_for_eval_unquoted_result"; then
  	func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg"
        else
-@@ -3346,7 +3346,8 @@ else
+@@ -5258,7 +5305,8 @@
    if test \"\$libtool_execute_magic\" != \"$magic\"; then
      file=\"\$0\""
  
@@ -242,7 +230,7 @@ https://bugs.gentoo.org/556512
      $ECHO "\
  
  # A function that is used when there is no print builtin or printf.
-@@ -8596,8 +8597,8 @@ EOF
+@@ -10510,8 +10558,8 @@
  	    relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
  	  fi
  	done
@@ -253,7 +241,7 @@ https://bugs.gentoo.org/556512
        fi
  
        # Only actually do things if not in dry run mode.
-@@ -8843,7 +8844,8 @@ EOF
+@@ -10757,7 +10805,8 @@
        done
        # Quote the link command for shipping.
        relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
@@ -263,6 +251,3 @@ https://bugs.gentoo.org/556512
        if test yes = "$hardcode_automatic"; then
  	relink_command=
        fi
--- 
-2.6.2
-

diff --git a/sys-devel/libtool/libtool-2.4.6-r6.ebuild b/sys-devel/libtool/libtool-2.4.6-r6.ebuild
new file mode 100644
index 00000000000..c699abbc549
--- /dev/null
+++ b/sys-devel/libtool/libtool-2.4.6-r6.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+LIBTOOLIZE="true" #225559
+WANT_LIBTOOL="none"
+inherit autotools prefix
+
+if [[ ${PV} == *9999 ]] ; then
+	EGIT_REPO_URI="https://git.savannah.gnu.org/git/libtool.git"
+	inherit git-r3
+else
+	SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+fi
+
+DESCRIPTION="A shared library tool for developers"
+HOMEPAGE="https://www.gnu.org/software/libtool/"
+
+LICENSE="GPL-2"
+SLOT="2"
+IUSE="vanilla"
+
+# Pull in libltdl directly until we convert packages to the new dep.
+RDEPEND="
+	sys-devel/gnuconfig
+	>=sys-devel/autoconf-2.69:*
+	>=sys-devel/automake-1.13:*
+	dev-libs/libltdl:0"
+DEPEND="${RDEPEND}"
+[[ ${PV} == *9999 ]] && BDEPEND="sys-apps/help2man"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-2.4.3-use-linux-version-in-fbsd.patch #109105
+	"${FILESDIR}"/${PN}-2.4.6-link-specs.patch
+	"${FILESDIR}"/${PN}-2.4.6-link-fsanitize.patch #573744
+	"${FILESDIR}"/${PN}-2.4.6-link-fuse-ld.patch
+	"${FILESDIR}"/${PN}-2.4.6-libtoolize-slow.patch
+	"${FILESDIR}"/${PN}-2.4.6-libtoolize-delay-help.patch
+	"${FILESDIR}"/${PN}-2.4.6-sed-quote-speedup.patch #542252
+	"${FILESDIR}"/${PN}-2.4.6-ppc64le.patch #581314
+
+	"${FILESDIR}"/${PN}-2.4.6-mint.patch
+	"${FILESDIR}"/${PN}-2.2.6a-darwin-module-bundle.patch
+	"${FILESDIR}"/${PN}-2.4.6-darwin-use-linux-version.patch
+)
+
+src_prepare() {
+	if [[ ${PV} == *9999 ]] ; then
+		eapply "${FILESDIR}"/${PN}-2.4.6-pthread.patch #650876
+		./bootstrap || die
+	else
+		PATCHES+=(
+			"${FILESDIR}"/${PN}-2.4.6-pthread_bootstrapped.patch #650876
+		)
+	fi
+
+	# WARNING: File build-aux/ltmain.sh is read-only; trying to patch anyway
+	chmod +w build-aux/ltmain.sh || die
+
+	if use vanilla ; then
+		eapply_user
+		return 0
+	else
+		default
+	fi
+
+	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 ...).
+		eapply "${FILESDIR}"/${PN}-2.2.10-eprefix.patch
+		eprefixify m4/libtool.m4
+	fi
+
+	pushd libltdl >/dev/null || die
+	AT_NOELIBTOOLIZE=yes eautoreconf
+	popd >/dev/null || die
+	AT_NOELIBTOOLIZE=yes eautoreconf
+
+	# Make sure timestamps don't trigger a rebuild of man pages. #556512
+	if [[ ${PV} != *9999 ]] ; then
+		touch doc/*.1 || die
+		export HELP2MAN=false
+	fi
+}
+
+src_configure() {
+	# the libtool script uses bash code in it and at configure time, tries
+	# 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="$(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)")"
+
+	[[ ${CHOST} == *-darwin* ]] && local myconf="--program-prefix=g"
+	ECONF_SOURCE=${S} econf ${myconf} --disable-ltdl-install
+}
+
+src_install() {
+	default
+
+	local x
+	while read -d $'\0' -r x ; do
+		ln -sf "${EPREFIX}"/usr/share/gnuconfig/${x##*/} "${x}" || die
+	done < <(find "${ED}" '(' -name config.guess -o -name config.sub ')' -print0)
+}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-devel/libtool/files/, sys-devel/libtool/
@ 2023-05-29 18:21 Sam James
  0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2023-05-29 18:21 UTC (permalink / raw
  To: gentoo-commits

commit:     79b33c73e995c90c6c74c753b4bc37452ab32c2e
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon May 29 17:35:59 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon May 29 18:19:13 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79b33c73

sys-devel/libtool: drop dead prefix targets

Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-devel/libtool/files/libtool-2.4.6-mint.patch | 46 ------------------------
 sys-devel/libtool/libtool-2.4.7-r1.ebuild        |  1 -
 sys-devel/libtool/libtool-2.4.7.ebuild           |  1 -
 sys-devel/libtool/libtool-9999.ebuild            |  1 -
 4 files changed, 49 deletions(-)

diff --git a/sys-devel/libtool/files/libtool-2.4.6-mint.patch b/sys-devel/libtool/files/libtool-2.4.6-mint.patch
deleted file mode 100644
index 4fe5bcede5a3..000000000000
--- a/sys-devel/libtool/files/libtool-2.4.6-mint.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-Patch by Alan Hourihane
-
-http://bugs.gentoo.org/show_bug.cgi?id=266984
-
---- a/configure
-+++ b/configure
-@@ -5897,6 +5897,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.
---- a/libltdl/configure
-+++ b/libltdl/configure
-@@ -4782,6 +4782,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.
---- a/m4/libtool.m4
-+++ b/m4/libtool.m4
-@@ -1708,6 +1708,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-2.4.7-r1.ebuild b/sys-devel/libtool/libtool-2.4.7-r1.ebuild
index e4267e86758d..a098f7ae0b1d 100644
--- a/sys-devel/libtool/libtool-2.4.7-r1.ebuild
+++ b/sys-devel/libtool/libtool-2.4.7-r1.ebuild
@@ -41,7 +41,6 @@ PATCHES=(
 	# bug #581314
 	"${FILESDIR}"/${PN}-2.4.6-ppc64le.patch
 
-	"${FILESDIR}"/${PN}-2.4.6-mint.patch
 	"${FILESDIR}"/${PN}-2.2.6a-darwin-module-bundle.patch
 	"${FILESDIR}"/${PN}-2.4.6-darwin-use-linux-version.patch
 	"${FILESDIR}"/${PN}-2.4.7-werror-lto.patch

diff --git a/sys-devel/libtool/libtool-2.4.7.ebuild b/sys-devel/libtool/libtool-2.4.7.ebuild
index 0b10b9ee127a..8f3e8b1e3397 100644
--- a/sys-devel/libtool/libtool-2.4.7.ebuild
+++ b/sys-devel/libtool/libtool-2.4.7.ebuild
@@ -40,7 +40,6 @@ PATCHES=(
 	# bug #581314
 	"${FILESDIR}"/${PN}-2.4.6-ppc64le.patch
 
-	"${FILESDIR}"/${PN}-2.4.6-mint.patch
 	"${FILESDIR}"/${PN}-2.2.6a-darwin-module-bundle.patch
 	"${FILESDIR}"/${PN}-2.4.6-darwin-use-linux-version.patch
 )

diff --git a/sys-devel/libtool/libtool-9999.ebuild b/sys-devel/libtool/libtool-9999.ebuild
index bc4caaff6fe7..a27b9abcb010 100644
--- a/sys-devel/libtool/libtool-9999.ebuild
+++ b/sys-devel/libtool/libtool-9999.ebuild
@@ -41,7 +41,6 @@ PATCHES=(
 	# bug #581314
 	"${FILESDIR}"/${PN}-2.4.6-ppc64le.patch
 
-	"${FILESDIR}"/${PN}-2.4.6-mint.patch
 	"${FILESDIR}"/${PN}-2.2.6a-darwin-module-bundle.patch
 	"${FILESDIR}"/${PN}-2.4.6-darwin-use-linux-version.patch
 	"${FILESDIR}"/${PN}-2.4.7-grep-3.8.patch


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-05-29 18:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-28 15:19 [gentoo-commits] repo/gentoo:master commit in: sys-devel/libtool/files/, sys-devel/libtool/ Lars Wendler
  -- strict thread matches above, loose matches on Subject: below --
2023-05-29 18:21 Sam James
2017-03-23 15:10 Fabian Groffen
2016-02-13  8:54 Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox