blob: 7709b7ffd2554a59dd44648898435b199f0e9a8c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
|
# New ports collection makefile for: compat4x libraries
# Date created: 01 Aug 2001
# Whom: Scot W. Hetzel
#
# $FreeBSD$
#
PORTNAME= compat4x
PORTVERSION= ${COMPAT4X_PORTVERSION}
PORTREVISION= 9
CATEGORIES= misc
MASTER_SITES= ${COMPAT4X_MASTER_SITES}
MASTER_SITE_SUBDIR= ${COMPAT4X_MASTER_SITE_SUBDIR}
PKGNAMESUFFIX= -${COMPAT4X_ARCH}
DISTFILES= ${COMPAT4X_DISTFILES}
DIST_SUBDIR= ${COMPAT4X_ARCH}/${PORTVERSION}
MAINTAINER= ports@FreeBSD.org
COMMENT= A convenience package to install the compat4x libraries
WRKSRC= ${WRKDIR}/usr/lib/compat
NO_BUILD= yes
USE_LDCONFIG= 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>
COMPAT4X_ARCH= ${ARCH}
.if ${OSVERSION} >= 600016
RUN_DEPENDS+= ${LOCALBASE}/share/compat/locale/UTF-8/LC_CTYPE:${PORTSDIR}/misc/localedata
.endif
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
COMPAT4X_ARCH= i386
TARGET_DIR= ${TARGET32_DIR}
PLIST_SUB+= LIBDIR="lib32"
COMPAT4X_DISTFILES= ${PORTNAME}.aa \
${PORTNAME}.ab
.elif ${ARCH} == alpha
PLIST_SUB+= LIBDIR="lib"
COMPAT4X_DISTFILES= ${PORTNAME}.aa \
${PORTNAME}.ab
.else
IGNORE= is unsupported (FreeBSD 4.x did not run on this architecture)
.endif
.if ${COMPAT4X_ARCH} == i386
PLIST_SUB+= I386_ONLY=""
.else
PLIST_SUB+= I386_ONLY="@comment "
.endif
.if ${ARCH} == amd64
PLIST_SUB+= AMD64_ONLY="" AMD64NA="@comment "
PLIST_SUB+= LDCONFIG_LIB32="${LDCONFIG} -32"
USE_LDCONFIG32= ${TARGET32_DIR}
.undef USE_LDCONFIG
USE_LDCONFIG= no
.else
PLIST_SUB+= AMD64_ONLY="@comment " AMD64NA=""
.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
PLIST_SUB+= FORBIDDEN:=""
.else
PLIST_SUB+= FORBIDDEN:="@comment "
.endif
FREEBSD4_LIBS= libc_r.so.4 libperl.so.3
.if defined(COMPAT4X_OSRELDATE) && !empty(COMPAT4X_OSRELDATE)
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}
.else
COMPAT4X_PORTVERSION= ${COMPAT4X_OSVERSION}
COMPAT4X_MASTER_SITES= ${MASTER_SITE_LOCAL}
COMPAT4X_MASTER_SITE_SUBDIR= kris/${COMPAT4X_ARCH}
.endif
do-extract:
@${MKDIR} ${WRKDIR}
@(cd ${DISTDIR}/${DIST_SUBDIR} && ${CAT} ${DISTFILES} | ${TAR} -xzf - -C ${WRKDIR} )
.for lib in ${FREEBSD4_LIBS}
@${MV} ${WRKSRC}/${lib} ${WRKSRC}/${lib}.compat4x
.endfor
.if !defined(FORCE_VULNERABLE_OPENSSL)
.for lib in ${OPENSSL_LIBS}
@${RM} -f ${WRKSRC}/${lib}
.endfor
.endif
do-install:
@${MKDIR} ${TARGET_DIR}
${INSTALL_DATA} ${WRKSRC}/* ${TARGET_DIR}/
.for lib in ${FREEBSD4_LIBS}
${LN} -sf ${lib}.compat4x ${TARGET_DIR}/${lib}
.endfor
# 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
${LDCONFIG} -32 -m ${TARGET32_DIR}
.endif
@${CAT} ${PKGMESSAGE}
pre-clean:
@[ -w ${WRKDIR}/var ] && chflags -R noschg ${WRKDIR}/var || ${TRUE}
.include <bsd.port.post.mk>
|