ports/146351: [patch] [bsd.port.mk] Retire INSTALLS_SHLIB
Alex Kozlov
spam at rm-rf.kiev.ua
Thu May 6 08:50:01 UTC 2010
>Number: 146351
>Category: ports
>Synopsis: [patch] [bsd.port.mk] Retire INSTALLS_SHLIB
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu May 06 08:50:00 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Alex Kozlov
>Release: RELENG_8
>Organization:
private
>Environment:
>Description:
INSTALLS_SHLIB is deprecated and no one port use it anymore.
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
Index: Mk/bsd.port.mk
@@ -489,7 +489,7 @@
# or a sound server which supports the FreeBSD native one),
# use the default or the X11 prefix if it's a leaf port
# (e.g. a game or program).
-# Implies NO_MTREE=yes, and, if INSTALLS_SHLIB is defined:
+# Implies NO_MTREE=yes, and, if USE_LDCONFIG is defined:
# - USE_LINUX=yes
# - appropriate invocation of the Linux ldconfig
# USE_LINUX_RPM - Set to yes to pull in variables and targets useful to Linux
@@ -987,25 +987,10 @@
# SUB_LIST - List of "variable=value" pair for substitution in ${SUB_FILES}
# Some pairs are added by default: eg. PREFIX=${PREFIX}
#
-# INSTALLS_SHLIB
-# - If set, bsd.port.mk will automatically run ldconfig commands
-# from post-install and also add appropriate @exec/@unexec
-# directives to directories listed in LDCONFIG_DIRS. (deprecated)
-# If USE_LINUX_PREFIX is defined, the Linux version of
-# ldconfig will be used instead of the native FreeBSD
-# version, and LDCONFIG_DIRS will be ignored.
-# LDCONFIG_DIRS - List of directories to run ldconfig if INSTALLS_SHLIB is set.
-# Note that this is passed through sed just like the
-# rest of PLIST, so ${PLIST_SUB} substitutions also
-# apply here. It is recommended that you use
-# %%PREFIX%% for ${PREFIX}, %%LOCALBASE%% for
-# ${LOCALBASE} and %%X11BASE%% for ${X11BASE}.
-# Default: %%PREFIX%%/lib
-# USE_LDCONFIG - If set to "yes", this subsumes the function of the
-# deprecated variable INSTALLS_SHLIB and adds ${PREFIX}/lib
-# to the list of directories to be searched for shared
-# libraries. Otherwise, this is a list of directories to
-# be added to that list. The directory names are written to
+# USE_LDCONFIG - If set to "yes", this adds ${PREFIX}/lib to the list of
+# directories to be searched for shared libraries.
+# Otherwise, this is a list of directories to be added to that
+# list. The directory names are written to
# ${PREFIX}/libdata/ldconfig/${UNIQUENAME} which is then
# used by the ldconfig startup script.
# This mechanism replaces ldconfig scripts installed by some
@@ -1435,12 +1420,6 @@
.if defined(USE_LINUX_PREFIX)
LDCONFIG_CMD?= ${LINUXBASE}/sbin/ldconfig -r ${LINUXBASE}
-LDCONFIG_PLIST_EXEC_CMD?= ${LDCONFIG_CMD}
-LDCONFIG_PLIST_UNEXEC_CMD?= ${LDCONFIG_CMD}
-.else
-LDCONFIG_CMD?= ${LDCONFIG} -m ${LDCONFIG_RUNLIST}
-LDCONFIG_PLIST_EXEC_CMD?= ${LDCONFIG} -m ${LDCONFIG_PLIST}
-LDCONFIG_PLIST_UNEXEC_CMD?= ${LDCONFIG} -R
.endif
PKGCOMPATDIR?= ${LOCALBASE}/lib/compat/pkg
@@ -1891,7 +1870,7 @@
. endif
.endif
-.if defined(USE_LINUX_PREFIX) && (defined(INSTALLS_SHLIB) || defined(USE_LDCONFIG))
+.if defined(USE_LINUX_PREFIX) && defined(USE_LDCONFIG)
# we need ${LINUXBASE}/sbin/ldconfig
USE_LINUX?= yes
.endif
@@ -3164,14 +3143,6 @@
_DESKTOPDIR_REL=
.endif
-# Put this as far down as possible so it will catch all PLIST_SUB definitions.
-
-.if defined(INSTALLS_SHLIB)
-LDCONFIG_DIRS?= %%PREFIX%%/lib
-LDCONFIG_PLIST!= ${ECHO_CMD} ${LDCONFIG_DIRS} | ${SED} ${PLIST_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/}
-LDCONFIG_RUNLIST!= ${ECHO_CMD} ${LDCONFIG_PLIST} | ${SED} -e "s!%D!${PREFIX}!g"
-.endif
-
.MAIN: all
################################################################
@@ -4022,7 +3993,7 @@
.if !target(install-ldconfig-file)
install-ldconfig-file:
-.if defined(USE_LDCONFIG) || defined(USE_LDCONFIG32) || defined(INSTALLS_SHLIB)
+.if defined(USE_LDCONFIG) || defined(USE_LDCONFIG32)
.if defined(USE_LDCONFIG)
.if defined(USE_LINUX_PREFIX)
@${ECHO_MSG} "===> Running linux ldconfig"
@@ -4072,25 +4043,9 @@
.endif
.endif
.endif
-# This can be removed once all ports have been converted to USE_LDCONFIG.
+
.if defined(INSTALLS_SHLIB)
-.if defined(USE_LDCONFIG)
- @${ECHO_MSG} "===> INSTALLS_SHLIB and USE_LDCONFIG both defined."
-.endif
-.if defined(USE_LDCONFIG32)
- @${ECHO_MSG} "===> INSTALLS_SHLIB and USE_LDCONFIG32 both defined."
-.endif
-.if !defined(INSTALL_AS_USER)
- @${ECHO_MSG} "===> Running ldconfig"
- ${LDCONFIG_CMD}
-.else
- @${ECHO_MSG} "===> Running ldconfig (errors are ignored)"
- -${LDCONFIG_CMD}
-.endif
-.endif
-.else
- @${DO_NADA}
-.endif
+ @${ECHO_MSG} "INSTALLS_SHLIB is deprecated. Use USE_LDCONFIG instead."
.endif
.if !target(create-users-groups)
@@ -5774,14 +5729,6 @@
.for dir in ${PLIST_DIRS}
@${ECHO_CMD} ${dir} | ${SED} ${PLIST_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} -e 's,^, at dirrm ,' >> ${TMPPLIST}
.endfor
-# To be removed once INSTALLS_SHLIB has been eradicated.
-.if defined(INSTALLS_SHLIB) && !defined(INSTALL_AS_USER)
- @${ECHO_CMD} "@exec ${LDCONFIG_PLIST_EXEC_CMD}" >> ${TMPPLIST}
- @${ECHO_CMD} "@unexec ${LDCONFIG_PLIST_UNEXEC_CMD}" >> ${TMPPLIST}
-.elif defined(INSTALLS_SHLIB)
- @${ECHO_CMD} "@exec ${LDCONFIG_PLIST_EXEC_CMD} || ${TRUE}" >> ${TMPPLIST}
- @${ECHO_CMD} "@unexec ${LDCONFIG_PLIST_UNEXEC_CMD} || ${TRUE}" >> ${TMPPLIST}
-.endif
.if defined(USE_LINUX_PREFIX)
.if defined(USE_LDCONFIG)
@${ECHO_CMD} "@exec ${LDCONFIG_CMD}" >> ${TMPPLIST}
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list