pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk Rewrite func_infer_tag in the libtool script so tha...
details: https://anonhg.NetBSD.org/pkgsrc/rev/6b14deb49e3d
branches: trunk
changeset: 485607:6b14deb49e3d
user: jlam <jlam%pkgsrc.org@localhost>
date: Fri Dec 17 16:24:22 2004 +0000
description:
Rewrite func_infer_tag in the libtool script so that it's easier to
specify (hardcoded) compilers from which we can infer the correct tag
(CC, CXX, F77). Use the following patterns to match compilers to
tags:
CC: *cc *xlc
CXX: *++ *CC
F77: *77 *fort
Bump the PKGREVISION to 1.5.10nb7 since we now infer the F77 tag from
likely Fortran compilers. Also require at least this version of
libtool when building packages that set USE_FORTRAN. This should fix
PR pkg/28661.
diffstat:
devel/libtool-base/Makefile | 4 +-
devel/libtool/distinfo | 4 +-
devel/libtool/patches/patch-ac | 105 ++++++++++++++++++++++++----------------
mk/bsd.pkg.mk | 5 +-
4 files changed, 72 insertions(+), 46 deletions(-)
diffs (186 lines):
diff -r 55958a487928 -r 6b14deb49e3d devel/libtool-base/Makefile
--- a/devel/libtool-base/Makefile Fri Dec 17 15:44:12 2004 +0000
+++ b/devel/libtool-base/Makefile Fri Dec 17 16:24:22 2004 +0000
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.47 2004/11/26 09:39:30 jlam Exp $
+# $NetBSD: Makefile,v 1.48 2004/12/17 16:24:23 jlam Exp $
#
.include "../../devel/libtool/Makefile.common"
PKGNAME= ${DISTNAME:S/-/-base-/}
-PKGREVISION= 6
+PKGREVISION= 7
SVR4_PKGNAME= ltoob
COMMENT= Generic shared library support script (the script itself)
diff -r 55958a487928 -r 6b14deb49e3d devel/libtool/distinfo
--- a/devel/libtool/distinfo Fri Dec 17 15:44:12 2004 +0000
+++ b/devel/libtool/distinfo Fri Dec 17 16:24:22 2004 +0000
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.51 2004/11/11 22:29:03 tv Exp $
+$NetBSD: distinfo,v 1.52 2004/12/17 16:24:22 jlam Exp $
SHA1 (libtool-1.5.10.tar.gz) = bb2cab7f405c5eb08ab8ba193cbac59ebe6e6e9e
Size (libtool-1.5.10.tar.gz) = 2699923 bytes
SHA1 (patch-aa) = 173b8f40ebb067e3bcea798b87e822a445d5688e
SHA1 (patch-ab) = 11c564b44d22a9a49219ef1edd76aa469fc4a3f2
-SHA1 (patch-ac) = e5cb5ca2303ebb82bb17db6c785580c23db2c6d3
+SHA1 (patch-ac) = 2123be2150e7f86980b903574b742454addd7b75
SHA1 (patch-ad) = 17ae54beead8ed189cf7aab8708d40d499750e7d
diff -r 55958a487928 -r 6b14deb49e3d devel/libtool/patches/patch-ac
--- a/devel/libtool/patches/patch-ac Fri Dec 17 15:44:12 2004 +0000
+++ b/devel/libtool/patches/patch-ac Fri Dec 17 16:24:22 2004 +0000
@@ -1,45 +1,68 @@
-$NetBSD: patch-ac,v 1.13 2004/10/03 00:13:31 tv Exp $
+$NetBSD: patch-ac,v 1.14 2004/12/17 16:24:22 jlam Exp $
--- ltmain.sh.orig 2004-09-19 08:34:44.000000000 -0400
+++ ltmain.sh
-@@ -197,10 +197,26 @@ func_infer_tag () {
- case $@ in
- # Blanks in the command may have been stripped by the calling shell,
- # but not from the CC environment variable when configure was run.
-- " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
-+ " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
-+ tagname=CC
-+ ;;
- # Blanks at the start of $base_compile will cause this to fail
- # if we don't check for them as well.
- *)
-+ base_compiler=`$echo $base_compile | awk '{ print $1 }'`
-+ case $base_compiler in
-+ *cc)
-+ tagname=CC
-+ ;;
-+ *++)
-+ tagname=CXX
-+ eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $0`"
-+ ;;
-+ esac
-+ ;;
-+ esac
+@@ -184,6 +184,31 @@ func_win32_libid () {
+ # command doesn't match the default compiler.
+ # arg is usually of the form 'gcc ...'
+ func_infer_tag () {
++ # Set the commonly-used compilers for some tags.
++ tag_compilers_CC="*cc *xlc"
++ tag_compilers_CXX="*++ *CC"
++ tag_compilers_F77="*77 *fort"
++ base_compiler=`set -- "$@"; $echo $1`
++ # If $tagname still isn't set, then try to infer if the default
++ # "CC" tag applies by matching up the base compile command to some
++ # compilers commonly used for the "CC" tag.
++ if test -z "$tagname"; then
++ z=CC
++ eval "tag_compilers=\$tag_compilers_${z}"
++ if test -n "$tag_compilers"; then
++ for zp in $tag_compilers; do
++ case $base_compiler in
++ $zp)
++ # The compiler in the base compile command matches
++ # one of the common compilers for the current tag.
++ # Assume this is the tagged configuration we want.
++ tagname=$z
++ break
++ ;;
++ esac
++ done
++ fi
+ fi
-+ if test -n "$available_tags" && test -z "$tagname"; then
- for z in $available_tags; do
- if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
- # Evaluate the configuration.
-@@ -236,8 +252,6 @@ func_infer_tag () {
- # else
- # $echo "$modename: using $tagname tagged configuration"
- fi
-- ;;
-- esac
- fi
- }
-
-@@ -522,7 +536,7 @@ if test -z "$show_help"; then
+ if test -n "$available_tags" && test -z "$tagname"; then
+ CC_quoted=
+ for arg in $CC; do
+@@ -224,6 +249,27 @@ func_infer_tag () {
+ break
+ ;;
+ esac
++ # If $tagname still isn't set, then try to infer it by
++ # matching up the base compile command to some compilers
++ # commonly used for certain tags.
++ base_compiler=`set -- "$@"; $echo $1`
++ eval "tag_compilers=\$tag_compilers_${z}"
++ if test -n "$tag_compilers"; then
++ for zp in $tag_compilers; do
++ case $base_compiler in
++ $zp)
++ # The compiler in the base compile command matches
++ # one of the common compilers for the current tag.
++ # Assume this is the tagged configuration we want.
++ tagname=$z
++ break
++ ;;
++ esac
++ done
++ if test -n "$tagname"; then
++ break
++ fi
++ fi
+ fi
+ done
+ # If $tagname still isn't set, then no tagged configuration
+@@ -522,7 +568,7 @@ if test -z "$show_help"; then
$echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
$echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2
case $nonopt in
@@ -48,7 +71,7 @@
mode=link
for arg
do
-@@ -1306,6 +1320,13 @@ EOF
+@@ -1306,6 +1352,13 @@ EOF
exit $EXIT_FAILURE
;;
esac
@@ -62,7 +85,7 @@
if test "$prev" = rpath; then
case "$rpath " in
*" $arg "*) ;;
-@@ -3168,6 +3189,7 @@ EOF
+@@ -3168,6 +3221,7 @@ EOF
linux)
major=.`expr $current - $age`
versuffix="$major.$age.$revision"
@@ -70,7 +93,7 @@
;;
osf)
-@@ -5364,8 +5386,16 @@ relink_command=\"$relink_command\""
+@@ -5364,8 +5418,16 @@ relink_command=\"$relink_command\""
exit $EXIT_FAILURE
fi
diff -r 55958a487928 -r 6b14deb49e3d mk/bsd.pkg.mk
--- a/mk/bsd.pkg.mk Fri Dec 17 15:44:12 2004 +0000
+++ b/mk/bsd.pkg.mk Fri Dec 17 16:24:22 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1546 2004/12/10 04:25:09 jlam Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1547 2004/12/17 16:24:22 jlam Exp $
#
# This file is in the public domain.
#
@@ -336,6 +336,9 @@
.endif # USE_PERL5 == run
.if defined(USE_FORTRAN)
+. if defined(USE_LIBTOOL)
+LIBTOOL_REQD?= 1.5.10nb7
+. endif
. if !exists(/usr/bin/f77)
PKG_FC?= f2c-f77
. endif
Home |
Main Index |
Thread Index |
Old Index