Import Debian changes 2.4.6-ok1

libtool (2.4.6-ok1) yangtze; urgency=medium

  * Build for openKylin.
This commit is contained in:
openKylinBot 2022-04-25 22:03:04 +08:00
parent fc19e034eb
commit dd68ce8d2a
50 changed files with 3743 additions and 0 deletions

25
debian/README.Debian vendored Normal file
View File

@ -0,0 +1,25 @@
GNU Libtool
-----------
This is the Debian package of GNU Libtool.
You do not need this package to compile software that uses Libtool,
that software will use an included copy of the libtool script it was
developed with. Of course if you are developing or maintaining such
software this is the package for you.
If you are developing software that still uses Autoconf 2.13 you will
be unable to use this version of Libtool. It is strongly recommended
that you update the software to use Autoconf 2.5x. If that is not
possible you will need to install the deprecated GNU Libtool 1.4
release available in Debian as the 'libtool1.4' package.
GNU Libtool is split into four different Debian packages:
libtool Contains the libtool script and autotools files.
libtool-doc Contains the libtool documentation.
libltdl3 Contains the libltdl runtime library.
libltdl3-dev Contains the libltdl headers and static library.
-- Scott James Remnant <scott@netsplit.com>, Wed, 30 Jul 2003 21:46:01 +0100

5
debian/changelog vendored Normal file
View File

@ -0,0 +1,5 @@
libtool (2.4.6-ok1) yangtze; urgency=medium
* Build for openKylin.
-- openKylinBot <openKylinBot@openkylin.com> Mon, 25 Apr 2022 22:03:04 +0800

124
debian/control vendored Normal file
View File

@ -0,0 +1,124 @@
Source: libtool
Build-Depends: debhelper-compat (= 12),
file,
gfortran | fortran95-compiler,
automake (>= 1:1.14.1-0),
autoconf (>= 2.69-0),
autotools-dev,
help2man,
texinfo,
zlib1g-dev,
gnulib,
libltdl-dev <!nocheck>
Build-Conflicts: automake1.9, gcj-jdk
Section: devel
Priority: optional
Maintainer: Alastair McKinstry <mckinstry@debian.org>
Standards-Version: 4.5.0
Rules-Requires-Root: no
Homepage: https://www.gnu.org/software/libtool/
Vcs-Browser: https://salsa.debian.org:/mckinstry/libtool.git
Vcs-Git: https://salsa.debian.org:/mckinstry/libtool.git
Package: libtool
Architecture: all
Multi-Arch: foreign
Section: devel
Depends: gcc | c-compiler, cpp, libc6-dev | libc-dev,
file,
autotools-dev,
${misc:Depends}
Suggests: libtool-doc, autoconf (>> 2.50), automaken, gfortran | fortran95-compiler, gcj-jdk
Conflicts: autoconf (<= 2.12), automake (<= 1.3), libtool1.4
Recommends: libltdl-dev
Description: Generic library support script
This is GNU libtool, a generic library support script. Libtool hides
the complexity of generating special library types (such as shared
libraries) behind a consistent interface. To use libtool, add the
new generic library building commands to your Makefile, Makefile.in,
or Makefile.am. See the documentation for details. Libtool supports
building static libraries on all platforms.
.
Libtool supports generation of C, C++, Fortran and Java libraries.
Package: libtool-bin
Architecture: any
Section: devel
Depends: libtool (>= ${source:Version}), ${misc:Depends}
Replaces: libtool (<< 2.4.2-0)
Description: Generic library support script (libtool binary)
This is GNU libtool, a generic library support script. Libtool hides
the complexity of generating special library types (such as shared
libraries) behind a consistent interface. To use libtool, add the
new generic library building commands to your Makefile, Makefile.in,
or Makefile.am. See the documentation for details. Libtool supports
building static libraries on all platforms.
.
Libtool supports generation of C, C++, Fortran and Java libraries.
.
This package contains the libtool binary only.
Package: libtool-doc
Architecture: all
Multi-Arch: foreign
Section: doc
Depends: ${misc:Depends}
Breaks: libtool (<< 2.4.6-0)
Replaces: libtool (<< 2.4.6-0)
Conflicts: libtool1.4-doc
Description: Generic library support script
This package contains the GNU libtool documentation.
.
GNU libtool is generic library support script. Libtool hides
the complexity of generating special library types (such as shared
libraries) behind a consistent interface. To use libtool, add the
new generic library building commands to your Makefile, Makefile.in,
or Makefile.am. See the documentation for details. Libtool supports
building static libraries on all platforms.
Package: libltdl7
Architecture: any
Multi-Arch: same
Section: libs
Pre-Depends: ${misc:Pre-Depends}
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: System independent dlopen wrapper for GNU libtool
This package contains the run-time libltdl library.
.
A small library that aims at hiding the various difficulties of
dlopening libraries from programmers. It is a system independent
dlopen wrapper for GNU libtool.
.
It supports the following dlopen interfaces:
* dlopen (Solaris, Linux and various BSD flavors)
* shl_load (HP-UX)
* LoadLibrary (Win16 and Win32)
* load_add_on (BeOS)
* GNU DLD (emulates dynamic linking for static libraries)
* libtool's dlpreopen
Package: libltdl-dev
Architecture: any
Multi-Arch: same
Section: libdevel
Suggests: libtool-doc
Recommends: libtool
Conflicts: libtool (<< 1.5.20), libtool1.4, libltdl3-dev, libltdl7-dev
Replaces: libtool (<< 1.5.20), libltdl3-dev, libltdl7-dev
Provides: libltdl3-dev, libltdl7-dev
Depends: libltdl7 (= ${binary:Version}), ${misc:Depends}, ${automake}
Description: System independent dlopen wrapper for GNU libtool
This package contains the header files and static libraries for the
libltdl package.
.
A small library that aims at hiding the various difficulties of
dlopening libraries from programmers. It is a system independent
dlopen wrapper for GNU libtool.
.
It supports the following dlopen interfaces:
* dlopen (Solaris, Linux and various BSD flavors)
* shl_load (HP-UX)
* LoadLibrary (Win16 and Win32)
* load_add_on (BeOS)
* GNU DLD (emulates dynamic linking for static libraries)
* libtool's dlpreopen

54
debian/copyright vendored Normal file
View File

@ -0,0 +1,54 @@
This is the Debian package of GNU Libtool.
The Debian package is currently maintained by Kurt Roeckx <kurt@roeckx.be>
libtool is:
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
Free Software Foundation, Inc.
Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
Additional information about Libtool is available at:
http://www.gnu.org/software/libtool/
The upstream sources were obtained from:
ftp://ftp.gnu.org/pub/gnu/libtool/
License:
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
As a special exception to the GNU General Public License, if you
distribute this file as part of a program that contains a
configuration script generated by Autoconf, you may include it under
the same distribution terms that you use for the rest of that program.
On Debian GNU/Linux systems, the complete text of the GNU General Public
License can be found in `/usr/share/common-licenses/GPL'.
The documentation is:
Copyright (C) 1996-2009 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
Texts. A copy of the license is included in the section entitled "GNU
Free Documentation License".
On Debian GNU/Linux systems, the complete text of the GNU
Free Documentation License can be found in
`/usr/share/common-licenses/GFDL'.

25
debian/libltdl-dev.install vendored Normal file
View File

@ -0,0 +1,25 @@
usr/include
usr/lib/*/libltdl.la
usr/lib/*/libltdl.so
usr/lib/*/libltdl.a
usr/share/aclocal/ltdl.m4
usr/share/libtool/aclocal.m4
usr/share/libtool/config-h.in
usr/share/libtool/configure
usr/share/libtool/configure.ac
usr/share/libtool/COPYING.LIB
usr/share/libtool/libltdl/*
usr/share/libtool/loaders/*
usr/share/libtool/lt__alloc.c
usr/share/libtool/lt__argz.c
usr/share/libtool/lt__dirent.c
usr/share/libtool/ltdl.c
usr/share/libtool/ltdl.h
usr/share/libtool/lt_dlloader.c
usr/share/libtool/ltdl.mk
usr/share/libtool/lt_error.c
usr/share/libtool/lt__strl.c
usr/share/libtool/Makefile.am
usr/share/libtool/Makefile.in
usr/share/libtool/README
usr/share/libtool/slist.c

2
debian/libltdl-dev.lintian-overrides vendored Normal file
View File

@ -0,0 +1,2 @@
# the whole libltdl source is included, including the COPYING.LIB
libltdl-dev binary: extra-license-file

2
debian/libltdl7.docs vendored Normal file
View File

@ -0,0 +1,2 @@
libltdl/README
NEWS

1
debian/libltdl7.install vendored Normal file
View File

@ -0,0 +1 @@
usr/lib/*/libltdl.so.*

2
debian/libtool-bin.install vendored Normal file
View File

@ -0,0 +1,2 @@
usr/bin/libtool
usr/share/man/man1/libtool.*

9
debian/libtool-doc.doc-base vendored Normal file
View File

