aboutsummaryrefslogtreecommitdiffstats
path: root/misc/compat4x
diff options
context:
space:
mode:
authordougb <dougb@FreeBSD.org>2006-01-08 18:41:48 +0800
committerdougb <dougb@FreeBSD.org>2006-01-08 18:41:48 +0800
commit6b3655971ed7cb9893a0e8a0e47121b0ae62699e (patch)
treee23afe19cbafff87797270c4bf1d51e3c30b9aa6 /misc/compat4x
parent9de0c9b1887adb20649749ee56c3e03cef02c1c1 (diff)
downloadfreebsd-ports-graphics-6b3655971ed7cb9893a0e8a0e47121b0ae62699e.tar.gz
freebsd-ports-graphics-6b3655971ed7cb9893a0e8a0e47121b0ae62699e.tar.zst
freebsd-ports-graphics-6b3655971ed7cb9893a0e8a0e47121b0ae62699e.zip
Make use of the ldconfig_local_dirs mechanism just committed to
7-CURRENT. flz has plans to develop the USE_LDCONFIG code in bsd.port.mk, but this will serve as a POC for now.
Diffstat (limited to 'misc/compat4x')
-rw-r--r--misc/compat4x/Makefile26
-rw-r--r--misc/compat4x/pkg-plist.freebsd52
2 files changed, 24 insertions, 4 deletions
diff --git a/misc/compat4x/Makefile b/misc/compat4x/Makefile
index d7accfbc8a8..1a52b38f2aa 100644
--- a/misc/compat4x/Makefile
+++ b/misc/compat4x/Makefile
@@ -7,7 +7,7 @@
PORTNAME= compat4x
PORTVERSION= ${COMPAT4X_PORTVERSION}
-PORTREVISION= 6
+PORTREVISION= 7
CATEGORIES= misc
MASTER_SITES= ${COMPAT4X_MASTER_SITES}
MASTER_SITE_SUBDIR= ${COMPAT4X_MASTER_SITE_SUBDIR}
@@ -19,18 +19,24 @@ MAINTAINER= ports@FreeBSD.org
COMMENT= A convenience package to install the compat4x libraries
WRKSRC= ${WRKDIR}/usr/lib/compat
-NO_MTREE= yes
TARGET_DIR= ${PREFIX}/lib/compat
TARGET32_DIR= ${PREFIX}/lib32/compat
-USE_RC_SUBR= 000.${PORTNAME}.sh
INSTALLS_SHLIB= yes
LDCONFIG_DIRS= %%PREFIX%%/lib/compat
.include <bsd.port.pre.mk>
+.if ${OSVERSION} > 700011
+USE_LDCONFIG= ${TARGET_DIR}
+PLIST_SUB+= USE_LDCONFIG=""
+.else
+NO_MTREE= yes
+USE_RC_SUBR= 000.${PORTNAME}.sh
SUB_LIST+= LDCONFIG="${LDCONFIG}"
+PLIST_SUB+= USE_LDCONFIG="@comment "
+.endif
.if ${OSVERSION} >= 600016
RUN_DEPENDS= ${LOCALBASE}/share/compat/locale/UTF-8/LC_CTYPE:${PORTSDIR}/misc/localedata
@@ -82,11 +88,15 @@ PLIST_SUB+= I386_ONLY="@comment "
.if ${ARCH} == amd64
PLIST_SUB+= AMD64_ONLY=""
PLIST_SUB+= LDCONFIG_LIB32="${LDCONFIG} -32"
+.if defined(USE_RC_SUBR)
SUB_LIST+= AMD64="" TARGET32_DIR="${TARGET32_DIR}"
+.endif
.else
PLIST_SUB+= AMD64_ONLY="@comment "
+.if defined(USE_RC_SUBR)
SUB_LIST+= AMD64="@comment "
.endif
+.endif
OPENSSL_LIBS= libcrypto.so.1 libcrypto.so.2 libssl.so.1 libssl.so.2
.if defined(FORCE_VULNERABLE_OPENSSL)
@@ -128,6 +138,7 @@ do-extract:
.endif
post-extract:
+.if defined(USE_RC_SUBR)
@( ${ECHO} ""; \
${ECHO} "******************************************************"; \
${ECHO} "To enable the ldconfig of these libraries at boot time"; \
@@ -135,8 +146,8 @@ post-extract:
${ECHO} "/etc/rc.conf.local or /etc/rc.conf"; \
${ECHO} "******************************************************"; \
${ECHO} ""; ) > ${WRKDIR}/pkg-message
-
PKGMESSAGE= ${WRKDIR}/pkg-message
+.endif
NO_BUILD= yes
@@ -154,6 +165,13 @@ do-install:
post-install:
@${SH} ${PKGINSTALL} ${PORTNAME} POST-INSTALL
+.if defined(USE_LDCONFIG)
+ @${ECHO} ${USE_LDCONFIG} > ${PREFIX}/libdata/ldconfig/${UNIQUENAME}
+.if ${ARCH} == amd64
+ @${ECHO} ${TARGET32_DIR} > ${PREFIX}/libdata/ldconfig32/${UNIQUENAME}
+.endif
+.else
@${CAT} ${PKGMESSAGE}
+.endif
.include <bsd.port.post.mk>
diff --git a/misc/compat4x/pkg-plist.freebsd5 b/misc/compat4x/pkg-plist.freebsd5
index dc23fe05317..4fb03a70254 100644
--- a/misc/compat4x/pkg-plist.freebsd5
+++ b/misc/compat4x/pkg-plist.freebsd5
@@ -37,6 +37,8 @@
%%LIBDIR%%/compat/pam_ssh.so
%%LIBDIR%%/compat/pam_tacplus.so
%%LIBDIR%%/compat/pam_unix.so
+%%USE_LDCONFIG%%libdata/ldconfig/compat4x
+%%USE_LDCONFIG%%%%AMD64%%libdata/ldconfig32/compat4x
%%AMD64_ONLY%%@exec %%LDCONFIG_LIB32%% -m %D/%%LIBDIR%%/compat
@unexec rmdir %D/%%LIBDIR%%/compat 2>/dev/null || true
@comment Hardcode lib32 since we should not remove lib.