aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2016-06-28 13:12:55 -0400
committerAnthony G. Basile <blueness@gentoo.org>2016-06-28 13:12:55 -0400
commit5b72abb9a692e3781cd70a0b479a0eb1e621bb73 (patch)
tree5372111f19b0d4fc208924025380f1f29cdcb9b9
parentmetadata: add layout.conf (diff)
downloadppc64le-5b72abb9a692e3781cd70a0b479a0eb1e621bb73.tar.gz
ppc64le-5b72abb9a692e3781cd70a0b479a0eb1e621bb73.tar.bz2
ppc64le-5b72abb9a692e3781cd70a0b479a0eb1e621bb73.zip
sys-devel/libtool: copy from tree
-rw-r--r--sys-devel/libtool/Manifest4
-rw-r--r--sys-devel/libtool/files/1.5.20/libtool-1.5.20-use-linux-version-in-fbsd.patch38
-rw-r--r--sys-devel/libtool/files/libtool-2.4.3-use-linux-version-in-fbsd.patch38
-rw-r--r--sys-devel/libtool/files/libtool-2.4.6-fuse-ld.patch53
-rw-r--r--sys-devel/libtool/files/libtool-2.4.6-libtoolize-delay-help.patch53
-rw-r--r--sys-devel/libtool/files/libtool-2.4.6-libtoolize-slow.patch118
-rw-r--r--sys-devel/libtool/files/libtool-2.4.6-link-fsanitize.patch58
-rw-r--r--sys-devel/libtool/files/libtool-2.4.6-link-fuse-ld.patch54
-rw-r--r--sys-devel/libtool/files/libtool-2.4.6-link-specs.patch57
-rw-r--r--sys-devel/libtool/files/libtool-2.4.6-sed-quote-speedup.patch268
-rw-r--r--sys-devel/libtool/libtool-2.4.2-r1.ebuild96
-rw-r--r--sys-devel/libtool/libtool-2.4.4.ebuild77
-rw-r--r--sys-devel/libtool/libtool-2.4.5.ebuild77
-rw-r--r--sys-devel/libtool/libtool-2.4.6-r1.ebuild84
-rw-r--r--sys-devel/libtool/libtool-2.4.6-r2.ebuild93
-rw-r--r--sys-devel/libtool/libtool-2.4.6.ebuild77
-rw-r--r--sys-devel/libtool/libtool-9999.ebuild81
-rw-r--r--sys-devel/libtool/metadata.xml8
18 files changed, 1334 insertions, 0 deletions
diff --git a/sys-devel/libtool/Manifest b/sys-devel/libtool/Manifest
new file mode 100644
index 0000000..ba9189f
--- /dev/null
+++ b/sys-devel/libtool/Manifest
@@ -0,0 +1,4 @@
+DIST libtool-2.4.2.tar.xz 868760 SHA256 1d7b6862c1ed162e327f083a6f78f40eae29218f0db8c38393d61dab764c4407 SHA512 34f2d4a32beb4d85cfefd9c2c4ff33b0117e9e89c6599c303a7b850c43be5ed090b2f530388b8c8154e8f3f693abd2079180dca9afc948feb800b2e009bed169 WHIRLPOOL 300697c30b6cf693463338ee3bfe10b9ccce2c496b319862182124828caf7b667a7e9cf21f287572ec1fed8abe529a14d171da2983369522faf3eed5513a1af5
+DIST libtool-2.4.4.tar.xz 957476 SHA256 a8295b5853bf82a46635c944031e84970f2aa79c19df7a0c28f3ec8e11c07f6c SHA512 1ff24aa88962e0aae82e1fff41df7863f925627a506c6a663a79afa23729272aa4e5816889dd4697d5286d42483bcee2cc7352514768f1bd28ea546476074a84 WHIRLPOOL def0381a3608b52f8f5e9b83d297643d48d3e695117199b10b4ae3d6f5b11f3d3a36c4b6572b7659061c3fee77e46da4f5e3cfffa594063fed0fe382869c3539
+DIST libtool-2.4.5.tar.xz 971620 SHA256 84aac136513b009278896ffa255e4d685bcdb0cb0e5363be36adad64c986177e SHA512 67ceb387e33fbf0ffe6df422cd26939e305a365bb22674ce064ed7f7d6602054682515b014e290c70587b7f9b6f85f00fac31d6f000b4b022daaa2b343c17327 WHIRLPOOL 4a5171a8f23d50b78eb70bbd2ff9497fe2a970933392c65c41ab44600838cdc744e4e9ddfef37ac009cf5784de8c7b1ef061f8156919b7417e78529978afe7ed
+DIST libtool-2.4.6.tar.xz 973080 SHA256 7c87a8c2c8c0fc9cd5019e402bed4292462d00a718a7cd5f11218153bf28b26f SHA512 a6eef35f3cbccf2c9e2667f44a476ebc80ab888725eb768e91a3a6c33b8c931afc46eb23efaee76c8696d3e4eed74ab1c71157bcb924f38ee912c8a90a6521a4 WHIRLPOOL f6e1ea25cc8dd853f0de53c045bcd1166cfede9cb0e890079c2c05e6cbdb5e705e137f83ba32f7e16691b9c9108e9cfb2d14ed030cea07b6eacbe3f1ae18a73b
diff --git a/sys-devel/libtool/files/1.5.20/libtool-1.5.20-use-linux-version-in-fbsd.patch b/sys-devel/libtool/files/1.5.20/libtool-1.5.20-use-linux-version-in-fbsd.patch
new file mode 100644
index 0000000..cc9d8b8
--- /dev/null
+++ b/sys-devel/libtool/files/1.5.20/libtool-1.5.20-use-linux-version-in-fbsd.patch
@@ -0,0 +1,38 @@
+Force linux-style versioning when generating shared libraries on
+Gentoo/FreeBSD hosts only.
+
+Patch by Diego Pettenò
+
+http://bugs.gentoo.org/109105
+
+--- libtool-1.5.20/libtool.m4
++++ libtool-1.5.20/libtool.m4
+@@ -1375,7 +1375,14 @@ freebsd* | dragonfly*)
+ *) objformat=elf ;;
+ esac
+ fi
+- version_type=freebsd-$objformat
++ # Handle Gentoo/FreeBSD as it was Linux
++ case $host_vendor in
++ gentoo)
++ version_type=linux ;;
++ *)
++ version_type=freebsd-$objformat ;;
++ esac
++
+ 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 @@ freebsd* | dragonfly*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
++ linux)
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ need_lib_prefix=no
++ need_version=no
++ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
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
new file mode 100644
index 0000000..8244eaa
--- /dev/null
+++ b/sys-devel/libtool/files/libtool-2.4.3-use-linux-version-in-fbsd.patch
@@ -0,0 +1,38 @@
+Force linux-style versioning when generating shared libraries on
+Gentoo/FreeBSD hosts only.
+
+Patch by Diego Elio Pettenò
+
+http://bugs.gentoo.org/109105
+
+--- a/m4/libtool.m4
++++ b/m4/libtool.m4
+@@ -1375,7 +1375,14 @@
+ *) objformat=elf ;;
+ esac
+ fi
+- version_type=freebsd-$objformat
++ # Handle Gentoo/FreeBSD as it was Linux
++ case $host_vendor in
++ gentoo)
++ version_type=linux ;;
++ *)
++ version_type=freebsd-$objformat ;;
++ esac
++
+ 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'
+ need_version=yes
+ ;;
++ linux)
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ need_lib_prefix=no
++ need_version=no
++ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
diff --git a/sys-devel/libtool/files/libtool-2.4.6-fuse-ld.patch b/sys-devel/libtool/files/libtool-2.4.6-fuse-ld.patch
new file mode 100644
index 0000000..c352d52
--- /dev/null
+++ b/sys-devel/libtool/files/libtool-2.4.6-fuse-ld.patch
@@ -0,0 +1,53 @@
+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 d5cf07a..0fc8279 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
++ # -fuse-ld=* Linker select flags for GCC
+ # -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=*| \
++ -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
+@@ -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
++ # -fuse-ld=* Linker select flags for GCC
+ # -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=*| \
++ -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-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.2-r1.ebuild b/sys-devel/libtool/libtool-2.4.2-r1.ebuild
new file mode 100644
index 0000000..7aa4d88
--- /dev/null
+++ b/sys-devel/libtool/libtool-2.4.2-r1.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2014 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 multilib-minimal
+
+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="static-libs test vanilla"
+
+RDEPEND="sys-devel/gnuconfig
+ !<sys-devel/autoconf-2.62:2.5
+ !<sys-devel/automake-1.11.1:1.11
+ !=sys-devel/libtool-2*:1.5
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20140406-r2
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ )"
+DEPEND="${RDEPEND}
+ test? ( !<sys-devel/binutils-2.20 )
+ 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
+
+ cd libltdl/m4
+ epatch "${FILESDIR}"/1.5.20/${PN}-1.5.20-use-linux-version-in-fbsd.patch #109105
+ cd ..
+ AT_NOELIBTOOLIZE=yes eautoreconf
+ cd ..
+ AT_NOELIBTOOLIZE=yes eautoreconf
+ epunt_cxx
+}
+
+multilib_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
+ ECONF_SOURCE="${S}" \
+ econf $(use_enable static-libs static)
+}
+
+multilib_src_install_all() {
+ dodoc AUTHORS ChangeLog* NEWS README THANKS TODO doc/PLATFORMS
+
+ # While the libltdl.la file is not used directly, the m4 ltdl logic
+ # keys off of its existence when searching for ltdl support. #293921
+ #use static-libs || find "${D}" -name libltdl.la -delete
+
+ # Building libtool with --disable-static will cause the installed
+ # helper to not build static objects by default. This is undesirable
+ # for crappy packages that utilize the system libtool, so undo that.
+ sed -i -e '1,/^build_old_libs=/{/^build_old_libs=/{s:=.*:=yes:}}' "${D}"/usr/bin/libtool || die
+
+ local x
+ for x in $(find "${D}" -name config.guess -o -name config.sub) ; do
+ ln -sf /usr/share/gnuconfig/${x##*/} "${x}" || die
+ done
+}
+
+pkg_preinst() {
+ preserve_old_lib /usr/$(get_libdir)/libltdl.so.3
+}
+
+pkg_postinst() {
+ preserve_old_lib_notify /usr/$(get_libdir)/libltdl.so.3
+}
diff --git a/sys-devel/libtool/libtool-2.4.4.ebuild b/sys-devel/libtool/libtool-2.4.4.ebuild
new file mode 100644
index 0000000..71a9b47
--- /dev/null
+++ b/sys-devel/libtool/libtool-2.4.4.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2015 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
+ pushd libltdl >/dev/null
+ AT_NOELIBTOOLIZE=yes eautoreconf
+ popd >/dev/null
+ AT_NOELIBTOOLIZE=yes eautoreconf
+ epunt_cxx
+}
+
+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
+ 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)
+}
diff --git a/sys-devel/libtool/libtool-2.4.5.ebuild b/sys-devel/libtool/libtool-2.4.5.ebuild
new file mode 100644
index 0000000..7b0936c
--- /dev/null
+++ b/sys-devel/libtool/libtool-2.4.5.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2015 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
+ pushd libltdl >/dev/null
+ AT_NOELIBTOOLIZE=yes eautoreconf
+ popd >/dev/null
+ AT_NOELIBTOOLIZE=yes eautoreconf
+ epunt_cxx
+}
+
+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
+ 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)
+}
diff --git a/sys-devel/libtool/libtool-2.4.6-r1.ebuild b/sys-devel/libtool/libtool-2.4.6-r1.ebuild
new file mode 100644
index 0000000..677db33
--- /dev/null
+++ b/sys-devel/libtool/libtool-2.4.6-r1.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2015 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}-fuse-ld.patch
+ 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
+ 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)
+}
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)
+}
diff --git a/sys-devel/libtool/libtool-2.4.6.ebuild b/sys-devel/libtool/libtool-2.4.6.ebuild
new file mode 100644
index 0000000..71a9b47
--- /dev/null
+++ b/sys-devel/libtool/libtool-2.4.6.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2015 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
+ pushd libltdl >/dev/null
+ AT_NOELIBTOOLIZE=yes eautoreconf
+ popd >/dev/null
+ AT_NOELIBTOOLIZE=yes eautoreconf
+ epunt_cxx
+}
+
+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
+ 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)
+}
diff --git a/sys-devel/libtool/libtool-9999.ebuild b/sys-devel/libtool/libtool-9999.ebuild
new file mode 100644
index 0000000..8b6ede5
--- /dev/null
+++ b/sys-devel/libtool/libtool-9999.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2014 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"
+
+RDEPEND="sys-devel/gnuconfig
+ >=sys-devel/autoconf-2.69
+ >=sys-devel/automake-1.13"
+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
+ 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
+ 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)
+}
diff --git a/sys-devel/libtool/metadata.xml b/sys-devel/libtool/metadata.xml
new file mode 100644
index 0000000..56c1244
--- /dev/null
+++ b/sys-devel/libtool/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>