@ -0,0 +1,9 @@
Document: libtool-doc
Title: Libtool Documentation
Author: The GNU Libtool Team
Abstract: Portable shared library support for source code packages
Section: Programming
Format: HTML
Index: /usr/share/doc/libtool-doc/libtool.html
Files: /usr/share/doc/libtool-doc/*.html

6
debian/libtool-doc.docs vendored Normal file
View File

@ -0,0 +1,6 @@
README
AUTHORS
THANKS
NEWS
TODO
doc/libtool.html

1
debian/libtool-doc.examples vendored Normal file
View File

@ -0,0 +1 @@
#*demo.tar.gz

1
debian/libtool-doc.install vendored Normal file
View File

@ -0,0 +1 @@
usr/share/info/libtool.info*

9
debian/libtool.install vendored Normal file
View File

@ -0,0 +1,9 @@
usr/bin/libtoolize
usr/share/libtool/build-aux/*
usr/share/aclocal/ltargz.m4
usr/share/aclocal/ltversion.m4
usr/share/aclocal/lt~obsolete.m4
usr/share/aclocal/libtool.m4
usr/share/aclocal/ltoptions.m4
usr/share/aclocal/ltsugar.m4
usr/share/man/man1/libtoolize.*

63
debian/orig vendored Normal file
View File

@ -0,0 +1,63 @@
#!/bin/sh
# (c) 2000-2007 Piotr Roszatycki <dexter@debian.org> GPL
# This utility downloads upstream's source and
# generates source package
set -e
if [ -f changelog ]; then
cd ..
elif [ ! -f debian/changelog ]; then
echo "can't find changelog file"
exit 1
fi
SRCNAME=libtool
#SRCVERSION=2.1a
tmpdir=debsource-$SRCNAME
debdir=`pwd`
cd ..
rm -rf $tmpdir
mkdir $tmpdir
cd $tmpdir
echo "N: Downloading CVS snapshot..."
cvs -z3 -d :pserver:anonymous@cvs.sv.gnu.org:/sources/libtool co libtool
cd libtool
cvs up -dP
find -name CVS -print0 -o -name .cvsignore -print0 | xargs -0 rm -rf
#AUTOMAKE=automake-1.10 ./bootstrap
#find -name autom4te.cache -print0 | xargs -0 rm -rf
upsrcver=`grep ^AC_INIT configure.ac | sed 's/.[libtool]//; s/[^[]*\[//; s/].*//'`
upsrcrev=`libltdl/config/mkstamp < ChangeLog | awk '{ print $1 }'`
upsrcdate=`libltdl/config/mkstamp < ChangeLog | awk '{ print $2 }' | tr -d '/'`
srcversion="$upsrcver+cvs$upsrcrev+$upsrcdate"
srcdir=${SRCNAME}-`echo $srcversion | sed -e 's/.*://'`
srcorig=${SRCNAME}_`echo $srcversion | sed -e 's/.*://'`.orig.tar.gz
echo "N: Creating archive $srcorig..."
cd ..
mv libtool $srcdir
tar zcf ../$srcorig $srcdir
cd ..
rm -rf $tmpdir
echo "N: Done."

View File

@ -0,0 +1,37 @@
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 01/20] 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"
--
2.7.0.rc3

View File

@ -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 03/20] 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/bootstrap b/bootstrap
index 4596413..17fb169 100755
--- a/bootstrap
+++ b/bootstrap
@@ -2472,29 +2472,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,
@@ -2505,11 +2517,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.7.0.rc3

View File

@ -0,0 +1,235 @@
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/bootstrap b/bootstrap
index c179f51d..fe9e9cac 100755
--- a/bootstrap
+++ b/bootstrap
@@ -230,7 +230,7 @@ vc_ignore=
# Source required external libraries:
# 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
@@ -1257,6 +1257,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.
@@ -1273,12 +1324,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
diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
index 0c40da06..24acefd5 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/build-aux/funclib.sh b/build-aux/funclib.sh
index 39d972ed..47d8b95a 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
--
2.11.0

View File

