aboutsummaryrefslogtreecommitdiffstats
path: root/misc
diff options
context:
space:
mode:
authorlesi <lesi@FreeBSD.org>2005-12-08 10:14:30 +0800
committerlesi <lesi@FreeBSD.org>2005-12-08 10:14:30 +0800
commit1f9dff9fec0735ba99984fb584e7837decebaafe (patch)
treea3403b6d437c33630067e5083861f470e3321e05 /misc
parent744a5f4e33e573d131086b4932b7962d3a194086 (diff)
downloadfreebsd-ports-gnome-1f9dff9fec0735ba99984fb584e7837decebaafe.tar.gz
freebsd-ports-gnome-1f9dff9fec0735ba99984fb584e7837decebaafe.tar.zst
freebsd-ports-gnome-1f9dff9fec0735ba99984fb584e7837decebaafe.zip
Add support for installing i386 4.x libraries on the amd64 architecture.
PR: ports/87525 Submitted by: Simun Mikecin (numisemis at yahoo dot com)
Diffstat (limited to 'misc')
-rw-r--r--misc/compat4x/Makefile20
-rw-r--r--misc/compat4x/pkg-plist.freebsd575
2 files changed, 59 insertions, 36 deletions
diff --git a/misc/compat4x/Makefile b/misc/compat4x/Makefile
index d29fe17aa65b..b647e2364af6 100644
--- a/misc/compat4x/Makefile
+++ b/misc/compat4x/Makefile
@@ -35,9 +35,17 @@ RUN_DEPENDS= ${LOCALBASE}/share/compat/locale/UTF-8/LC_CTYPE:${PORTSDIR}/misc/l
COMPAT4X_OSVERSION= 5.3
PLIST= ${.CURDIR}/pkg-plist.freebsd5
.if ${ARCH} == i386
+PLIST_SUB+= LIBDIR="lib"
+COMPAT4X_DISTFILES= ${PORTNAME}.aa \
+ ${PORTNAME}.ab
+.elif ${ARCH} == amd64
+ARCH= i386
+TARGET_DIR= ${PREFIX}/lib32/compat
+PLIST_SUB+= LIBDIR="lib32"
COMPAT4X_DISTFILES= ${PORTNAME}.aa \
${PORTNAME}.ab
.elif ${ARCH} == alpha
+PLIST_SUB+= LIBDIR="lib"
COMPAT4X_DISTFILES= ${PORTNAME}.aa \
${PORTNAME}.ab
.else
@@ -66,6 +74,12 @@ PLIST_SUB+= I386_ONLY=""
.else
PLIST_SUB+= I386_ONLY="@comment "
.endif
+.if ${ARCH} == amd64
+PLIST_SUB+= AMD64_ONLY=""
+PLIST_SUB+= LDCONFIG_LIB32="${LDCONFIG} -32"
+.else
+PLIST_SUB+= AMD64_ONLY="@comment "
+.endif
OPENSSL_LIBS= libcrypto.so.1 libcrypto.so.2 libssl.so.1 libssl.so.2
.if defined(FORCE_VULNERABLE_OPENSSL)
@@ -109,6 +123,9 @@ do-extract:
do-build:
@( ${ECHO_CMD} '#!/bin/sh'; ${ECHO_CMD} '${LDCONFIG} -m ${LDCONFIG_RUNLIST}'; \
) > ${WRKDIR}/000.${PORTNAME}.sh
+.if ${TARGET_DIR} == ${PREFIX}/lib32/compat
+ @${ECHO_CMD} '${LDCONFIG} -32 -m ${TARGET_DIR}' >> ${WRKDIR}/000.${PORTNAME}.sh
+.endif
do-install:
${MKDIR} ${TARGET_DIR} ${PREFIX}/etc/rc.d
@@ -118,6 +135,9 @@ do-install:
${LN} -sf ${lib}.compat4x ${TARGET_DIR}/${lib}
.endfor
.endif
+.if ${ARCH} == amd64
+ ${LDCONFIG} -32 -m ${TARGET32_DIR}
+.endif
${INSTALL_SCRIPT} ${WRKDIR}/000.${PORTNAME}.sh ${PREFIX}/etc/rc.d/
post-install:
diff --git a/misc/compat4x/pkg-plist.freebsd5 b/misc/compat4x/pkg-plist.freebsd5
index 5ac261eb43fa..e11668992813 100644
--- a/misc/compat4x/pkg-plist.freebsd5
+++ b/misc/compat4x/pkg-plist.freebsd5
@@ -1,41 +1,44 @@
etc/rc.d/000.compat4x.sh
-lib/compat/libc.so.4
+%%LIBDIR%%/compat/libc.so.4
@unexec if [ -e %B/libc_r.so.4.compat3x ]; then ln -sf libc_r.so.4.compat3x %B/libc_r.so.4; else rm %B/libc_r.so.4; fi
-lib/compat/libc_r.so.4.compat4x
+%%LIBDIR%%/compat/libc_r.so.4.compat4x
@exec ln -sf %f %B/libc_r.so.4
-%%FORBIDDEN:%%lib/compat/libcrypto.so.1
-%%FORBIDDEN:%%lib/compat/libcrypto.so.2
-lib/compat/libdevstat.so.2
-lib/compat/libedit.so.3
-lib/compat/libfetch.so.2
-lib/compat/libgmp.so.3
-lib/compat/libhistory.so.4
-lib/compat/libm.so.2
-lib/compat/libmp.so.3
-lib/compat/libopie.so.2
-lib/compat/libpam.so.1
-lib/compat/libpcap.so.2
+%%FORBIDDEN:%%%%LIBDIR%%/compat/libcrypto.so.1
+%%FORBIDDEN:%%%%LIBDIR%%/compat/libcrypto.so.2
+%%LIBDIR%%/compat/libdevstat.so.2
+%%LIBDIR%%/compat/libedit.so.3
+%%LIBDIR%%/compat/libfetch.so.2
+%%LIBDIR%%/compat/libgmp.so.3
+%%LIBDIR%%/compat/libhistory.so.4
+%%LIBDIR%%/compat/libm.so.2
+%%LIBDIR%%/compat/libmp.so.3
+%%LIBDIR%%/compat/libopie.so.2
+%%LIBDIR%%/compat/libpam.so.1
+%%LIBDIR%%/compat/libpcap.so.2
@unexec if [ -e %B/libperl.so.3.compat3x ]; then ln -sf libperl.so.3.compat3x %B/libperl.so.3; else rm %B/libperl.so.3; fi
-lib/compat/libperl.so.3.compat4x
+%%LIBDIR%%/compat/libperl.so.3.compat4x
@exec ln -sf %f %B/libperl.so.3
-lib/compat/libposix1e.so.2
-lib/compat/libreadline.so.4
-lib/compat/libskey.so.2
-%%FORBIDDEN:%%lib/compat/libssl.so.1
-%%FORBIDDEN:%%lib/compat/libssl.so.2
-lib/compat/libstdc++.so.3
-lib/compat/libusb.so.0
-lib/compat/libusbhid.so.0
-%%I386_ONLY%%lib/compat/libutil.so.3
-%%I386_ONLY%%lib/compat/libvgl.so.2
-lib/compat/pam_cleartext_pass_ok.so
-lib/compat/pam_deny.so
-lib/compat/pam_opie.so
-lib/compat/pam_opieaccess.so
-lib/compat/pam_permit.so
-lib/compat/pam_radius.so
-lib/compat/pam_skey.so
-lib/compat/pam_ssh.so
-lib/compat/pam_tacplus.so
-lib/compat/pam_unix.so
-@unexec rmdir %D/lib/compat 2>/dev/null || true
+%%LIBDIR%%/compat/libposix1e.so.2
+%%LIBDIR%%/compat/libreadline.so.4
+%%LIBDIR%%/compat/libskey.so.2
+%%FORBIDDEN:%%%%LIBDIR%%/compat/libssl.so.1
+%%FORBIDDEN:%%%%LIBDIR%%/compat/libssl.so.2
+%%LIBDIR%%/compat/libstdc++.so.3
+%%LIBDIR%%/compat/libusb.so.0
+%%LIBDIR%%/compat/libusbhid.so.0
+%%I386_ONLY%%%%LIBDIR%%/compat/libutil.so.3
+%%I386_ONLY%%%%LIBDIR%%/compat/libvgl.so.2
+%%LIBDIR%%/compat/pam_cleartext_pass_ok.so
+%%LIBDIR%%/compat/pam_deny.so
+%%LIBDIR%%/compat/pam_opie.so
+%%LIBDIR%%/compat/pam_opieaccess.so
+%%LIBDIR%%/compat/pam_permit.so
+%%LIBDIR%%/compat/pam_radius.so
+%%LIBDIR%%/compat/pam_skey.so
+%%LIBDIR%%/compat/pam_ssh.so
+%%LIBDIR%%/compat/pam_tacplus.so
+%%LIBDIR%%/compat/pam_unix.so
+%%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.
+@unexec rmdir %D/lib32 2>/dev/null || true