From 2211587f68c88655e22dbe6b0d719630e8e1b62c Mon Sep 17 00:00:00 2001 From: Marcus Alves Grando Date: Wed, 7 Jun 2006 12:34:51 +0000 Subject: - Use misc/ldconfig_compat on 4.x and rc.d/ldconfig in {5,6}x, this change fix rc.d script starting too late. With this, ldconfig run automaticaly on startup and doesn't need add compat{4,5}x_enable in rc.conf. No objection: freebsd-rc, portmgr --- misc/compat5x/Makefile | 63 ++++++++++------------------------ misc/compat5x/files/000.compat5x.sh.in | 27 --------------- misc/compat5x/pkg-descr | 12 ++++--- misc/compat5x/pkg-message | 9 +++++ misc/compat5x/pkg-plist | 2 -- 5 files changed, 35 insertions(+), 78 deletions(-) delete mode 100644 misc/compat5x/files/000.compat5x.sh.in create mode 100644 misc/compat5x/pkg-message (limited to 'misc/compat5x') diff --git a/misc/compat5x/Makefile b/misc/compat5x/Makefile index c3156f1124f4..f7e65b0161c5 100644 --- a/misc/compat5x/Makefile +++ b/misc/compat5x/Makefile @@ -11,7 +11,7 @@ PORTNAME= compat5x PORTVERSION= 5.4.0.8 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= misc MASTER_SITES= ${MASTER_SITE_LOCAL} MASTER_SITE_SUBDIR=lesi/compat5x @@ -21,32 +21,25 @@ DISTNAME= ${PORTNAME}-${ARCH}-${PORTVERSION} MAINTAINER= ports@FreeBSD.org COMMENT= A convenience package to install the compat5x libraries -ONLY_FOR_ARCHS= alpha amd64 i386 sparc64 -USE_BZIP2= yes WRKSRC= ${WRKDIR}/${PORTNAME} + +USE_BZIP2= yes +NO_BUILD= yes +ONLY_FOR_ARCHS= alpha amd64 i386 sparc64 INSTALLS_SHLIB= yes LDCONFIG_DIRS= %%PREFIX%%/lib/compat TARGET_DIR= ${PREFIX}/lib/compat TARGET32_DIR= ${PREFIX}/lib32/compat +USE_LDCONFIG= ${TARGET_DIR} .include .if ${OSVERSION} < 600000 -IGNORE= is for FreeBSD 6.x and newer -.endif - -.if ${OSVERSION} > 700011 || (${OSVERSION} < 700000 && ${OSVERSION} >= 600104) -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 " +IGNORE= is for FreeBSD 6.x and newer .endif .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 ${ARCH} == alpha @@ -54,60 +47,42 @@ PLIST_SUB+= ALPHA="" .else PLIST_SUB+= ALPHA="@comment " .endif + .if ${ARCH} == amd64 PLIST_SUB+= AMD64="" PLIST_SUB+= LDCONFIG_LIB32="${LDCONFIG} -32" -.if defined(USE_RC_SUBR) -SUB_LIST+= AMD64="" TARGET32_DIR="${TARGET32_DIR}" -.endif +USE_LDCONFIG32= ${TARGET32_DIR} .else PLIST_SUB+= AMD64="@comment " -.if defined(USE_RC_SUBR) -SUB_LIST+= AMD64="@comment " -.endif .endif + .if ${ARCH} == i386 PLIST_SUB+= I386="" .else PLIST_SUB+= I386="@comment " .endif + .if ${ARCH} == sparc64 PLIST_SUB+= SPARC64="" .else PLIST_SUB+= SPARC64="@comment " .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 compat5x_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} (cd ${WRKSRC} && ${INSTALL_DATA} *.so.* ${TARGET_DIR}) .if ${ARCH} == amd64 - ${MKDIR} ${TARGET32_DIR} + @${MKDIR} ${TARGET32_DIR} (cd ${WRKSRC}/lib32 && ${INSTALL_DATA} *.so.* ${TARGET32_DIR}) - ${LDCONFIG} -32 -m ${TARGET32_DIR} .endif -post-install: -.if defined(USE_LDCONFIG) - @${ECHO} ${USE_LDCONFIG} > ${PREFIX}/libdata/ldconfig/${UNIQUENAME} +# 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} + @${LDCONFIG} -32 -m ${TARGET32_DIR} .endif -.else @${CAT} ${PKGMESSAGE} -.endif .include diff --git a/misc/compat5x/files/000.compat5x.sh.in b/misc/compat5x/files/000.compat5x.sh.in deleted file mode 100644 index 4d6f4da222eb..000000000000 --- a/misc/compat5x/files/000.compat5x.sh.in +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# -# PROVIDE: compat5x -# REQUIRE: ldconfig -# -# Add the following to /etc/rc.conf[.local] to enable this service -# -# compat5x_enable="YES" -# - -. %%RC_SUBR%% - -name=compat5x -rcvar=`set_rcvar` - -command=%%LDCONFIG%% -command_args='-m %%PREFIX%%/lib/compat' -%%AMD64%% -%%AMD64%%start_postcmd=${name}_poststart -%%AMD64%%compat5x_poststart () { -%%AMD64%% %%LDCONFIG%% -32 -m %%TARGET32_DIR%% -%%AMD64%%} - -load_rc_config ${name} -run_rc_command "$1" diff --git a/misc/compat5x/pkg-descr b/misc/compat5x/pkg-descr index cb9a1c50c884..50e19528a58a 100644 --- a/misc/compat5x/pkg-descr +++ b/misc/compat5x/pkg-descr @@ -1,10 +1,12 @@ This package allows you to install the compat5x libraries on your system, so you can use legacy binaries that depend on them. -Usage example: +Ports usage example: - .include +-- +.include - .if ${OSVERSION} >= 600000 - LIB_DEPENDS+= c.5:${PORTSDIR}/misc/compat5x - .endif +.if ${OSVERSION} >= 600000 +LIB_DEPENDS+= c.5:${PORTSDIR}/misc/compat5x +.endif +-- diff --git a/misc/compat5x/pkg-message b/misc/compat5x/pkg-message new file mode 100644 index 000000000000..4b66e23d89a9 --- /dev/null +++ b/misc/compat5x/pkg-message @@ -0,0 +1,9 @@ +******************************************************************************* +* * +* Do not forget to add COMPAT_FREEBSD5 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/compat5x/pkg-plist b/misc/compat5x/pkg-plist index c1456bac8d57..1917d4c53d4b 100644 --- a/misc/compat5x/pkg-plist +++ b/misc/compat5x/pkg-plist @@ -107,8 +107,6 @@ lib/compat/pam_unix.so.2 lib/compat/snmp_atm.so.2 lib/compat/snmp_mibII.so.2 lib/compat/snmp_netgraph.so.2 -%%USE_LDCONFIG%%libdata/ldconfig/compat5x -%%USE_LDCONFIG%%%%AMD64%%libdata/ldconfig32/compat5x %%AMD64%%lib32/compat/libalias.so.4 %%AMD64%%lib32/compat/libarchive.so.1 %%AMD64%%lib32/compat/libatm.so.2 -- cgit v1.2.3