@ -0,0 +1,755 @@
From 16dbc070d32e6d4601cb5878dfdf69f2e29c84e1 Mon Sep 17 00:00:00 2001
From: Pavel Raiskup <praiskup@redhat.com>
Date: Mon, 5 Oct 2015 13:16:08 +0200
Subject: [PATCH] libtool: optimizing options-parser hooks
Its not necessary to (re)func_quote_for_eval in each function in
the hook hierarchy. Usually it is enough if the leaf function
does func_quote_for_eval and its caller just re-uses the
<CALLEE>_return variable.
This is follow up for the previous commit.
* gl/build-aux/options-parser (func_run_hooks): Propagate
$EXIT_SUCCESS return code down to caller if *any* hook succeeded.
Never re-quote the result -- either the arguments are left
untouched, or the options have already been properly quoted by
succeeding hooks.
(func_parse_options): Quote '$@' and return $EXIT_SUCCESS only if
we changed something.
(func_validate_options): Likewise.
(func_options_prep): Likewise.
(func_options_finish): New hook-caller for 'func_options' hooks.
(func_options): Propagate return value down to top-level caller,
but pay attention we have always set $func_options_result.
* build-aux/ltmain.in (libtool_options_prep): Quote '$@' and
return $EXIT_SUCCESS only if we changed something.
(libtool_parse_options): Likewise.
* bootstrap: Sync gl/build-aux/with option-parser.
---
bootstrap | 171 +++++++++++++++++++++++++++++++-------------
build-aux/ltmain.in | 35 ++++++---
gl/build-aux/options-parser | 171 +++++++++++++++++++++++++++++++-------------
3 files changed, 271 insertions(+), 106 deletions(-)
diff --git a/bootstrap b/bootstrap
index fe9e9cac..4f000965 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1583,7 +1583,7 @@ func_lt_ver ()
#! /bin/sh
# Set a version string for this script.
-scriptversion=2014-01-07.03; # UTC
+scriptversion=2015-10-07.11; # UTC
# A portable, pluggable option parser for Bourne shell.
# Written by Gary V. Vaughan, 2010
@@ -1743,6 +1743,8 @@ func_run_hooks ()
{
$debug_cmd
+ _G_rc_run_hooks=false
+
case " $hookable_fns " in
*" $1 "*) ;;
*) func_fatal_error "'$1' does not support hook funcions.n" ;;
@@ -1751,16 +1753,16 @@ func_run_hooks ()
eval _G_hook_fns=\$$1_hooks; shift
for _G_hook in $_G_hook_fns; do
- eval $_G_hook '"$@"'
-
- # store returned options list back into positional
- # parameters for next 'cmd' execution.
- eval _G_hook_result=\$${_G_hook}_result
- eval set dummy "$_G_hook_result"; shift
+ if eval $_G_hook '"$@"'; then
+ # store returned options list back into positional
+ # parameters for next 'cmd' execution.
+ eval _G_hook_result=\$${_G_hook}_result
+ eval set dummy "$_G_hook_result"; shift
+ _G_rc_run_hooks=:
+ fi
done
- func_quote_for_eval ${1+"$@"}
- func_run_hooks_result=$func_quote_for_eval_result
+ $_G_rc_run_hooks && func_run_hooks_result=$_G_hook_result
}
@@ -1770,10 +1772,16 @@ func_run_hooks ()
## --------------- ##
# In order to add your own option parsing hooks, you must accept the
-# full positional parameter list in your hook function, remove any
-# options that you action, and then pass back the remaining unprocessed
+# full positional parameter list in your hook function, you may remove/edit
+# any options that you action, and then pass back the remaining unprocessed
# options in '<hooked_function_name>_result', escaped suitably for
-# 'eval'. Like this:
+# 'eval'. In this case you also must return $EXIT_SUCCESS to let the
+# hook's caller know that it should pay attention to
+# '<hooked_function_name>_result'. Returning $EXIT_FAILURE signalizes that
+# arguments are left untouched by the hook and therefore caller will ignore the
+# result variable.
+#
+# Like this:
#
# my_options_prep ()
# {
@@ -1783,9 +1791,11 @@ func_run_hooks ()
# usage_message=$usage_message'
# -s, --silent don'\''t print informational messages
# '
-#
-# func_quote_for_eval ${1+"$@"}
-# my_options_prep_result=$func_quote_for_eval_result
+# # No change in '$@' (ignored completely by this hook). There is
+# # no need to do the equivalent (but slower) action:
+# # func_quote_for_eval ${1+"$@"}
+# # my_options_prep_result=$func_quote_for_eval_result
+# false
# }
# func_add_hook func_options_prep my_options_prep
#
@@ -1794,25 +1804,37 @@ func_run_hooks ()
# {
# $debug_cmd
#
+# args_changed=false
+#
# # Note that for efficiency, we parse as many options as we can
# # recognise in a loop before passing the remainder back to the
# # caller on the first unrecognised argument we encounter.
# while test $# -gt 0; do
# opt=$1; shift
# case $opt in
-# --silent|-s) opt_silent=: ;;
+# --silent|-s) opt_silent=:
+# args_changed=:
+# ;;
# # Separate non-argument short options:
# -s*) func_split_short_opt "$_G_opt"
# set dummy "$func_split_short_opt_name" \
# "-$func_split_short_opt_arg" ${1+"$@"}
# shift
+# args_changed=:
# ;;
-# *) set dummy "$_G_opt" "$*"; shift; break ;;
+# *) # Make sure the first unrecognised option "$_G_opt"
+# # is added back to "$@", we could need that later
+# # if $args_changed is true.
+# set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
# esac
# done
#
-# func_quote_for_eval ${1+"$@"}
-# my_silent_option_result=$func_quote_for_eval_result
+# if $args_changed; then
+# func_quote_for_eval ${1+"$@"}
+# my_silent_option_result=$func_quote_for_eval_result
+# fi
+#
+# $args_changed
# }
# func_add_hook func_parse_options my_silent_option
#
@@ -1824,16 +1846,32 @@ func_run_hooks ()
# $opt_silent && $opt_verbose && func_fatal_help "\
# '--silent' and '--verbose' options are mutually exclusive."
#
-# func_quote_for_eval ${1+"$@"}
-# my_option_validation_result=$func_quote_for_eval_result
+# false
# }
# func_add_hook func_validate_options my_option_validation
#
-# You'll alse need to manually amend $usage_message to reflect the extra
+# You'll also need to manually amend $usage_message to reflect the extra
# options you parse. It's preferable to append if you can, so that
# multiple option parsing hooks can be added safely.
+# func_options_finish [ARG]...
+# ----------------------------
+# Finishing the option parse loop (call 'func_options' hooks ATM).
+func_options_finish ()
+{
+ $debug_cmd
+
+ _G_func_options_finish_exit=false
+ if func_run_hooks func_options ${1+"$@"}; then
+ func_options_finish_result=$func_run_hooks_result
+ _G_func_options_finish_exit=:
+ fi
+
+ $_G_func_options_finish_exit
+}
+
+
# func_options [ARG]...
# ---------------------
# All the functions called inside func_options are hookable. See the
@@ -1843,17 +1881,28 @@ func_options ()
{
$debug_cmd
- func_options_prep ${1+"$@"}
- eval func_parse_options \
- ${func_options_prep_result+"$func_options_prep_result"}
- eval func_validate_options \
- ${func_parse_options_result+"$func_parse_options_result"}
+ _G_rc_options=false
- eval func_run_hooks func_options \
- ${func_validate_options_result+"$func_validate_options_result"}
+ for my_func in options_prep parse_options validate_options options_finish
+ do
+ if eval func_$my_func '${1+"$@"}'; then
+ eval _G_res_var='$'"func_${my_func}_result"
+ eval set dummy "$_G_res_var" ; shift
+ _G_rc_options=:
+ fi
+ done
- # save modified positional parameters for caller
- func_options_result=$func_run_hooks_result
+ # Save modified positional parameters for caller. As a top-level
+ # options-parser function we always need to set the 'func_options_result'
+ # variable (regardless the $_G_rc_options value).
+ if $_G_rc_options; then
+ func_options_result=$_G_res_var
+ else
+ func_quote_for_eval ${1+"$@"}
+ func_options_result=$func_quote_for_eval_result
+ fi
+
+ $_G_rc_options
}
@@ -1862,9 +1911,9 @@ func_options ()
# All initialisations required before starting the option parse loop.
# Note that when calling hook functions, we pass through the list of
# positional parameters. If a hook function modifies that list, and
-# needs to propogate that back to rest of this script, then the complete
+# needs to propagate that back to rest of this script, then the complete
# modified list must be put in 'func_run_hooks_result' before
-# returning.
+# returning $EXIT_SUCCESS (otherwise $EXIT_FAILURE is returned).
func_hookable func_options_prep
func_options_prep ()
{
@@ -1874,10 +1923,14 @@ func_options_prep ()
opt_verbose=false
opt_warning_types=
- func_run_hooks func_options_prep ${1+"$@"}
+ _G_rc_options_prep=false
+ if func_run_hooks func_options_prep ${1+"$@"}; then
+ _G_rc_options_prep=:
+ # save modified positional parameters for caller
+ func_options_prep_result=$func_run_hooks_result
+ fi
- # save modified positional parameters for caller
- func_options_prep_result=$func_run_hooks_result
+ $_G_rc_options_prep
}
@@ -1891,18 +1944,20 @@ func_parse_options ()
func_parse_options_result=
+ _G_rc_parse_options=false
# this just eases exit handling
while test $# -gt 0; do
# Defer to hook functions for initial option parsing, so they
# get priority in the event of reusing an option name.
- func_run_hooks func_parse_options ${1+"$@"}
-
- # Adjust func_parse_options positional parameters to match
- eval set dummy "$func_run_hooks_result"; shift
+ if func_run_hooks func_parse_options ${1+"$@"}; then
+ eval set dummy "$func_run_hooks_result"; shift
+ _G_rc_parse_options=:
+ fi
# Break out of the loop if we already parsed every option.
test $# -gt 0 || break
+ _G_match_parse_options=:
_G_opt=$1
shift
case $_G_opt in
@@ -1917,7 +1972,10 @@ func_parse_options ()
;;
--warnings|--warning|-W)
- test $# = 0 && func_missing_arg $_G_opt && break
+ if test $# = 0 && func_missing_arg $_G_opt; then
+ _G_rc_parse_options=:
+ break
+ fi
case " $warning_categories $1" in
*" $1 "*)
# trailing space prevents matching last $1 above
@@ -1970,15 +2028,25 @@ func_parse_options ()
shift
;;
- --) break ;;
+ --) _G_rc_parse_options=: ; break ;;
-*) func_fatal_help "unrecognised option: '$_G_opt'" ;;
- *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
+ *) set dummy "$_G_opt" ${1+"$@"}; shift
+ _G_match_parse_options=false
+ break
+ ;;
esac
+
+ $_G_match_parse_options && _G_rc_parse_options=:
done
- # save modified positional parameters for caller
- func_quote_for_eval ${1+"$@"}
- func_parse_options_result=$func_quote_for_eval_result
+
+ if $_G_rc_parse_options; then
+ # save modified positional parameters for caller
+ func_quote_for_eval ${1+"$@"}
+ func_parse_options_result=$func_quote_for_eval_result
+ fi
+
+ $_G_rc_parse_options
}
@@ -1991,16 +2059,21 @@ func_validate_options ()
{
$debug_cmd
+ _G_rc_validate_options=false
+
# Display all warnings if -W was not given.
test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
- func_run_hooks func_validate_options ${1+"$@"}
+ if func_run_hooks func_validate_options ${1+"$@"}; then
+ # save modified positional parameters for caller
+ func_validate_options_result=$func_run_hooks_result
+ _G_rc_validate_options=:
+ fi
# Bail if the options were screwed!
$exit_cmd $EXIT_FAILURE
- # save modified positional parameters for caller
- func_validate_options_result=$func_run_hooks_result
+ $_G_rc_validate_options
}
diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
index 24acefd5..b4c6bcd6 100644
--- a/build-aux/ltmain.in
+++ b/build-aux/ltmain.in
@@ -358,6 +358,8 @@ libtool_options_prep ()
nonopt=
preserve_args=
+ _G_rc_lt_options_prep=:
+
# Shorthand for --mode=foo, only valid as the first argument
case $1 in
clean|clea|cle|cl)
@@ -381,11 +383,18 @@ libtool_options_prep ()
uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
shift; set dummy --mode uninstall ${1+"$@"}; shift
;;
+ *)
+ _G_rc_lt_options_prep=false
+ ;;
esac
- # Pass back the list of options.
- func_quote_for_eval ${1+"$@"}
- libtool_options_prep_result=$func_quote_for_eval_result
+ if $_G_rc_lt_options_prep; then
+ # Pass back the list of options.
+ func_quote_for_eval ${1+"$@"}
+ libtool_options_prep_result=$func_quote_for_eval_result
+ fi
+
+ $_G_rc_lt_options_prep
}
func_add_hook func_options_prep libtool_options_prep
@@ -397,9 +406,12 @@ libtool_parse_options ()
{
$debug_cmd
+ _G_rc_lt_parse_options=false
+
# Perform our own loop to consume as many options as possible in
# each iteration.
while test $# -gt 0; do
+ _G_match_lt_parse_options=:
_G_opt=$1
shift
case $_G_opt in
@@ -474,15 +486,22 @@ libtool_parse_options ()
func_append preserve_args " $_G_opt"
;;
- # An option not handled by this hook function:
- *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
+ # An option not handled by this hook function:
+ *) set dummy "$_G_opt" ${1+"$@"} ; shift
+ _G_match_lt_parse_options=false
+ break
+ ;;
esac
+ $_G_match_lt_parse_options && _G_rc_lt_parse_options=:
done
+ if $_G_rc_lt_parse_options; then
+ # save modified positional parameters for caller
+ func_quote_for_eval ${1+"$@"}
+ libtool_parse_options_result=$func_quote_for_eval_result
+ fi
- # save modified positional parameters for caller
- func_quote_for_eval ${1+"$@"}
- libtool_parse_options_result=$func_quote_for_eval_result
+ $_G_rc_lt_parse_options
}
func_add_hook func_parse_options libtool_parse_options
diff --git a/build-aux/options-parser b/build-aux/options-parser
index d651f1d7..4c7e9cba 100644
--- a/build-aux/options-parser
+++ b/build-aux/options-parser
@@ -1,7 +1,7 @@
#! /bin/sh
# Set a version string for this script.
-scriptversion=2014-01-07.03; # UTC
+scriptversion=2015-10-07.11; # UTC
# A portable, pluggable option parser for Bourne shell.
# Written by Gary V. Vaughan, 2010
@@ -161,6 +161,8 @@ func_run_hooks ()
{
$debug_cmd
+ _G_rc_run_hooks=false
+
case " $hookable_fns " in
*" $1 "*) ;;
*) func_fatal_error "'$1' does not support hook funcions.n" ;;
@@ -169,16 +171,16 @@ func_run_hooks ()
eval _G_hook_fns=\$$1_hooks; shift
for _G_hook in $_G_hook_fns; do
- eval $_G_hook '"$@"'
-
- # store returned options list back into positional
- # parameters for next 'cmd' execution.
- eval _G_hook_result=\$${_G_hook}_result
- eval set dummy "$_G_hook_result"; shift
+ if eval $_G_hook '"$@"'; then
+ # store returned options list back into positional
+ # parameters for next 'cmd' execution.
+ eval _G_hook_result=\$${_G_hook}_result
+ eval set dummy "$_G_hook_result"; shift
+ _G_rc_run_hooks=:
+ fi
done
- func_quote_for_eval ${1+"$@"}
- func_run_hooks_result=$func_quote_for_eval_result
+ $_G_rc_run_hooks && func_run_hooks_result=$_G_hook_result
}
@@ -188,10 +190,16 @@ func_run_hooks ()
## --------------- ##
# In order to add your own option parsing hooks, you must accept the
-# full positional parameter list in your hook function, remove any
-# options that you action, and then pass back the remaining unprocessed
+# full positional parameter list in your hook function, you may remove/edit
+# any options that you action, and then pass back the remaining unprocessed
# options in '<hooked_function_name>_result', escaped suitably for
-# 'eval'. Like this:
+# 'eval'. In this case you also must return $EXIT_SUCCESS to let the
+# hook's caller know that it should pay attention to
+# '<hooked_function_name>_result'. Returning $EXIT_FAILURE signalizes that
+# arguments are left untouched by the hook and therefore caller will ignore the
+# result variable.
+#
+# Like this:
#
# my_options_prep ()
# {
@@ -201,9 +209,11 @@ func_run_hooks ()
# usage_message=$usage_message'
# -s, --silent don'\''t print informational messages
# '
-#
-# func_quote_for_eval ${1+"$@"}
-# my_options_prep_result=$func_quote_for_eval_result
+# # No change in '$@' (ignored completely by this hook). There is
+# # no need to do the equivalent (but slower) action:
+# # func_quote_for_eval ${1+"$@"}
+# # my_options_prep_result=$func_quote_for_eval_result
+# false
# }
# func_add_hook func_options_prep my_options_prep
#
@@ -212,25 +222,37 @@ func_run_hooks ()
# {
# $debug_cmd
#
+# args_changed=false
+#
# # Note that for efficiency, we parse as many options as we can
# # recognise in a loop before passing the remainder back to the
# # caller on the first unrecognised argument we encounter.
# while test $# -gt 0; do
# opt=$1; shift
# case $opt in
-# --silent|-s) opt_silent=: ;;
+# --silent|-s) opt_silent=:
+# args_changed=:
+# ;;
# # Separate non-argument short options:
# -s*) func_split_short_opt "$_G_opt"
# set dummy "$func_split_short_opt_name" \
# "-$func_split_short_opt_arg" ${1+"$@"}
# shift
+# args_changed=:
# ;;
-# *) set dummy "$_G_opt" "$*"; shift; break ;;
+# *) # Make sure the first unrecognised option "$_G_opt"
+# # is added back to "$@", we could need that later
+# # if $args_changed is true.
+# set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
# esac
# done
#
-# func_quote_for_eval ${1+"$@"}
-# my_silent_option_result=$func_quote_for_eval_result
+# if $args_changed; then
+# func_quote_for_eval ${1+"$@"}
+# my_silent_option_result=$func_quote_for_eval_result
+# fi
+#
+# $args_changed
# }
# func_add_hook func_parse_options my_silent_option
#
@@ -242,16 +264,32 @@ func_run_hooks ()
# $opt_silent && $opt_verbose && func_fatal_help "\
# '--silent' and '--verbose' options are mutually exclusive."
#
-# func_quote_for_eval ${1+"$@"}
-# my_option_validation_result=$func_quote_for_eval_result
+# false
# }
# func_add_hook func_validate_options my_option_validation
#
-# You'll alse need to manually amend $usage_message to reflect the extra
+# You'll also need to manually amend $usage_message to reflect the extra
# options you parse. It's preferable to append if you can, so that
# multiple option parsing hooks can be added safely.
+# func_options_finish [ARG]...
+# ----------------------------
+# Finishing the option parse loop (call 'func_options' hooks ATM).
+func_options_finish ()
+{
+ $debug_cmd
+
+ _G_func_options_finish_exit=false
+ if func_run_hooks func_options ${1+"$@"}; then
+ func_options_finish_result=$func_run_hooks_result
+ _G_func_options_finish_exit=:
+ fi
+
+ $_G_func_options_finish_exit
+}
+
+
# func_options [ARG]...
# ---------------------
# All the functions called inside func_options are hookable. See the
@@ -261,17 +299,28 @@ func_options ()
{
$debug_cmd
- func_options_prep ${1+"$@"}
- eval func_parse_options \
- ${func_options_prep_result+"$func_options_prep_result"}
- eval func_validate_options \
- ${func_parse_options_result+"$func_parse_options_result"}
+ _G_rc_options=false
- eval func_run_hooks func_options \
- ${func_validate_options_result+"$func_validate_options_result"}
+ for my_func in options_prep parse_options validate_options options_finish
+ do
+ if eval func_$my_func '${1+"$@"}'; then
+ eval _G_res_var='$'"func_${my_func}_result"
+ eval set dummy "$_G_res_var" ; shift
+ _G_rc_options=:
+ fi
+ done
- # save modified positional parameters for caller
- func_options_result=$func_run_hooks_result
+ # Save modified positional parameters for caller. As a top-level
+ # options-parser function we always need to set the 'func_options_result'
+ # variable (regardless the $_G_rc_options value).
+ if $_G_rc_options; then
+ func_options_result=$_G_res_var
+ else
+ func_quote_for_eval ${1+"$@"}
+ func_options_result=$func_quote_for_eval_result
+ fi
+
+ $_G_rc_options
}
@@ -280,9 +329,9 @@ func_options ()
# All initialisations required before starting the option parse loop.
# Note that when calling hook functions, we pass through the list of
# positional parameters. If a hook function modifies that list, and
-# needs to propogate that back to rest of this script, then the complete
+# needs to propagate that back to rest of this script, then the complete
# modified list must be put in 'func_run_hooks_result' before
-# returning.
+# returning $EXIT_SUCCESS (otherwise $EXIT_FAILURE is returned).
func_hookable func_options_prep
func_options_prep ()
{
@@ -292,10 +341,14 @@ func_options_prep ()
opt_verbose=false
opt_warning_types=
- func_run_hooks func_options_prep ${1+"$@"}
+ _G_rc_options_prep=false
+ if func_run_hooks func_options_prep ${1+"$@"}; then
+ _G_rc_options_prep=:
+ # save modified positional parameters for caller
+ func_options_prep_result=$func_run_hooks_result
+ fi
- # save modified positional parameters for caller
- func_options_prep_result=$func_run_hooks_result
+ $_G_rc_options_prep
}
@@ -309,18 +362,20 @@ func_parse_options ()
func_parse_options_result=
+ _G_rc_parse_options=false
# this just eases exit handling
while test $# -gt 0; do
# Defer to hook functions for initial option parsing, so they
# get priority in the event of reusing an option name.
- func_run_hooks func_parse_options ${1+"$@"}
-
- # Adjust func_parse_options positional parameters to match
- eval set dummy "$func_run_hooks_result"; shift
+ if func_run_hooks func_parse_options ${1+"$@"}; then
+ eval set dummy "$func_run_hooks_result"; shift
+ _G_rc_parse_options=:
+ fi
# Break out of the loop if we already parsed every option.
test $# -gt 0 || break
+ _G_match_parse_options=:
_G_opt=$1
shift
case $_G_opt in
@@ -335,7 +390,10 @@ func_parse_options ()
;;
--warnings|--warning|-W)
- test $# = 0 && func_missing_arg $_G_opt && break
+ if test $# = 0 && func_missing_arg $_G_opt; then
+ _G_rc_parse_options=:
+ break
+ fi
case " $warning_categories $1" in
*" $1 "*)
# trailing space prevents matching last $1 above
@@ -388,15 +446,25 @@ func_parse_options ()
shift
;;
- --) break ;;
+ --) _G_rc_parse_options=: ; break ;;
-*) func_fatal_help "unrecognised option: '$_G_opt'" ;;
- *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
+ *) set dummy "$_G_opt" ${1+"$@"}; shift
+ _G_match_parse_options=false
+ break
+ ;;
esac
+
+ $_G_match_parse_options && _G_rc_parse_options=:
done
- # save modified positional parameters for caller
- func_quote_for_eval ${1+"$@"}
- func_parse_options_result=$func_quote_for_eval_result
+
+ if $_G_rc_parse_options; then
+ # save modified positional parameters for caller
+ func_quote_for_eval ${1+"$@"}
+ func_parse_options_result=$func_quote_for_eval_result
+ fi
+
+ $_G_rc_parse_options
}
@@ -409,16 +477,21 @@ func_validate_options ()
{
$debug_cmd
+ _G_rc_validate_options=false
+
# Display all warnings if -W was not given.
test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
- func_run_hooks func_validate_options ${1+"$@"}
+ if func_run_hooks func_validate_options ${1+"$@"}; then
+ # save modified positional parameters for caller
+ func_validate_options_result=$func_run_hooks_result
+ _G_rc_validate_options=:
+ fi
# Bail if the options were screwed!
$exit_cmd $EXIT_FAILURE
- # save modified positional parameters for caller
- func_validate_options_result=$func_run_hooks_result
+ $_G_rc_validate_options
}
--
2.11.0

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,68 @@
From a3c6e99c9cde0f786fa3df88360c84cf33ddc278 Mon Sep 17 00:00:00 2001
From: Pavel Raiskup <praiskup@redhat.com>
Date: Sat, 31 Oct 2015 15:49:01 +0100
Subject: [PATCH 15/20] syntax-check: fix sed syntax errors
Multi-line single-quoted shell arguments defined within makefile
rules end up having the trailing backslash. This caused problem
in some sc_* rules as GNU sed does not interpret trailing
backslash the same way as SHELL (== appending next line).
Switching to double quotes means that SHELL will remove the
trailing backslash for subsequent sed call. This silences a lot
of GNU sed warnings seen before like:
sed: -e expression #1, char 96: unterminated address regex
* cfg.mk (sc_libtool_m4_cc_basename): Use $(SED) instead of sed,
use double quotes for sed's multi-line argument.
(sc_prohibit_set_dummy_without_shift): Likewise.
(sc_prohibit_test_const_follows_var): Likewise.
---
cfg.mk | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
Index: libtool-2.4.6/cfg.mk
===================================================================
--- libtool-2.4.6.orig/cfg.mk
+++ libtool-2.4.6/cfg.mk
@@ -70,9 +70,9 @@ local-checks-to-skip = \
# Check for correct usage of $cc_basename in libtool.m4.
sc_libtool_m4_cc_basename:
- @sed -n '/case \$$cc_basename in/,/esac/ { \
+ @$(SED) -n "/case \\\$$cc_basename in/,/esac/ { \
/^[ ]*[a-zA-Z][a-zA-Z0-9+]*[^*][ ]*)/p; \
- }' '$(srcdir)/$(macro_dir)/libtool.m4' | grep . && { \
+ }" '$(srcdir)/$(macro_dir)/libtool.m4' | grep . && { \
msg="\$$cc_basename matches should include a trailing '*'." \
$(_sc_say_and_exit) } || :
@@ -135,12 +135,12 @@ sc_prohibit_set_dummy_without_shift:
@files=$$($(VC_LIST_EXCEPT)); \
if test -n "$$files"; then \
grep -nE '(set dummy|shift)' $$files | \
- sed -n '/set[ ][ ]*dummy/{ \
+ $(SED) -n "/set[ ][ ]*dummy/{ \
/set.*dummy.*;.*shift/d; \
N; \
/\n.*shift/D; \
p; \
- }' | grep -n . && { \
+ }" | grep -n . && { \
msg="use 'shift' after 'set dummy'" \
$(_sc_say_and_exit) } || :; \
else :; \
@@ -208,11 +208,11 @@ sc_prohibit_test_const_follows_var:
exclude_file_name_regexp--sc_require_function_nl_brace = (^HACKING|\.[ch]|\.texi)$$
sc_require_function_nl_brace:
@for file in $$($(VC_LIST_EXCEPT)); do \
- sed -n '/^func_[^ ]*[ ]*(/{ \
+ $(SED) -n "/^func_[^ ]*[ ]*(/{ \
N; \
/^func_[^ ]* ()\n{$$/d; \
p; \
- }' $$file | grep -E . && { \
+ }" $$file | grep -E . && { \
msg="found malformed function_definition in $$file" \
$(_sc_say_and_exit) } || :; \
done

