blob: d02bd22b93aa5ae3955bd5272ea23edccc2a5eff (
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
|
# ex:ts=8
# Ports collection makefile for: compaq-cc
# Date created: Thur Dec 07, 2000
# Whom: David O'Brien (obrien@NUXI.com)
#
# $FreeBSD$
#
PORTNAME= compaq-cc
PORTVERSION= 6.2.9.504
CATEGORIES= lang
MASTER_SITES= ftp://ftp.compaq.com/pub/products/C-CXX/linux/compaq_c_v62/
DISTFILES= ccc-6.2.9.504-2.alpha.rpm libots-2.2.7-2.alpha.rpm
.if defined(WANT_EV6)
DISTFILES+= cpml_ev6-5.1.0-2.alpha.rpm
.else
DISTFILES+= cpml_ev5-5.1.0-2.alpha.rpm
.endif
MAINTAINER= obrien@FreeBSD.org
RESTRICTED= "Distribution not allowed"
BUILD_DEPENDS= rpm:${PORTSDIR}/misc/rpm
ONLY_FOR_ARCHS= alpha
PREFIX= /
EXTRACT_CMD= rpm2cpio
EXTRACT_BEFORE_ARGS=
EXTRACT_AFTER_ARGS= |cpio -idum
EXTRACT_ONLY=
NO_WRKSUBDIR= yes
NO_BUILD= yes
NO_FILTER_SHLIBS= yes
NO_MTREE= yes
do-install:
@if [ -z "`kldstat -v | ${GREP} -E 'linux'`" ]; then \
${ECHO} 'AlphaLinux mode is not enabled.\
Loading AlphaLinux kernel module...' | fmt; \
kldload linux || { \
${ECHO} 'The AlphaLinux kernel module could not be loaded.\
Please manually load the module and retry.\
See "man linux" for details.' | fmt; \
${FALSE}; \
};\
fi
.for F in ${DISTFILES}
cd ${PREFIX} ; rpm2cpio ${DISTDIR}/$F |cpio -idum
.endfor
.for F in /usr/lib/compaq/ccc-6.2.9.504-2/alpha-linux/bin/lnxcc \
/usr/lib/compaq/ccc-6.2.9.504-2/alpha-linux/bin/lnxcc_driver
brandelf -t Linux ${PREFIX}$F
.endfor
cd ${PREFIX}/usr/lib/compaq/ccc-6.2.9.504-2/alpha-linux/bin \
; ${MV} cpp cpp.Linux-bad ; ${LN} -s /usr/bin/cpp . \
; ${MV} ld ld.Linux-bad ; ${LN} -s /usr/bin/ld .
# "-g" is totally ignored by GNU ld, so we can use it for a benign space holder
cd ${PREFIX}/usr/lib/compaq/ccc-6.2.9.504-2/alpha-linux/bin \
; ${MV} lnxcc_driver lnxcc_driver.Linux \
; ${SED} -e 's/-dynamic-linker/-g /g' \
-e 's|/lib/ld-linux.so.2|-g |g' \
-e 's|-D__linux__|-D__FreeBSD|g' \
-e 's|-D__linux....|-D__FreeBSD__|g' \
-e 's|-Dlinux|-D_____|g' \
lnxcc_driver.Linux >lnxcc_driver \
; ${CHMOD} 555 lnxcc_driver
# the shared libs gives us trouble right now, so only offer .a's
${RM} ${PREFIX}/usr/lib/libots.so
${RM} ${PREFIX}/usr/lib/libcpml.so
# fix unresolved references in the DECpaq libs
cd ${WRKSRC} \
; ccc -c ${FILESDIR}/*.c \
; ar vq /usr/lib/compaq/cpml-5.1.0/libcpml_ev5.a *.o
.include <bsd.port.mk>
|