Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108212359
D20951.id59758.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D20951.id59758.diff
View Options
Index: Keywords/ldconfig-linux.ucl
===================================================================
--- /dev/null
+++ Keywords/ldconfig-linux.ucl
@@ -0,0 +1,17 @@
+# $FreeBSD$
+#
+# MAINTAINER: portmgr@FreeBSD.org
+#
+
+post-install: <<EOD
+ if [ -n "`/sbin/sysctl -q compat.linux.osrelease`" ]; then
+ LINUXBASE="%@"
+ ${LINUXBASE}/sbin/ldconfig
+ fi
+EOD
+post-uninstall: <<EOD
+ if [ -n "`/sbin/sysctl -q compat.linux.osrelease`" ]; then
+ LINUXBASE="%@"
+ ${LINUXBASE}/sbin/ldconfig
+ fi
+EOD
Index: Keywords/ldconfig.ucl
===================================================================
--- /dev/null
+++ Keywords/ldconfig.ucl
@@ -0,0 +1,19 @@
+# $FreeBSD$
+#
+# MAINTAINER: portmgr@FreeBSD.org
+#
+
+post-install: <<EOD
+ if ! /usr/sbin/service ldconfig restart >/dev/null; then
+ if [ -z "${INSTALL_AS_USER}" ]; then
+ exit 1
+ fi
+ fi
+EOD
+post-uninstall: <<EOD
+ if ! /usr/sbin/service ldconfig restart >/dev/null; then
+ if [ -z "${INSTALL_AS_USER}" ]; then
+ exit 1
+ fi
+ fi
+EOD
Index: Mk/bsd.port.mk
===================================================================
--- Mk/bsd.port.mk
+++ Mk/bsd.port.mk
@@ -1864,6 +1864,14 @@
IGNORE= has USE_LDCONFIG32 set to yes, which is not correct
.endif
+.if defined(USE_LDCONFIG) || defined(USE_LDCONFIG32)
+.if defined(USE_LINUX_PREFIX)
+PLIST_FILES+= "@ldconfig-linux ${LINUXBASE}"
+.else
+PLIST_FILES+= "@ldconfig"
+.endif
+.endif
+
PKG_IGNORE_DEPENDS?= 'this_port_does_not_exist'
.if defined(_DESTDIR_VIA_ENV)
@@ -4453,23 +4461,6 @@
@${ECHO_CMD} ${dir} | ${SED} ${PLIST_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} -e 's,^,@dir ,' >> ${TMPPLIST}
.endfor
-.if defined(USE_LINUX_PREFIX)
-.if defined(USE_LDCONFIG)
- @${ECHO_CMD} '@preexec [ -n "`/sbin/sysctl -q compat.linux.osrelease`" ] || ( echo "Cannot install package: kernel missing Linux support"; exit 1 )' >> ${TMPPLIST}
- @${ECHO_CMD} "@postexec ${LINUXBASE}/sbin/ldconfig" >> ${TMPPLIST}
- @${ECHO_CMD} "@postunexec ${LINUXBASE}/sbin/ldconfig" >> ${TMPPLIST}
-.endif
-.else
-.if defined(USE_LDCONFIG) || defined(USE_LDCONFIG32)
-.if !defined(INSTALL_AS_USER)
- @${ECHO_CMD} "@postexec /usr/sbin/service ldconfig restart > /dev/null" >> ${TMPPLIST}
- @${ECHO_CMD} "@postunexec /usr/sbin/service ldconfig restart > /dev/null" >> ${TMPPLIST}
-.else
- @${ECHO_CMD} "@postexec /usr/sbin/service ldconfig restart > /dev/null || ${TRUE}" >> ${TMPPLIST}
- @${ECHO_CMD} "@postunexec /usr/sbin/service ldconfig restart > /dev/null || ${TRUE}" >> ${TMPPLIST}
-.endif
-.endif
-.endif
.endif
${TMPPLIST}:
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 23, 5:21 PM (20 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16059400
Default Alt Text
D20951.id59758.diff (2 KB)
Attached To
Mode
D20951: Use keyword to simplify ldconfig code
Attached
Detach File
Event Timeline
Log In to Comment