View File

@ -0,0 +1,34 @@
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 20/20] 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(-)
Index: libtool-2.4.6/build-aux/ltmain.in
===================================================================
--- libtool-2.4.6.orig/build-aux/ltmain.in
+++ libtool-2.4.6/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"

View File

@ -0,0 +1,30 @@
Description: 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.
Author: Mike Frysinger <vapier@gentoo.org>
Last-Updated: 2019-01-28
Origin: http://git.savannah.gnu.org/cgit/libtool.git/commit/?id=f9970d99293faf908fdc153a653fa5781095fb7a
Bug-Debian: https://bugs.debian.orf/920529
Forwarded: not-needed
* build-aux/ltmain.in (func_mode_link): Pass -fuse-ld=* flags
through.
Index: libtool-2.4.6/build-aux/ltmain.in
===================================================================
--- libtool-2.4.6.orig/build-aux/ltmain.in
+++ libtool-2.4.6/build-aux/ltmain.in
@@ -5382,10 +5382,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"

22
debian/patches/0030-flang-support.patch vendored Normal file
View File

@ -0,0 +1,22 @@
Author: Alastair McKinstry <mckinstry@debian.org>
Description: Support for Flang Fortran compiler
Last-Updated: 2019-02-18
Forwarded: no
Index: libtool-2.4.6/m4/libtool.m4
===================================================================
--- libtool-2.4.6.orig/m4/libtool.m4
+++ libtool-2.4.6/m4/libtool.m4
@@ -4704,6 +4704,12 @@ m4_if([$1], [CXX], [
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
;;
+ # flang / f18. f95 an alias for gfortran or flang on Debian
+ flang* | f18* | f95*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
# icc used to be incompatible with GCC.
# ICC 10 doesn't accept -KPIC any more.
icc* | ifort*)

19
debian/patches/0035-ac-prereq.patch vendored Normal file
View File

@ -0,0 +1,19 @@
Description: Increment PREREQ needed for gnulib
Author: Alastair McKinstry <mckinstry@debian.org>
Bug-Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=948511
Last-Updated: 2020-01-22
Forwarded: no
Index: libtool/configure.ac
===================================================================
--- libtool.orig/configure.ac
+++ libtool/configure.ac
@@ -24,7 +24,7 @@
####
-AC_PREREQ(2.62)
+AC_PREREQ(2.63)
dnl Oldest automake required for bootstrap is below in AM_INIT_AUTOMAKE.

33
debian/patches/0040-unsafe-eval.patch vendored Normal file
View File

@ -0,0 +1,33 @@
Description: minor removal of unsafe shell script
eval in these segements unnecessary
Author: Alastair McKinstry <mckinstry@debian.org>
Bug-Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=866631
Last-Updated: 2020-01-22
Forwarded: no
Index: libtool/build-aux/funclib.sh
===================================================================
--- libtool.orig/build-aux/funclib.sh
+++ libtool/build-aux/funclib.sh
@@ -322,7 +322,7 @@ EXIT_SKIP=77 # $? = 77 is used to indi
# putting '$debug_cmd' at the start of all your functions, you can get
# bash to show function call trace with:
#
-# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
+# debug_cmd='echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
debug_cmd=${debug_cmd-":"}
exit_cmd=:
Index: libtool/build-aux/ltmain.sh
===================================================================
--- libtool.orig/build-aux/ltmain.sh
+++ libtool/build-aux/ltmain.sh
@@ -387,7 +387,7 @@ EXIT_SKIP=77 # $? = 77 is used to indi
# putting '$debug_cmd' at the start of all your functions, you can get
# bash to show function call trace with:
#
-# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
+# debug_cmd='echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
debug_cmd=${debug_cmd-":"}
exit_cmd=:

25
debian/patches/0050-documentation.patch vendored Normal file
View File

@ -0,0 +1,25 @@
Description: documentation inconsitent with libltdl3
Author: Alastair McKinstry <mckinstry@debian.org>
Last-Updated: 2020-01-22
Forwarded: no
Bug-Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=253904
Index: libtool-2.4.6/doc/libtool.texi
===================================================================
--- libtool-2.4.6.orig/doc/libtool.texi
+++ libtool-2.4.6/doc/libtool.texi
@@ -3956,10 +3956,10 @@ portability you should try to ensure tha
@option{-module} flag.}.
Unresolved symbols in the module are resolved using its dependency
-libraries and previously dlopened modules. If the executable using
-this module was linked with the @option{-export-dynamic} flag, then the
-global symbols in the executable will also be used to resolve
-references in the module.
+libraries and, on some platforms, previously dlopened modules. If
+the executable using this module was linked with the
+@option{-export-dynamic} flag, then the global symbols in the executable
+will also be used to resolve references in the module.
If @var{filename} is @code{NULL} and the program was linked with
@option{-export-dynamic} or @option{-dlopen self}, @code{lt_dlopen} will

