pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk Move the +SHLIBS generation code back into the pkgi...
details: https://anonhg.NetBSD.org/pkgsrc/rev/f861d7eef338
branches: trunk
changeset: 531270:f861d7eef338
user: jlam <jlam%pkgsrc.org@localhost>
date: Fri Jul 27 18:37:35 2007 +0000
description:
Move the +SHLIBS generation code back into the pkginstall module. In the
plist module, it was being "defined" too late, and the pkginstall module
never created any +SHLIBS scripts. Sidestep the tools problems with
SHLIB_TYPE by pretending they don't exist (for now).
XXX SHLIB_TYPE needs to be re-thought or removed altogether.
diffstat:
mk/pkginstall/bsd.pkginstall.mk | 42 ++++++++++++++++++++++++++++++++-
mk/pkginstall/shlibs | 51 +++++++++++++++++++++++++++++++++++++++++
mk/plist/plist.mk | 39 +------------------------------
mk/plist/shlibs | 51 -----------------------------------------
4 files changed, 93 insertions(+), 90 deletions(-)
diffs (223 lines):
diff -r 09c17ee4fd08 -r f861d7eef338 mk/pkginstall/bsd.pkginstall.mk
--- a/mk/pkginstall/bsd.pkginstall.mk Fri Jul 27 17:44:43 2007 +0000
+++ b/mk/pkginstall/bsd.pkginstall.mk Fri Jul 27 18:37:35 2007 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkginstall.mk,v 1.28 2007/07/23 15:23:47 jlam Exp $
+# $NetBSD: bsd.pkginstall.mk,v 1.29 2007/07/27 18:37:35 jlam Exp $
#
# This Makefile fragment is included by bsd.pkg.mk and implements the
# common INSTALL/DEINSTALL scripts framework. To use the pkginstall
@@ -686,6 +686,46 @@
${TOUCH} ${TOUCH_ARGS} ${.TARGET}; \
fi
+# SHLIB_TYPE
+# The type of shared library supported by the platform.
+#
+# Default value: ${_OPSYS_SHLIB_TYPE}
+#
+# LDCONFIG_ADD_CMD
+# LDCONFIG_REMOVE_CMD
+# Command-line to be invoked to update the system run-time library
+# search paths database when adding and removing a package.
+#
+# Default value: ${LDCONFIG}
+#
+SHLIB_TYPE= ${_SHLIB_TYPE_cmd:sh}
+_SHLIB_TYPE_cmd= \
+ ${SETENV} PKG_INFO_CMD=${PKG_INFO_CMD:Q} \
+ ${SH} ${.CURDIR}/../../mk/scripts/shlib-type ${_OPSYS_SHLIB_TYPE:Q}
+
+LDCONFIG_ADD_CMD?= ${_LDCONFIG_ADD_CMD.${OPSYS}}
+LDCONFIG_REMOVE_CMD?= ${_LDCONFIG_REMOVE_CMD.${OPSYS}}
+_LDCONFIG_ADD_CMD.${OPSYS}?= ${LDCONFIG}
+_LDCONFIG_REMOVE_CMD.${OPSYS}?= ${LDCONFIG}
+FILES_SUBST+= LDCONFIG_ADD_CMD=${LDCONFIG_ADD_CMD:Q}
+FILES_SUBST+= LDCONFIG_REMOVE_CMD=${LDCONFIG_REMOVE_CMD:Q}
+
+.if ${SHLIB_TYPE} == "a.out"
+RUN_LDCONFIG?= yes
+.else
+RUN_LDCONFIG?= no
+.endif
+
+_INSTALL_SHLIBS_FILE= ${_PKGINSTALL_DIR}/shlibs
+.if !empty(RUN_LDCONFIG:M[Yy][Ee][Ss])
+_INSTALL_UNPACK_TMPL+= ${_INSTALL_SHLIBS_FILE}
+.endif
+
+${_INSTALL_SHLIBS_FILE}: ../../mk/pkginstall/shlibs
+ ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
+ ${_PKG_SILENT}${_PKG_DEBUG} \
+ ${SED} ${FILES_SUBST_SED} ../../mk/pkginstall/shlibs > ${.TARGET}
+
# FONTS_DIRS.<type> are lists of directories in which the font databases
# are updated. If this is non-empty, then the appropriate tools is
# used to update the fonts database for the font type. The supported
diff -r 09c17ee4fd08 -r f861d7eef338 mk/pkginstall/shlibs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mk/pkginstall/shlibs Fri Jul 27 18:37:35 2007 +0000
@@ -0,0 +1,51 @@
+# $NetBSD: shlibs,v 1.7 2007/07/27 18:37:35 jlam Exp $
+#
+# Generate a +SHLIBS script that updates the system run-time library
+# search paths database for the package.
+#
+case "${STAGE},$1" in
+UNPACK,|UNPACK,+SHLIBS)
+ ${CAT} > ./+SHLIBS << 'EOF'
+#!@SH@
+#
+# +SHLIBS - system run-time library search paths database management script
+#
+# Usage: ./+SHLIBS ADD|REMOVE [metadatadir]
+#
+# This scripts rebuilds the system database of run-time library search
+# paths so that the system can find the shared libraries of the package
+# associated with <metadatadir>.
+#
+
+ECHO="@ECHO@"
+PWD_CMD="@PWD_CMD@"
+TRUE="@TRUE@"
+
+SELF=$0
+ACTION=$1
+
+CURDIR=`${PWD_CMD}`
+PKG_METADATA_DIR="${2-${CURDIR}}"
+: ${PKGNAME=${PKG_METADATA_DIR##*/}}
+: ${PKG_PREFIX=@PREFIX@}
+
+exitcode=0
+case $ACTION in
+ADD)
+ ${ECHO} "${PKGNAME}: rebuilding run-time library search paths database"
+ ( @LDCONFIG_ADD_CMD@ ) >/dev/null 2>&1 || ${TRUE}
+ ;;
+
+REMOVE)
+ ${ECHO} "${PKGNAME}: rebuilding run-time library search paths database"
+ ( @LDCONFIG_REMOVE_CMD@ ) >/dev/null 2>&1 || ${TRUE}
+ ;;
+esac
+exit $exitcode
+
+EOF
+ ${SED} -n "/^\# SHLIBS: /p" ${SELF} >> ./+SHLIBS
+ ${CHMOD} +x ./+SHLIBS
+ ;;
+esac
+
diff -r 09c17ee4fd08 -r f861d7eef338 mk/plist/plist.mk
--- a/mk/plist/plist.mk Fri Jul 27 17:44:43 2007 +0000
+++ b/mk/plist/plist.mk Fri Jul 27 18:37:35 2007 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: plist.mk,v 1.28 2007/07/23 15:23:48 jlam Exp $
+# $NetBSD: plist.mk,v 1.29 2007/07/27 18:37:35 jlam Exp $
#
# This Makefile fragment handles the creation of PLISTs for use by
# pkg_create(8).
@@ -157,13 +157,6 @@
_SHLIB_AWKFILE.dylib= ${.CURDIR}/../../mk/plist/shlib-dylib.awk
_SHLIB_AWKFILE.none= ${.CURDIR}/../../mk/plist/shlib-none.awk
-# SHLIB_TYPE is the type of shared library supported by the platform.
-SHLIB_TYPE= ${_SHLIB_TYPE_cmd:sh}
-_SHLIB_TYPE_cmd= \
- ${SETENV} ECHO=${TOOLS_ECHO:Q} FILE_CMD=${TOOLS_FILE_CMD:Q} \
- TEST=${TOOLS_TEST:Q} PKG_INFO_CMD=${PKG_INFO_CMD:Q} \
- ${SH} ${.CURDIR}/../../mk/scripts/shlib-type ${_OPSYS_SHLIB_TYPE:Q}
-
######################################################################
# GENERATE_PLIST is a sequence of commands, terminating in a semicolon,
@@ -258,33 +251,3 @@
${SETENV} ${_PLIST_AWK_ENV} ${AWK} ${_PLIST_INFO_AWK} | \
${AWK} '($$0 !~ "-[0-9]*(\\.gz)?$$") { print }'
.endif
-
-# LDCONFIG_ADD_CMD
-# LDCONFIG_REMOVE_CMD
-# Command-line to be invoked to update the system run-time library
-# search paths database when adding and removing a package.
-#
-# Default value: ${LDCONFIG}
-#
-LDCONFIG_ADD_CMD?= ${_LDCONFIG_ADD_CMD.${OPSYS}}
-LDCONFIG_REMOVE_CMD?= ${_LDCONFIG_REMOVE_CMD.${OPSYS}}
-_LDCONFIG_ADD_CMD.${OPSYS}?= ${LDCONFIG}
-_LDCONFIG_REMOVE_CMD.${OPSYS}?= ${LDCONFIG}
-FILES_SUBST+= LDCONFIG_ADD_CMD=${LDCONFIG_ADD_CMD:Q}
-FILES_SUBST+= LDCONFIG_REMOVE_CMD=${LDCONFIG_REMOVE_CMD:Q}
-
-.if ${SHLIB_TYPE} == "a.out"
-RUN_LDCONFIG?= yes
-.else
-RUN_LDCONFIG?= no
-.endif
-
-_INSTALL_SHLIBS_FILE= ${_PKGINSTALL_DIR}/shlibs
-.if !empty(RUN_LDCONFIG:M[Yy][Ee][Ss])
-_INSTALL_UNPACK_TMPL+= ${_INSTALL_SHLIBS_FILE}
-.endif
-
-${_INSTALL_SHLIBS_FILE}: ../../mk/plist/shlibs
- ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
- ${_PKG_SILENT}${_PKG_DEBUG} \
- ${SED} ${FILES_SUBST_SED} ../../mk/pkginstall/shlibs > ${.TARGET}
diff -r 09c17ee4fd08 -r f861d7eef338 mk/plist/shlibs
--- a/mk/plist/shlibs Fri Jul 27 17:44:43 2007 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-# $NetBSD: shlibs,v 1.1 2007/07/23 15:23:48 jlam Exp $
-#
-# Generate a +SHLIBS script that updates the system run-time library
-# search paths database for the package.
-#
-case "${STAGE},$1" in
-UNPACK,|UNPACK,+SHLIBS)
- ${CAT} > ./+SHLIBS << 'EOF'
-#!@SH@
-#
-# +SHLIBS - system run-time library search paths database management script
-#
-# Usage: ./+SHLIBS ADD|REMOVE [metadatadir]
-#
-# This scripts rebuilds the system database of run-time library search
-# paths so that the system can find the shared libraries of the package
-# associated with <metadatadir>.
-#
-
-ECHO="@ECHO@"
-PWD_CMD="@PWD_CMD@"
-TRUE="@TRUE@"
-
-SELF=$0
-ACTION=$1
-
-CURDIR=`${PWD_CMD}`
-PKG_METADATA_DIR="${2-${CURDIR}}"
-: ${PKGNAME=${PKG_METADATA_DIR##*/}}
-: ${PKG_PREFIX=@PREFIX@}
-
-exitcode=0
-case $ACTION in
-ADD)
- ${ECHO} "${PKGNAME}: rebuilding run-time library search paths database"
- ( @LDCONFIG_ADD_CMD@ ) >/dev/null 2>&1 || ${TRUE}
- ;;
-
-REMOVE)
- ${ECHO} "${PKGNAME}: rebuilding run-time library search paths database"
- ( @LDCONFIG_REMOVE_CMD@ ) >/dev/null 2>&1 || ${TRUE}
- ;;
-esac
-exit $exitcode
-
-EOF
- ${SED} -n "/^\# SHLIBS: /p" ${SELF} >> ./+SHLIBS
- ${CHMOD} +x ./+SHLIBS
- ;;
-esac
-
Home |
Main Index |
Thread Index |
Old Index