aboutsummaryrefslogtreecommitdiff
path: root/misc/compat4x
diff options
context:
space:
mode:
authorMarcus Alves Grando <mnag@FreeBSD.org>2006-06-07 12:34:51 +0000
committerMarcus Alves Grando <mnag@FreeBSD.org>2006-06-07 12:34:51 +0000
commit2211587f68c88655e22dbe6b0d719630e8e1b62c (patch)
tree4b1f2a0c0a5b56b37109ec572f69be7ec87f3189 /misc/compat4x
parentf6199f9c2d2e46114e4fdf6c3fcc54bfc4eb7d99 (diff)
downloadports-2211587f68c88655e22dbe6b0d719630e8e1b62c.tar.gz
ports-2211587f68c88655e22dbe6b0d719630e8e1b62c.zip
Notes
Diffstat (limited to 'misc/compat4x')
-rw-r--r--misc/compat4x/Makefile78
-rw-r--r--misc/compat4x/files/000.compat4x.sh.in27
-rw-r--r--misc/compat4x/pkg-descr13
-rw-r--r--misc/compat4x/pkg-install20
-rw-r--r--misc/compat4x/pkg-message9
-rw-r--r--misc/compat4x/pkg-plist.freebsd52
6 files changed, 40 insertions, 109 deletions
diff --git a/misc/compat4x/Makefile b/misc/compat4x/Makefile
index 31c4bcc40039..8132d0a52d21 100644
--- a/misc/compat4x/Makefile
+++ b/misc/compat4x/Makefile
@@ -7,7 +7,7 @@
PORTNAME= compat4x
PORTVERSION= ${COMPAT4X_PORTVERSION}
-PORTREVISION= 8
+PORTREVISION= 9
CATEGORIES= misc
MASTER_SITES= ${COMPAT4X_MASTER_SITES}
MASTER_SITE_SUBDIR= ${COMPAT4X_MASTER_SITE_SUBDIR}
@@ -20,29 +20,22 @@ COMMENT= A convenience package to install the compat4x libraries
WRKSRC= ${WRKDIR}/usr/lib/compat
-TARGET_DIR= ${PREFIX}/lib/compat
-TARGET32_DIR= ${PREFIX}/lib32/compat
-
+NO_BUILD= yes
INSTALLS_SHLIB= yes
LDCONFIG_DIRS= %%PREFIX%%/lib/compat
+TARGET_DIR= ${PREFIX}/lib/compat
+TARGET32_DIR= ${PREFIX}/lib32/compat
+LDCONFIG_LIB32= ${LDCONFIG} -32
+USE_LDCONFIG= ${TARGET_DIR}
.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
-
COMPAT4X_ARCH= ${ARCH}
.if ${OSVERSION} >= 600016
-RUN_DEPENDS= ${LOCALBASE}/share/compat/locale/UTF-8/LC_CTYPE:${PORTSDIR}/misc/localedata
+RUN_DEPENDS+= ${LOCALBASE}/share/compat/locale/UTF-8/LC_CTYPE:${PORTSDIR}/misc/localedata
.endif
+
.if ${OSVERSION} >= 500000
COMPAT4X_OSVERSION= 5.3
PLIST= ${.CURDIR}/pkg-plist.freebsd5
@@ -90,19 +83,16 @@ PLIST_SUB+= I386_ONLY="@comment "
.if ${ARCH} == amd64
PLIST_SUB+= AMD64_ONLY="" AMD64NA="@comment "
PLIST_SUB+= LDCONFIG_LIB32="${LDCONFIG} -32"
-.if defined(USE_RC_SUBR)
-SUB_LIST+= AMD64="" TARGET32_DIR="${TARGET32_DIR}"
-.endif
+USE_LDCONFIG32= ${TARGET32_DIR}
+.undef USE_LDCONFIG
+INSTALLS_SHLIB= no
.else
PLIST_SUB+= AMD64_ONLY="@comment " AMD64NA=""
-.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)
-FORBIDDEN= "FreeBSD-SA-02:33.openssl, FreeBSD-SA-03:02.openssl, FreeBSD-SA-03:18.openssl - OpenSSL contains multiple vulnerabilities"
+FORBIDDEN= FreeBSD-SA-02:33.openssl, FreeBSD-SA-03:02.openssl, FreeBSD-SA-03:18.openssl - OpenSSL contains multiple vulnerabilities
PLIST_SUB+= FORBIDDEN:=""
.else
@@ -116,8 +106,8 @@ COMPAT4X_PORTVERSION= ${COMPAT4X_OSVERSION}.${COMPAT4X_OSRELDATE}
COMPAT4X_MASTER_SITES= ftp://current.FreeBSD.org/pub/FreeBSD/%SUBDIR%/
COMPAT4X_MASTER_SITE_SUBDIR= snapshots/${COMPAT4X_ARCH}/${COMPAT4X_OSVERSION}-${COMPAT4X_OSBRANCH}-${COMPAT4X_OSRELDATE}-JPSNAP/${PORTNAME}
.elif ${COMPAT4X_OSVERSION} == "5.3"
-COMPAT4X_PORTVERSION= ${COMPAT4X_OSVERSION}
-COMPAT4X_MASTER_SITES= ${MASTER_SITE_LOCAL}
+COMPAT4X_PORTVERSION= ${COMPAT4X_OSVERSION}
+COMPAT4X_MASTER_SITES= ${MASTER_SITE_LOCAL}
COMPAT4X_MASTER_SITE_SUBDIR= kris/${COMPAT4X_ARCH}
.else
COMPAT4X_PORTVERSION= ${COMPAT4X_OSVERSION}
@@ -126,55 +116,35 @@ COMPAT4X_MASTER_SITE_SUBDIR= releases/${COMPAT4X_ARCH}/${COMPAT4X_OSVERSION}-REL
.endif
do-extract:
- ${MKDIR} ${WRKDIR}
- cd ${DISTDIR}/${DIST_SUBDIR} && ${CAT} ${DISTFILES} | ${TAR} -xzf - -C ${WRKDIR}
+ @${MKDIR} ${WRKDIR}
+ @(cd ${DISTDIR}/${DIST_SUBDIR} && ${CAT} ${DISTFILES} | ${TAR} -xzf - -C ${WRKDIR} )
.if ${OSVERSION} >= 500000
.for lib in ${FREEBSD4_LIBS}
- ${MV} ${WRKSRC}/${lib} ${WRKSRC}/${lib}.compat4x
+ @${MV} ${WRKSRC}/${lib} ${WRKSRC}/${lib}.compat4x
.endfor
.endif
.if !defined(FORCE_VULNERABLE_OPENSSL)
.for lib in ${OPENSSL_LIBS}
- ${RM} -f ${WRKSRC}/${lib}
+ @${RM} -f ${WRKSRC}/${lib}
.endfor
.endif
-post-extract:
-.if defined(USE_RC_SUBR)
- @( ${ECHO} ""; \
- ${ECHO} "******************************************************"; \
- ${ECHO} "To enable the ldconfig of these libraries at boot time"; \
- ${ECHO} "you need to add compat4x_enable=\"yes\" to either"; \
- ${ECHO} "/etc/rc.conf.local or /etc/rc.conf"; \
- ${ECHO} "******************************************************"; \
- ${ECHO} ""; ) > ${WRKDIR}/pkg-message
-PKGMESSAGE= ${WRKDIR}/pkg-message
-.endif
-
-NO_BUILD= yes
-
do-install:
- ${MKDIR} ${TARGET_DIR}
+ @${MKDIR} ${TARGET_DIR}
${INSTALL_DATA} ${WRKSRC}/* ${TARGET_DIR}/
.if ${OSVERSION} >= 500000
.for lib in ${FREEBSD4_LIBS}
${LN} -sf ${lib}.compat4x ${TARGET_DIR}/${lib}
.endfor
.endif
-.if ${ARCH} == amd64
- ${LDCONFIG} -32 -m ${TARGET32_DIR}
-.endif
-post-install:
- @${SH} ${PKGINSTALL} ${PORTNAME} POST-INSTALL
-.if defined(USE_LDCONFIG)
+# Include to automatic install file in libdata/ldconfig{,32}
+.include "${PORTSDIR}/misc/ldconfig_compat/bsd.ldconfig.mk"
+
+post-install: install-ldconfig-file
.if ${ARCH} == amd64
- @${ECHO} ${TARGET32_DIR} > ${PREFIX}/libdata/ldconfig32/${UNIQUENAME}
-.else
- @${ECHO} ${USE_LDCONFIG} > ${PREFIX}/libdata/ldconfig/${UNIQUENAME}
+ ${LDCONFIG} -32 -m ${TARGET32_DIR}
.endif
-.else
@${CAT} ${PKGMESSAGE}
-.endif
.include <bsd.port.post.mk>
diff --git a/misc/compat4x/files/000.compat4x.sh.in b/misc/compat4x/files/000.compat4x.sh.in
deleted file mode 100644
index c7d329ade982..000000000000
--- a/misc/compat4x/files/000.compat4x.sh.in
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD$
-#
-# PROVIDE: compat4x
-# REQUIRE: ldconfig
-#
-# Add the following to /etc/rc.conf[.local] to enable this service
-#
-# compat4x_enable="YES"
-#
-
-. %%RC_SUBR%%
-
-name=compat4x
-rcvar=`set_rcvar`
-
-command=%%LDCONFIG%%
-command_args='-m %%PREFIX%%/lib/compat'
-%%AMD64%%
-%%AMD64%%start_postcmd=${name}_poststart
-%%AMD64%%compat4x_poststart () {
-%%AMD64%% %%LDCONFIG%% -32 -m %%TARGET32_DIR%%
-%%AMD64%%}
-
-load_rc_config ${name}
-run_rc_command "$1"
diff --git a/misc/compat4x/pkg-descr b/misc/compat4x/pkg-descr
index d78c931f5988..348da64b5108 100644
--- a/misc/compat4x/pkg-descr
+++ b/misc/compat4x/pkg-descr
@@ -1,11 +1,12 @@
This package allows you to install the compat4x libraries on your
system, so you can use legacy binaries that depend on them.
-Usage example:
+Ports usage example:
- .include <bsd.port.pre.mk>
-
- .if ${OSVERSION} >= 500000
- LIB_DEPENDS+= c.4:${PORTSDIR}/misc/compat4x
- .endif
+--
+.include <bsd.port.pre.mk>
+.if ${OSVERSION} >= 500000
+LIB_DEPENDS+= c.4:${PORTSDIR}/misc/compat4x
+.endif
+--
diff --git a/misc/compat4x/pkg-install b/misc/compat4x/pkg-install
deleted file mode 100644
index 3b23fcfaaffa..000000000000
--- a/misc/compat4x/pkg-install
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD$
-#
-
-case $2 in
- POST-INSTALL)
- echo ""
- echo "*******************************************************************************"
- echo "* *"
- echo "* Do not forget to add COMPAT_FREEBSD4 into *"
- echo "* your kernel configuration (enabled by default). *"
- echo "* *"
- echo "* To configure and recompile your kernel see: *"
- echo "* http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html *"
- echo "* *"
- echo "*******************************************************************************"
- echo ""
- ;;
-esac
diff --git a/misc/compat4x/pkg-message b/misc/compat4x/pkg-message
new file mode 100644
index 000000000000..307efefbd085
--- /dev/null
+++ b/misc/compat4x/pkg-message
@@ -0,0 +1,9 @@
+*******************************************************************************
+* *
+* Do not forget to add COMPAT_FREEBSD4 into *
+* your kernel configuration (enabled by default). *
+* *
+* To configure and recompile your kernel see: *
+* http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html *
+* *
+*******************************************************************************
diff --git a/misc/compat4x/pkg-plist.freebsd5 b/misc/compat4x/pkg-plist.freebsd5
index 95d32665a7e0..8976500b7be9 100644
--- a/misc/compat4x/pkg-plist.freebsd5
+++ b/misc/compat4x/pkg-plist.freebsd5
@@ -37,8 +37,6 @@
%%LIBDIR%%/compat/pam_ssh.so
%%LIBDIR%%/compat/pam_tacplus.so
%%LIBDIR%%/compat/pam_unix.so
-%%USE_LDCONFIG%%%%AMD64NA%%libdata/ldconfig/compat4x
-%%USE_LDCONFIG%%%%AMD64_ONLY%%libdata/ldconfig32/compat4x
%%AMD64_ONLY%%@exec %%LDCONFIG_LIB32%% -m %D/%%LIBDIR%%/compat
@dirrmtry %%LIBDIR%%/compat
@comment Hardcode lib32 since we should not remove lib.