View File

@ -0,0 +1,20 @@
Description: Pass more flags to the linker unchanged. Closes: #751161.
Author: Vincent Lefevre <vincent@vinc17.net>
Last-Updated: 2019-05-03
--- libtool-2.4.6-a/build-aux/ltmain.in 2019-05-03 11:11:05.000000000 +0200
+++ libtool-2.4.6-b/build-aux/ltmain.in 2019-05-03 11:18:59.209409497 +0200
@@ -5383,10 +5383,12 @@
# -stdlib=* select c++ std lib with clang
# -fsanitize=* Clang/GCC memory and address sanitizer
# -fuse-ld=* Linker select flags for GCC
+ # -static-* direct GCC to link specific libraries statically
+ # -fcilkplus Cilk Plus language extension features for C/C++
-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=*|-fuse-ld=*)
+ -specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus)
func_quote_for_eval "$arg"
arg=$func_quote_for_eval_result
func_append compile_command " $arg"

50
debian/patches/0060-ar.patch vendored Normal file
View File

@ -0,0 +1,50 @@
Description: Change default AR flags to 'cr' to silence warning
over default 'D' overriding 'u'
Author: Alastair McKinstry <mckinstry@debian.org>
Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=864018
Last-Updated: 2020-02-04
Forwarded: no
Index: libtool-2.4.6/m4/libtool.m4
===================================================================
--- libtool-2.4.6.orig/m4/libtool.m4
+++ libtool-2.4.6/m4/libtool.m4
@@ -1041,8 +1041,8 @@ int forced_loaded() { return 2;}
_LT_EOF
echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
$LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
- echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
- $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
+ echo "$AR cr libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
+ $AR cr libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
$RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
cat > conftest.c << _LT_EOF
@@ -1492,7 +1492,7 @@ need_locks=$enable_libtool_lock
m4_defun([_LT_PROG_AR],
[AC_CHECK_TOOLS(AR, [ar], false)
: ${AR=ar}
-: ${AR_FLAGS=cru}
+: ${AR_FLAGS=cr}
_LT_DECL([], [AR], [1], [The archiver])
_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
Index: libtool-2.4.6/m4/gnulib-common.m4
===================================================================
--- libtool-2.4.6.orig/m4/gnulib-common.m4
+++ libtool-2.4.6/m4/gnulib-common.m4
@@ -278,12 +278,12 @@ Amsterdam
dnl but prefer ${host}-ar over ar (useful for cross-compiling).
AC_CHECK_TOOL([AR], [ar], [ar])
if test -z "$ARFLAGS"; then
- ARFLAGS='cru'
+ ARFLAGS='cr'
fi
fi
else
if test -z "$ARFLAGS"; then
- ARFLAGS='cru'
+ ARFLAGS='cr'
fi
fi
AC_SUBST([AR])

13
debian/patches/bootstrap_options.conf vendored Normal file
View File

@ -0,0 +1,13 @@
Index: libtool-2.4.6/bootstrap.conf
===================================================================
--- libtool-2.4.6.orig/bootstrap.conf
+++ libtool-2.4.6/bootstrap.conf
@@ -70,8 +70,6 @@ gnulib_modules='
do-release-commit-and-tag
extract-trace
gendocs
- git-version-gen
- gitlog-to-changelog
gnu-web-doc-update
gnupload
inline-source

34
debian/patches/deplib_binary.patch vendored Normal file
View File

@ -0,0 +1,34 @@
Index: libtool-2.4.6/build-aux/ltmain.in
===================================================================
--- libtool-2.4.6.orig/build-aux/ltmain.in
+++ libtool-2.4.6/build-aux/ltmain.in
@@ -6001,19 +6001,19 @@ func_mode_link ()
# It is a libtool convenience library, so add in its objects.
func_append convenience " $ladir/$objdir/$old_library"
func_append old_convenience " $ladir/$objdir/$old_library"
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ deplibs="$deplib $deplibs"
+ if $opt_preserve_dup_deps; then
+ case "$tmp_libs " in
+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+ esac
+ fi
+ func_append tmp_libs " $deplib"
+ done
elif test prog != "$linkmode" && test lib != "$linkmode"; then
func_fatal_error "'$lib' is not a convenience library"
fi
- tmp_libs=
- for deplib in $dependency_libs; do
- deplibs="$deplib $deplibs"
- if $opt_preserve_dup_deps; then
- case "$tmp_libs " in
- *" $deplib "*) func_append specialdeplibs " $deplib" ;;
- esac
- fi
- func_append tmp_libs " $deplib"
- done
continue
fi # $pass = conv

18
debian/patches/deplibs-ident.patch vendored Normal file
View File

@ -0,0 +1,18 @@
Index: libtool-2.2.10/tests/deplibs-ident.at
===================================================================
--- libtool-2.2.10.orig/tests/deplibs-ident.at 2010-06-17 18:36:59.000000000 +0000
+++ libtool-2.2.10/tests/deplibs-ident.at 2010-06-17 18:39:32.000000000 +0000
@@ -66,13 +66,6 @@
AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o b$EXEEXT b.$OBJEXT ../liba1.la ../liba2.la ../liba3.la ../../c/libcee.la -rpath /nowhere],
[0],[stdout],[ignore])
AT_CHECK([$EGREP 'cee.*cee' stdout], 1, [ignore], [ignore])
- AT_XFAIL_IF([dnl
- eval `$LIBTOOL --config | $EGREP '^hardcode_(direct|direct_absolute|action)='`
- case $hardcode_action,$hardcode_direct,$hardcode_direct_absolute in
- relink,yes,no) :;;
- *,no,*) :;;
- *) false;;
- esac])
dnl This is currently broken in libtool
)

