From 1abdd450fe362879f5881c4ff72747f448ee1ce0 Mon Sep 17 00:00:00 2001 From: jlam Date: Fri, 10 Jan 2003 08:44:18 +0000 Subject: [PATCH] Install a ${PREFIX}/bin/shlibtool as part of the devel/libtool-base package. shlibtool will not build static libraries. Add handling in bsd.pkg.mk for a variable named "SHLIBTOOL_OVERRIDE" that is analogous to LIBTOOL_OVERRIDE and causes any listed libtool scripts to be replaced with a symlink to shlibtool, and teach buildlink2 about shlibtool. Bump PKGREVISION of devel/libtool* packages to 11. --- devel/libtool-base/Makefile | 36 ++++++++++++++++++++++++++++----- devel/libtool-base/PLIST | 3 ++- devel/libtool/Makefile.common | 4 ++-- doc/CHANGES | 3 +++ mk/bsd.pkg.mk | 25 +++++++++++++++++------ mk/buildlink2/bsd.buildlink2.mk | 23 ++++++++++++++++----- mk/defs.Darwin.mk | 3 +-- mk/defs.FreeBSD.mk | 3 +-- mk/defs.IRIX.mk | 3 +-- mk/defs.Linux.mk | 3 +-- mk/defs.NetBSD.mk | 3 +-- mk/defs.OpenBSD.mk | 3 +-- mk/defs.SunOS.mk | 3 +-- 13 files changed, 82 insertions(+), 33 deletions(-) diff --git a/devel/libtool-base/Makefile b/devel/libtool-base/Makefile index 1daf2ce11a9d..6819dcbb5899 100644 --- a/devel/libtool-base/Makefile +++ b/devel/libtool-base/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.14 2002/12/22 19:04:08 jlam Exp $ +# $NetBSD: Makefile,v 1.15 2003/01/10 08:44:19 jlam Exp $ # .include "../libtool/Makefile.common" @@ -15,21 +15,47 @@ test: build .include "../../mk/bsd.prefs.mk" -.if ${MACHINE_PLATFORM:MNetBSD-1.4-sparc} != "" || \ - ${MACHINE_PLATFORM:MNetBSD-1.4.[12]-sparc} != "" +.if !empty(MACHINE_PLATFORM:MNetBSD-1.4-sparc) || \ + !empty(MACHINE_PLATFORM:MNetBSD-1.4.[12]-sparc) DEPENDS+= c++rt0>=1.0:../../sysutils/c++rt0 .endif .if ${OPSYS} == "NetBSD" . if !exists(/usr/libexec/ld.so) && !exists(/usr/libexec/ld.elf_so) -CONFIGURE_ARGS= --disable-shared +CONFIGURE_ARGS= --disable-shared +BUILD_SHLIBTOOL= NO . endif .else -CONFIGURE_ARGS= --enable-ltdl-install +CONFIGURE_ARGS= --enable-ltdl-install .endif .if !empty(MACHINE_PLATFORM:MDarwin-*-*) . include "../../devel/dlcompat/buildlink2.mk" .endif +BUILD_SHLIBTOOL?= YES +BUILDING_SHLIBTOOL?= NO + +.if ${BUILDING_SHLIBTOOL} == "YES" +CONFIGURE_ARGS+= --disable-static +.else +SHLIBTOOL_WRKDIR= ${WRKDIR}/shlibtool +SHLIBTOOL_WRKSRC= ${WRKSRC:S/${WRKDIR}/${SHLIBTOOL_WRKDIR}/} +SHLIBTOOL_MAKEFLAGS= BUILDING_SHLIBTOOL=YES +SHLIBTOOL_MAKEFLAGS+= WRKDIR=${SHLIBTOOL_WRKDIR} + +. if ${BUILD_SHLIBTOOL} == "NO" +PLIST_SUBST+= SHLIBTOOL="@comment " +. else +PLIST_SUBST+= SHLIBTOOL= + +post-build: + cd ${.CURDIR} && ${MAKE} build ${SHLIBTOOL_MAKEFLAGS} + +post-install: + ${INSTALL_SCRIPT} ${SHLIBTOOL_WRKSRC}/libtool \ + ${PREFIX}/bin/shlibtool +. endif +.endif + .include "../../mk/bsd.pkg.mk" diff --git a/devel/libtool-base/PLIST b/devel/libtool-base/PLIST index 5306629a4e3c..9befea0fd4db 100644 --- a/devel/libtool-base/PLIST +++ b/devel/libtool-base/PLIST @@ -1,6 +1,7 @@ -@comment $NetBSD: PLIST,v 1.3 2002/12/09 16:01:19 tron Exp $ +@comment $NetBSD: PLIST,v 1.4 2003/01/10 08:44:19 jlam Exp $ bin/libtool bin/libtoolize +${SHLIBTOOL}bin/shlibtool include/ltdl.h lib/libltdl.a lib/libltdl.la diff --git a/devel/libtool/Makefile.common b/devel/libtool/Makefile.common index 5ecc406f0c6a..4514658dfdea 100644 --- a/devel/libtool/Makefile.common +++ b/devel/libtool/Makefile.common @@ -1,9 +1,9 @@ -# $NetBSD: Makefile.common,v 1.25 2002/12/23 14:49:54 jlam Exp $ +# $NetBSD: Makefile.common,v 1.26 2003/01/10 08:44:18 jlam Exp $ # DISTNAME= libtool-ml-20010614 PKGPFX= ${DISTNAME:C/ml-/1.4./} -PKGREVISION= 10 +PKGREVISION= 11 WRKSRC= ${WRKDIR}/libtool-ml CATEGORIES= devel pkgtools MASTER_SITES= ${MASTER_SITE_LOCAL} diff --git a/doc/CHANGES b/doc/CHANGES index 2265d1b3892b..cc8f19d92ff4 100644 --- a/doc/CHANGES +++ b/doc/CHANGES @@ -186,3 +186,6 @@ Changes to the packages collection and infrastructure in 2003: Updated p5-pilot-link to 0.11.7 [rh 2003-01-10] Updated jpilot to 0.99.3 [rh 2003-01-10] Added gob-1.0.12 [rh 2003-01-10] + Updated libtool to 1.4.20010614nb11 [jlam 2003-01-10] + Updated libtool-base to 1.4.20010614nb11 [jlam 2003-01-10] + Updated libtool-info to 1.4.20010614nb11 [jlam 2003-01-10] diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index 988db6f90550..e44d9890d85d 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.1125 2003/01/09 13:16:38 schmonz Exp $ +# $NetBSD: bsd.pkg.mk,v 1.1126 2003/01/10 08:44:19 jlam Exp $ # # This file is in the public domain. # @@ -222,10 +222,12 @@ CONFIG_SHELL?= ${SH} CONFIGURE_ENV+= CONFIG_SHELL=${CONFIG_SHELL} .endif -LIBTOOL_REQD= ${_OPSYS_LIBTOOL_REQD} +LIBTOOL_REQD?= 1.4.20010614nb11 LIBTOOL= ${LOCALBASE}/bin/libtool +SHLIBTOOL= ${LOCALBASE}/bin/shlibtool .if defined(USE_LIBTOOL) PKGLIBTOOL= ${LIBTOOL} +PKGSHLIBTOOL= ${SHLIBTOOL} BUILD_DEPENDS+= libtool-base>=${LIBTOOL_REQD}:../../devel/libtool-base CONFIGURE_ENV+= LIBTOOL="${PKGLIBTOOL} ${LIBTOOL_FLAGS}" MAKE_ENV+= LIBTOOL="${PKGLIBTOOL} ${LIBTOOL_FLAGS}" @@ -1886,14 +1888,25 @@ do-configure: ${_CONFIGURE_PREREQ} _CONFIGURE_POSTREQ+= do-libtool-override do-libtool-override: -.if defined(USE_LIBTOOL) && defined(LIBTOOL_OVERRIDE) -. for libtool in ${LIBTOOL_OVERRIDE} +.if defined(USE_LIBTOOL) +. if defined(LIBTOOL_OVERRIDE) +. for libtool in ${LIBTOOL_OVERRIDE} ${_PKG_SILENT}${_PKG_DEBUG} \ if [ -f ${libtool} ]; then \ ${RM} -f ${libtool}; \ - ${LN} -sf ${PKGLIBTOOL} ${libtool}; \ + ${LN} -sf ${PKGLIBTOOL} ${libtool}; \ fi -. endfor +. endfor +. endif +. if defined(SHLIBTOOL_OVERRIDE) +. for libtool in ${SHLIBTOOL_OVERRIDE} + ${_PKG_SILENT}${_PKG_DEBUG} \ + if [ -f ${libtool} ]; then \ + ${RM} -f ${libtool}; \ + ${LN} -sf ${PKGSHLIBTOOL} ${libtool}; \ + fi +. endfor +. endif .else ${_PKG_SILENT}${_PKG_DEBUG}${TRUE} .endif diff --git a/mk/buildlink2/bsd.buildlink2.mk b/mk/buildlink2/bsd.buildlink2.mk index e5e310230b15..7da446a7e082 100644 --- a/mk/buildlink2/bsd.buildlink2.mk +++ b/mk/buildlink2/bsd.buildlink2.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.buildlink2.mk,v 1.72 2003/01/08 08:33:54 jlam Exp $ +# $NetBSD: bsd.buildlink2.mk,v 1.73 2003/01/10 08:44:21 jlam Exp $ # # An example package buildlink2.mk file: # @@ -518,8 +518,9 @@ _BLNK_WRAPPEES+= FC .endif .if defined(USE_LIBTOOL) PKGLIBTOOL= ${BUILDLINK_LIBTOOL} +PKGSHLIBTOOL= ${BUILDLINK_SHLIBTOOL} .endif -_BLNK_WRAPPEES+= LIBTOOL +_BLNK_WRAPPEES+= LIBTOOL SHLIBTOOL .if defined(USE_X11) IMAKE?= ${X11BASE}/bin/imake _BLNK_WRAPPEES+= IMAKE @@ -606,13 +607,18 @@ _BLNK_WRAP_SETENV.CPP= # empty # _BLNK_WRAP_SETENV.FC+= F77="${BUILDLINK_FC:T}" -# Don't override the default LIBTOOL setting in the environment, as -# it already correctly points to ${PKGLIBTOOL}, and don't sanitize the PATH -# because we want libtool to invoke the wrapper scripts, too. +# Don't override the default LIBTOOL and SHLIBTOOL settings in the +# environment, as they already correctly point to the correct values, and +# don't sanitize the PATH because we want libtool to invoke the wrapper +# scripts, too. # _BLNK_WRAP_SETENV.LIBTOOL= # empty _BLNK_WRAPPER_SH.LIBTOOL= ${.CURDIR}/../../mk/buildlink2/libtool.sh _BLNK_WRAP_SANITIZE_PATH.LIBTOOL= # empty +# +_BLNK_WRAP_SETENV.SHLIBTOOL= # empty +_BLNK_WRAPPER_SH.SHLIBTOOL= ${.CURDIR}/../../mk/buildlink2/libtool.sh +_BLNK_WRAP_SANITIZE_PATH.SHLIBTOOL= # empty # We need to "unbuildlinkify" any libtool archives. _BLNK_WRAP_LT_UNTRANSFORM_SED= ${_REPLACE_BUILDLINK_SED} @@ -629,6 +635,13 @@ _BLNK_WRAP_PRIVATE_CACHE.LIBTOOL= ${BUILDLINK_DIR}/bin/.libtool-cache _BLNK_WRAP_PRIVATE_POST_CACHE.LIBTOOL= ${BUILDLINK_DIR}/bin/.libtool-post-cache _BLNK_WRAP_POST_LOGIC.LIBTOOL= ${BUILDLINK_DIR}/bin/.libtool-logic +# shlibtool shares cache information with libtool. +_BLNK_WRAP_PRIVATE_PRE_CACHE.SHLIBTOOL= ${_BLNK_WRAP_PRIVATE_PRE_CACHE.LIBTOOL} +_BLNK_WRAP_PRIVATE_CACHE_ADD.SHLIBTOOL= ${_BLNK_WRAP_PRIVATE_CACHE_ADD.LIBTOOL} +_BLNK_WRAP_PRIVATE_CACHE.SHLIBTOOL= ${_BLNK_WRAP_PRIVATE_CACHE.LIBTOOL} +_BLNK_WRAP_PRIVATE_POST_CACHE.SHLIBTOOL= ${_BLNK_WRAP_PRIVATE_POST_CACHE.LIBTOOL} +_BLNK_WRAP_POST_LOGIC.SHLIBTOOL= ${_BLNK_WRAP_POST_LOGIC.LIBTOOL} + # Allow BUILDLINK_SETENV. to override _BLNK_WRAP_SETENV.. .for _wrappee_ in ${_BLNK_WRAPPEES} . if defined(BUILDLINK_SETENV.${_wrappee_}) diff --git a/mk/defs.Darwin.mk b/mk/defs.Darwin.mk index 480580c858df..57ba47b4138c 100644 --- a/mk/defs.Darwin.mk +++ b/mk/defs.Darwin.mk @@ -1,4 +1,4 @@ -# $NetBSD: defs.Darwin.mk,v 1.41 2002/12/18 06:18:14 schmonz Exp $ +# $NetBSD: defs.Darwin.mk,v 1.42 2003/01/10 08:44:20 jlam Exp $ # # Variable definitions for the Darwin operating system. @@ -93,7 +93,6 @@ _OPSYS_HAS_INET6= no # IPv6 is not standard _OPSYS_HAS_JAVA= yes # Java is standard _OPSYS_HAS_MANZ= yes # MANZ controls gzipping of man pages _OPSYS_HAS_OSSAUDIO= no # libossaudio is available -_OPSYS_LIBTOOL_REQD= 1.4.20010614nb9 # base version of libtool required _OPSYS_PERL_REQD= 5.8.0 # base version of perl required _OPSYS_RPATH_NAME= # no name of symbol in rpath directive to linker _PATCH_CAN_BACKUP= yes # native patch(1) can make backups diff --git a/mk/defs.FreeBSD.mk b/mk/defs.FreeBSD.mk index 6191c8afb5d4..c55ecd033902 100644 --- a/mk/defs.FreeBSD.mk +++ b/mk/defs.FreeBSD.mk @@ -1,4 +1,4 @@ -# $NetBSD: defs.FreeBSD.mk,v 1.13 2002/12/18 06:18:14 schmonz Exp $ +# $NetBSD: defs.FreeBSD.mk,v 1.14 2003/01/10 08:44:20 jlam Exp $ # # Variable definitions for the FreeBSD operating system. @@ -105,7 +105,6 @@ _OPSYS_HAS_INET6= no # IPv6 is not standard _OPSYS_HAS_JAVA= no # Java is not standard _OPSYS_HAS_MANZ= yes # MANZ controls gzipping of man pages _OPSYS_HAS_OSSAUDIO= yes # libossaudio is available -_OPSYS_LIBTOOL_REQD= 1.4.20010614nb10 # base version of libtool required _OPSYS_PERL_REQD= # no base version of perl required _OPSYS_RPATH_NAME= -R # name of symbol in rpath directive to linker _PATCH_CAN_BACKUP= yes # native patch(1) can make backups diff --git a/mk/defs.IRIX.mk b/mk/defs.IRIX.mk index 650f010eae6d..e72c6e408980 100644 --- a/mk/defs.IRIX.mk +++ b/mk/defs.IRIX.mk @@ -1,4 +1,4 @@ -# $NetBSD: defs.IRIX.mk,v 1.15 2002/12/23 23:03:23 jschauma Exp $ +# $NetBSD: defs.IRIX.mk,v 1.16 2003/01/10 08:44:20 jlam Exp $ # # Variable definitions for the IRIX operating system. @@ -100,7 +100,6 @@ _OPSYS_HAS_INET6= no # IPv6 is not standard _OPSYS_HAS_JAVA= no # Java is not standard _OPSYS_HAS_MANZ= no # no MANZ for gzipping of man pages _OPSYS_HAS_OSSAUDIO= no # libossaudio is available -_OPSYS_LIBTOOL_REQD= 1.4.20010614nb9 # base version of libtool required _OPSYS_PERL_REQD= # no base version of perl required _OPSYS_RPATH_NAME= -rpath, # name of symbol in rpath directive to linker _PATCH_CAN_BACKUP= no # native patch(1) can make backups diff --git a/mk/defs.Linux.mk b/mk/defs.Linux.mk index c62bc4f63ff1..004e2d8549a9 100644 --- a/mk/defs.Linux.mk +++ b/mk/defs.Linux.mk @@ -1,4 +1,4 @@ -# $NetBSD: defs.Linux.mk,v 1.42 2002/12/18 06:18:14 schmonz Exp $ +# $NetBSD: defs.Linux.mk,v 1.43 2003/01/10 08:44:20 jlam Exp $ # # Variable definitions for the Linux operating system. @@ -95,7 +95,6 @@ _OPSYS_HAS_INET6= no # IPv6 is not standard _OPSYS_HAS_JAVA= no # Java is not standard _OPSYS_HAS_MANZ= no # no MANZ for gzipping of man pages _OPSYS_HAS_OSSAUDIO= no # libossaudio is available -_OPSYS_LIBTOOL_REQD= 1.4.20010614nb9 # base version of libtool required _OPSYS_PERL_REQD= # no base version of perl required _OPSYS_RPATH_NAME= -R # name of symbol in rpath directive to linker _PATCH_CAN_BACKUP= yes # native patch(1) can make backups diff --git a/mk/defs.NetBSD.mk b/mk/defs.NetBSD.mk index fd2090e897d8..2b3433ff51d7 100644 --- a/mk/defs.NetBSD.mk +++ b/mk/defs.NetBSD.mk @@ -1,4 +1,4 @@ -# $NetBSD: defs.NetBSD.mk,v 1.42 2002/12/18 06:18:15 schmonz Exp $ +# $NetBSD: defs.NetBSD.mk,v 1.43 2003/01/10 08:44:20 jlam Exp $ # # Variable definitions for the NetBSD operating system. @@ -105,7 +105,6 @@ _OPSYS_HAS_INET6= no # IPv6 is not standard _OPSYS_HAS_JAVA= no # Java is not standard _OPSYS_HAS_MANZ= yes # MANZ controls gzipping of man pages _OPSYS_HAS_OSSAUDIO= yes # libossaudio is available -_OPSYS_LIBTOOL_REQD= 1.4.20010614nb9 # base version of libtool required _OPSYS_PERL_REQD= # no base version of perl required _OPSYS_RPATH_NAME= -R # name of symbol in rpath directive to linker _PATCH_CAN_BACKUP= yes # native patch(1) can make backups diff --git a/mk/defs.OpenBSD.mk b/mk/defs.OpenBSD.mk index a6c853c1d32d..a737d55f7cc4 100644 --- a/mk/defs.OpenBSD.mk +++ b/mk/defs.OpenBSD.mk @@ -1,4 +1,4 @@ -# $NetBSD: defs.OpenBSD.mk,v 1.11 2002/12/18 06:18:15 schmonz Exp $ +# $NetBSD: defs.OpenBSD.mk,v 1.12 2003/01/10 08:44:20 jlam Exp $ # # Variable definitions for the OpenBSD operating system. @@ -105,7 +105,6 @@ _OPSYS_HAS_INET6= no # IPv6 is not standard _OPSYS_HAS_JAVA= no # Java is not standard _OPSYS_HAS_MANZ= yes # MANZ controls gzipping of man pages _OPSYS_HAS_OSSAUDIO= yes # libossaudio is available -_OPSYS_LIBTOOL_REQD= 1.4.20010614nb9 # base version of libtool required _OPSYS_PERL_REQD= # no base version of perl required _OPSYS_RPATH_NAME= -R # name of symbol in rpath directive to linker _PATCH_CAN_BACKUP= yes # native patch(1) can make backups diff --git a/mk/defs.SunOS.mk b/mk/defs.SunOS.mk index 60d5bcb6c7dd..667c5e44b30a 100644 --- a/mk/defs.SunOS.mk +++ b/mk/defs.SunOS.mk @@ -1,4 +1,4 @@ -# $NetBSD: defs.SunOS.mk,v 1.50 2003/01/06 22:29:23 grant Exp $ +# $NetBSD: defs.SunOS.mk,v 1.51 2003/01/10 08:44:20 jlam Exp $ # # Variable definitions for the SunOS/Solaris operating system. @@ -111,7 +111,6 @@ _OPSYS_HAS_INET6= no # IPv6 is not standard _OPSYS_HAS_JAVA= no # Java is not standard _OPSYS_HAS_MANZ= no # no MANZ for gzipping of man pages _OPSYS_HAS_OSSAUDIO= no # libossaudio is available -_OPSYS_LIBTOOL_REQD= 1.4.20010614nb9 # base version of libtool required _OPSYS_PERL_REQD= # no base version of perl required _OPSYS_RPATH_NAME= -R # name of symbol in rpath directive to linker _PATCH_CAN_BACKUP= yes # native patch(1) can make backups