View File

@ -0,0 +1,20 @@
## This test is broken for several reasons:
## - It's linking a shared lib against a static lib. This is not
## portable, and we even give a warning about this.
## - The shared lib is not using any symbols from the static lib.
## - The test program is linked against the shared lib and using
## symbols from the static lib.
Index: libtool-2.2.6a/tests/demo.at
===================================================================
--- libtool-2.2.6a.orig/tests/demo.at 2009-04-10 00:53:38.000000000 +0200
+++ libtool-2.2.6a/tests/demo.at 2009-04-10 00:53:48.000000000 +0200
@@ -436,6 +436,8 @@
AT_SETUP([deplibs_check_method])
+AT_CHECK([(exit 77)])
+
_LT_DEMO_SETUP
AT_DATA([demo.mk],

View File

@ -0,0 +1,13 @@
Index: b/tests/link-order2.at
===================================================================
--- a/tests/link-order2.at
+++ b/tests/link-order2.at
@@ -47,6 +47,8 @@
AT_KEYWORDS([libtool])
AT_KEYWORDS([interactive])dnl running 'wrong' may cause a popup window.
+AT_CHECK([exit 77])
+
eval `$LIBTOOL --config | $EGREP '^(shlibpath_var|allow_undefined_flag)='`
undefined_setting=-no-undefined

65
debian/patches/grep-spaces.patch vendored Normal file
View File

@ -0,0 +1,65 @@
Description: Add spaces before -L in Grep searches
Current searching for "-L" in link paths is over-greedy and incorrectly handles paths with -L in them
See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=896861 for example
Author: Alastair McKinstry <mckinstry@debian.org>
Last-Updated: 2018-09-08
Forwarded: no
Index: libtool-2.4.6/m4/libtool.m4
===================================================================
--- libtool-2.4.6.orig/m4/libtool.m4
+++ libtool-2.4.6/m4/libtool.m4
@@ -6438,7 +6438,7 @@ if test yes != "$_lt_caught_CXX_error";
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
else
GXX=no
@@ -6813,7 +6813,7 @@ if test yes != "$_lt_caught_CXX_error";
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
;;
*)
if test yes = "$GXX"; then
@@ -6878,7 +6878,7 @@ if test yes != "$_lt_caught_CXX_error";
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
;;
*)
if test yes = "$GXX"; then
@@ -7217,7 +7217,7 @@ if test yes != "$_lt_caught_CXX_error";
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
else
# FIXME: insert proper C++ library support
@@ -7301,7 +7301,7 @@ if test yes != "$_lt_caught_CXX_error";
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
else
# g++ 2.7 appears to require '-G' NOT '-shared' on this
# platform.
@@ -7312,7 +7312,7 @@ if test yes != "$_lt_caught_CXX_error";
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
- output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+ output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
fi
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'

View File

@ -0,0 +1,35 @@
Ensure that $(LIBLTDL) is built first
After Automake upstream commit f4e91bfc490d, the list in 'all-am:' is
reordered for this test-case (*_LTLIBRARIES is before *_PROGRAMS), which
means that linker will fail to link 'old' binary.
Previously (with automake <= 1.16), it was matter of luck -- it worked if
(a) the build was serial (-j1), and/or (b) libtool-ltdl-devel package was
installed on the box so ./configure picked the system version of libltdl.
Users should anyways use system's ltdl, so this has low priority.
diff --git a/tests/old-ltdl-iface.at b/tests/old-ltdl-iface.at
index cee29089..6f9c8001 100644
--- a/tests/old-ltdl-iface.at
+++ b/tests/old-ltdl-iface.at
@@ -62,6 +62,9 @@ MOSTLYCLEANFILES =
include ltdl/Makefile.inc
bin_PROGRAMS = old
old_LDADD = -Lltdl $(LIBLTDL)
+# TODO: if --with-included-ltdl was unused this would
+# generate useless dependency.
+old_DEPENDENCIES = $(LIBLTDL)
]])
AT_DATA([old.c],
@@ -131,7 +134,7 @@ LT_AT_CHECK_LIBTOOLIZE([--ltdl=ltdl --nonrecursive --install], 0, [expout], [exp
AT_CHECK([test -f ltdl/Makefile.inc])
-LT_AT_BOOTSTRAP([ignore], [-I m4], [], [--add-missing], [--force])
+LT_AT_BOOTSTRAP([ignore], [-I m4], [], [--add-missing], [--force], [--with-included-ltdl])
LT_AT_EXEC_CHECK([./old], 0, [[...]])

29
debian/patches/libtool-eval-nm.patch vendored Normal file
View File

@ -0,0 +1,29 @@
Description: Avoid a broken AC_TRY_EVAL macro
As said in the Autoconf source, the AC_TRY_EVAL macro is dangerous and
undocumented, and should not be used.
In particular, the one related to nm yields binary data in the config.log
file with dash, where "echo \\1" (echo with the argument \1) produces the
control character ^A instead of the usual \1 with most shells (POSIX says
that the result is implementation-defined). See:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=910076
This patch attempts to replace this AC_TRY_EVAL occurrence by code with
similar behavior, but using $ECHO instead of echo in order to avoid the
backslash issue.
Author: Vincent Lefevre <vincent@vinc17.net>
Last-Updated: 2018-10-02
Index: libtool-2.4.6/m4/libtool.m4
===================================================================
--- libtool-2.4.6.orig/m4/libtool.m4
+++ libtool-2.4.6/m4/libtool.m4
@@ -4063,7 +4063,8 @@ _LT_EOF
if AC_TRY_EVAL(ac_compile); then
# Now try to grab the symbols.
nlist=conftest.nm
- if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
+ $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD
+ if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then
# Try sorting and uniquifying the output.
if sort "$nlist" | uniq > "$nlist"T; then
mv -f "$nlist"T "$nlist"

53
debian/patches/link_all_deplibs.patch vendored Normal file
View File

@ -0,0 +1,53 @@
## Do not link against deplibs. This is not needed for shared libs
## on atleast ELF systems since those already know which libs they
## need themself. This seems to break a few things and will be fixed
## in a better way in a future upstream version.
Index: libtool-2.4.6/build-aux/ltmain.in
===================================================================
--- libtool-2.4.6.orig/build-aux/ltmain.in
+++ libtool-2.4.6/build-aux/ltmain.in
@@ -5679,7 +5679,10 @@ func_mode_link ()
case $pass in
dlopen) libs=$dlfiles ;;
dlpreopen) libs=$dlprefiles ;;
- link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
+ link)
+ libs="$deplibs %DEPLIBS%"
+ test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
+ ;;
esac
fi
if test lib,dlpreopen = "$linkmode,$pass"; then
Index: libtool-2.4.6/m4/libtool.m4
===================================================================
--- libtool-2.4.6.orig/m4/libtool.m4
+++ libtool-2.4.6/m4/libtool.m4
@@ -4936,6 +4936,9 @@ m4_if([$1], [CXX], [
;;
esac
;;
+ linux* | k*bsd*-gnu | gnu*)
+ _LT_TAGVAR(link_all_deplibs, $1)=no
+ ;;
*)
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
;;
@@ -4998,6 +5001,9 @@ dnl Note also adjust exclude_expsyms for
openbsd* | bitrig*)
with_gnu_ld=no
;;
+ linux* | k*bsd*-gnu | gnu*)
+ _LT_TAGVAR(link_all_deplibs, $1)=no
+ ;;
esac
_LT_TAGVAR(ld_shlibs, $1)=yes
@@ -5773,6 +5779,7 @@ _LT_EOF
if test yes = "$lt_cv_irix_exported_symbol"; then
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
fi
+ _LT_TAGVAR(link_all_deplibs, $1)=no
else
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'

16
debian/patches/man-add-whatis-info.diff vendored Normal file
View File

@ -0,0 +1,16 @@
Index: b/Makefile.am
===================================================================
--- a/Makefile.am
+++ b/Makefile.am
@@ -417,9 +417,9 @@
# manual pages if the sources for the build-tree files we want to
# run have changed.
$(libtool_1): $(ltmain_sh)
- $(AM_V_GEN)$(update_mans) --help-option=--help-all libtool
+ $(AM_V_GEN)$(update_mans) -n 'Provide generalized library-building support services' --help-option=--help-all libtool
$(libtoolize_1): $(libtoolize_in)
- $(AM_V_GEN)$(update_mans) libtoolize
+ $(AM_V_GEN)$(update_mans) -n 'Prepare a package to use libtool' libtoolize
## ------------- ##

74
debian/patches/netbsdelf.patch vendored Normal file
View File

@ -0,0 +1,74 @@
## Add support for netbsdelf*-gnu
Index: b/m4/libtool.m4
===================================================================
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -2887,6 +2887,18 @@
dynamic_linker='GNU/Linux ld.so'
;;
+netbsdelf*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='NetBSD ld.elf_so'
+ ;;
+
netbsd*)
version_type=sunos
need_lib_prefix=no
@@ -3546,7 +3558,7 @@
lt_cv_deplibs_check_method=pass_all
;;
-netbsd*)
+netbsd* | netbsdelf*-gnu)
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
else
@@ -4424,7 +4436,7 @@
;;
esac
;;
- netbsd*)
+ netbsd* | netbsdelf*-gnu)
;;
*qnx* | *nto*)
# QNX uses GNU C++, but need to define -shared option too, otherwise
@@ -5258,7 +5270,7 @@
fi
;;
- netbsd*)
+ netbsd* | netbsdelf*-gnu)
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
@@ -5801,7 +5813,7 @@
esac
;;
- netbsd*)
+ netbsd* | netbsdelf*-gnu)
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
else
Index: b/m4/ltdl.m4
===================================================================
--- a/m4/ltdl.m4
+++ b/m4/ltdl.m4
@@ -496,7 +496,7 @@
# at 6.2 and later dlopen does load deplibs.
lt_cv_sys_dlopen_deplibs=yes
;;
- netbsd*)
+ netbsd* | netbsdelf*-gnu)
lt_cv_sys_dlopen_deplibs=yes
;;
openbsd*)

12
debian/patches/no_hostname.patch vendored Normal file
View File

@ -0,0 +1,12 @@
Index: libtool-2.4.6/m4/libtool.m4
===================================================================
--- libtool-2.4.6.orig/m4/libtool.m4
+++ libtool-2.4.6/m4/libtool.m4
@@ -728,7 +728,6 @@ _LT_CONFIG_SAVE_COMMANDS([
cat <<_LT_EOF >> "$cfgfile"
#! $SHELL
# Generated automatically by $as_me ($PACKAGE) $VERSION
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
# Provide generalized library-building support services.

14
debian/patches/nopic.patch vendored Normal file
View File

@ -0,0 +1,14 @@
Index: libtool-2.2.6a/tests/demo.at
===================================================================
--- libtool-2.2.6a.orig/tests/demo.at 2008-11-18 21:11:29.000000000 +0000
+++ libtool-2.2.6a/tests/demo.at 2008-11-18 21:12:41.000000000 +0000
@@ -26,7 +26,7 @@
AT_SETUP([force non-PIC objects])
AT_CHECK([case $host in
-hppa*|x86_64*|s390*)
+hppa*|x86_64*|s390*|mips*|arm*|sparc64*)
# These hosts cannot use non-PIC shared libs
exit 77 ;;
*-solaris*|*-sunos*)

28
debian/patches/series vendored Normal file
View File

@ -0,0 +1,28 @@
0001-libtool-fix-GCC-linking-with-specs.patch
0003-libtoolize-fix-infinite-recursion-in-m4.patch
# 0010-libtool-mitigate-the-sed_quote_subst-slowdown.patch
0011-libtool-optimizing-options-parser-hooks.patch
# 0012-funclib-refactor-quoting-methods-a-bit.patch
0015-syntax-check-fix-sed-syntax-errors.patch
0020-libtool-fix-GCC-clang-linking-with-fsanitize.patch
link_all_deplibs.patch
deplib_binary.patch
netbsdelf.patch
version_type.patch
nopic.patch
deplibs_test_disable.patch
disable-link-order2.patch
deplibs-ident.patch
man-add-whatis-info.diff
no_hostname.patch
bootstrap_options.conf
version_string.patch
grep-spaces.patch
libtool-eval-nm.patch
0025-libtool-pass-use-ld.patch
0030-flang-support.patch
0035-ac-prereq.patch
0040-unsafe-eval.patch
0050-documentation.patch
0055-pass-flags-unchanged.patch
0060-ar.patch

26
debian/patches/version_string.patch vendored Normal file
View File

@ -0,0 +1,26 @@
Index: libtool-2.4.6/libtoolize.in
===================================================================
--- libtool-2.4.6.orig/libtoolize.in
+++ libtool-2.4.6/libtoolize.in
@@ -114,7 +114,7 @@ When reporting a bug, please describe a
include the following information:
host-triplet: @host_triplet@
- version: $progname (GNU @PACKAGE@) @VERSION@
+ version: $progname $scriptversion
automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`
Index: libtool-2.4.6/build-aux/ltmain.in
===================================================================
--- libtool-2.4.6.orig/build-aux/ltmain.in
+++ libtool-2.4.6/build-aux/ltmain.in
@@ -156,7 +156,7 @@ include the following information:
compiler: $LTCC
compiler flags: $LTCFLAGS
linker: $LD (gnu? $with_gnu_ld)
- version: $progname (GNU @PACKAGE@) @VERSION@
+ version: $progname $scriptversion
automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`

14
debian/patches/version_type.patch vendored Normal file
View File

@ -0,0 +1,14 @@
Index: b/build-aux/ltmain.in
===================================================================
--- a/build-aux/ltmain.in
+++ b/build-aux/ltmain.in
@@ -8826,6 +8826,9 @@
revision=$number_minor
lt_irix_increment=no
;;
+ *)
+ func_fatal_configuration "$modename: unknown library version type '$version_type'"
+ ;;
esac
;;
no)

242
debian/rules vendored Executable file
View File

@ -0,0 +1,242 @@
#!/usr/bin/make -f
# debian/rules for the Debian GNU Libtool package.
# Copyright © 2003, 2004 Scott James Remnant <scott@netsplit.com>
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# In case they are dropped
SERIAL=4179
VERSION=2.4.6
DEBIAN_REVISION=$(strip $(shell dpkg-parsechangelog | awk -F: '/^Version:/ {print $$NF}'))
# libltdl needs to conform to policy
export DEB_CFLAGS_MAINT_PREPEND = -Wall
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif
AM_VERSION=$(shell aclocal --version | head -1 | awk '{print $$4}' | cut -d. -f1-2)
# Build libltdl the right way (tm)
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
confflags += --build=$(DEB_HOST_GNU_TYPE)
make_check = yes
else
confflags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
make_check = no
endif
ifneq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
make_check = no
endif
# Takes too long
#ifeq (m68k, $(DEB_HOST_ARCH))
# make_check = no
#endif
clean:
dh_testdir
dh_testroot
rm -f build-stamp config-stamp
dh_clean
[ ! -f Makefile ] || $(MAKE) -k distclean
rm -f INSTALL build-aux/compile build-aux/config.guess build-aux/config.sub
rm -f build-aux/texinfo.tex build-aux/missing build-aux/install-sh
rm -f build-aux/mdate-sh build-aux/depcomp README-release doc/libtool.info-2
rm -f .version .version~
rm -f doc/libtool.1 doc/libtool.info doc/libtool.info-1 doc/libtool.info-2 doc/libtoolize.1
rm -f build-aux/ltmain.sh
rm -f Makefile.in configure libltdl/Makefile.in libltdl/configure
rm -rf autom4te.cache
rm -f build-aux/gnupload config-h.in m4/gnulib-cache.m4 m4/gnulib-comp.m4
rm -f build-aux/update-copyright m4/gnulib-tool.m4 build-aux/useless-if-before-free
rm -f build-aux/announce-gen build-aux/gendocs.sh build-aux/vc-list-files
rm -f build-aux/do-release-commit-and-tag build-aux/gnu-web-doc-update
rm -f m4/gnulib-common.m4 m4/00gnulib.m4 maint.mk doc/fdl.texi
rm -f doc/gendocs_template GNUmakefile
# Undo the version change if there is any.
sed -i -e "s/\$$scriptversion.*/\$$scriptversion/" libtoolize.in
sed -i -e "s/\$$scriptversion.*/\$$scriptversion/" build-aux/ltmain.in
sed -i -e 's/^VERSION.*/VERSION=@VERSION@/' build-aux/ltmain.in
config: config-stamp
Makefile: config-stamp
config-stamp:
dh_testdir
# dot files may have been lost in git
echo ${SERIAL} > .serial || true
echo ${VERSION} > .version || true
echo ${VERSION} > .tarball-version || true
sed -i -e "s/\$$scriptversion.*/\$$scriptversion Debian-$(DEBIAN_REVISION)/" libtoolize.in
sed -i -e "s/\$$scriptversion.*/\$$scriptversion Debian-$(DEBIAN_REVISION)/" build-aux/ltmain.in
sed -i -e 's/^VERSION.*/VERSION="@VERSION@ Debian-$(DEBIAN_REVISION)"/' build-aux/ltmain.in
touch README-release
./bootstrap --force --no-git --skip-po --gnulib-srcdir=/usr/share/gnulib/ --copy
CONFIG_SHELL=/bin/bash /bin/bash ./configure \
--prefix=/usr \
--libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
$(confflags) \
$(shell dpkg-buildflags --export=cmdline) \
GREP=/bin/grep \
SED=/bin/sed
touch config-stamp
build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp
build-stamp: config-stamp
dh_testdir
$(MAKE)
# The system libtool script in Debian must be able to support
# invoking gcc as cc
echo '# ### BEGIN LIBTOOL TAG CONFIG: BINCC' >> libtool
sed -n -e '/^# ### BEGIN LIBTOOL CONFIG/,/^# ### END LIBTOOL CONFIG/p' < libtool \
| grep -B 2 -A 1 -e '^LTCC=' -e '^CC=' \
| sed '/^--/d;s/gcc/cc/g' >> libtool
echo '# ### END LIBTOOL TAG CONFIG: BINCC' >> libtool
echo >> libtool
# The system libtool script in Debian must be able to support
# invoking g++ both by the g++ and c++ names.
sed -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: CXX$$/,/^# ### END LIBTOOL TAG CONFIG: CXX$$/p' < libtool \
| sed -e 's/CONFIG: CXX/CONFIG: BINCXX/g' \
-e 's/g++/c++/g' >> libtool
echo >> libtool
# Add our BINCC and BINCXX tags
sed -e 's/^\(available_tags\)=\"\(.*\)\"/\1=\"\2 BINCC BINCXX\"/' \
< libtool > libtool.tags
mv libtool.tags libtool
# Don't hardcode gcc path information, and don't use nostdlib
sed -e 's/^\(predep_objects\)=.*/\1=""/' \
-e 's/^\(postdep_objects\)=.*/\1=""/' \
-e 's/^\(compiler_lib_search_path\)=.*/\1=""/' \
-e 's:^\(sys_lib_search_path_spec\)=.*:\1="/lib/ /usr/lib/ /usr/X11R6/lib/ /usr/local/lib/":' \
-e 's/^\(archive_cmds=\".*\) -nostdlib /\1 /' \
-e 's/^\(archive_expsym_cmds=\".*\) -nostdlib /\1 /' \
< libtool > libtool.gcc-indep
mv libtool.gcc-indep libtool
# Make libtool executable again
chmod 755 libtool
ifeq ($(make_check), yes)
# Now make sure it works
-$(MAKE) check || touch tests-failed
-cat test-suite.log
-cat tests/testsuite.log
@test ! -f tests-failed
endif
cd doc && makeinfo libtool.texi
cd doc && makeinfo --html --no-split libtool.texi
touch build-stamp
install: build
dh_testdir
dh_testroot
dh_prep
dh_installdirs
$(MAKE) prefix=$(CURDIR)/debian/tmp/usr install
rm -f debian/tmp/usr/share/info/dir
# The file-prefix-map/debug-prefix-map contain the build path,
# which results in unreproducible builds. Strip these arguments
# out of the manpage.
sed -i -e "s, ....-fdebug.-prefix.-map=.*=\. , ,g" \
-e "s, ....-ffile.-prefix.-map=.*=\. , ,g" \
debian/tmp/usr/share/man/man1/libtool.1
dh_install --sourcedir=debian/tmp
# Build architecture-independent files here.
binary-indep: build-indep install
dh_testdir -i
dh_testroot -i
# Create symlinks to the one in autotools-dev
rm -f debian/libtool/usr/share/libtool/build-aux/config.guess
ln -s ../../misc/config.guess debian/libtool/usr/share/libtool/build-aux
rm -f debian/libtool/usr/share/libtool/build-aux/config.sub
ln -s ../../misc/config.sub debian/libtool/usr/share/libtool/build-aux
# Sanitize /usr-merge path builds
for f in \
debian/libtool-bin/usr/share/man/man1/libtool.1 \
debian/libtool-bin/usr/bin/libtool ; do cat $$f | \
sed -e 's%/usr/bin/grep%/bin/grep%g' | \
sed -e 's%/usr/bin/sed%/bin/sed%g' | \
sed -e 's%/usr/bin/dd%/bin/dd%g' | \
sed -e 's%${CURDIR}%/build/libtool-2.4.6%g' \
> debian/tmpff ; \
mv debian/tmpff $$f ; \
done
dh_installdocs -i
dh_installinfo -plibtool-doc
dh_installexamples -i
dh_installchangelogs -i ChangeLog
dh_link -i
dh_lintian -i
dh_compress -i
dh_fixperms -i
dh_installdeb -i
dh_gencontrol -i
dh_md5sums -i
dh_builddeb -i
# Build architecture-dependent files here.
binary-arch: build-arch install
dh_testdir -a
dh_testroot -a
# Sanitize /usr-merge path builds
for f in \
debian/libtool/usr/bin/libtoolize ; do \
cat $$f | \
sed -e 's%/usr/bin/grep%/bin/grep%g' | \
sed -e 's%/usr/bin/sed%/bin/sed%g' | \
sed -e 's%/usr/bin/dd%/bin/dd%g' | \
sed -e 's%${CURDIR}%/build/libtool-2.4.6%g' \
> debian/tmpff ; \
mv debian/tmpff $$f ; \
done
dh_installdocs -plibtool-bin
dh_installdocs -plibltdl7
mkdir -p debian/libltdl-dev/usr/share/doc
cd debian/libltdl-dev/usr/share/doc && ln -sf libltdl7 libltdl-dev
dh_installchangelogs -plibtool-bin
dh_installchangelogs -plibltdl7 ChangeLog
dh_strip -a
dh_lintian -a
dh_link -a
dh_compress -a
dh_fixperms -a
dh_makeshlibs -a -V
dh_installdeb -a
dh_shlibdeps -a
rm -f debian/libltdl-dev.substvars
echo 'automake=automake-${AM_VERSION}' > debian/libltdl-dev.substvars
dh_gencontrol -a
dh_md5sums -a
dh_builddeb -a
binary: binary-indep binary-arch
.PHONY: build build-arch build-indep clean config patch unpatch binary-indep binary-arch binary install

1
debian/source/format vendored Normal file
View File

@ -0,0 +1 @@
3.0 (quilt)

1
debian/source/include-binaries vendored Normal file
View File

@ -0,0 +1 @@
debian/upstream-signing-key.pgp

BIN
debian/upstream-signing-key.pgp vendored Normal file

Binary file not shown.

2
debian/watch vendored Normal file
View File

@ -0,0 +1,2 @@
version=2
ftp://ftp.gnu.org/gnu/libtool/libtool-(.*)\.tar\.gz debian uupdate