summaryrefslogtreecommitdiffstats
path: root/lang/gcc28/Makefile
blob: 8db267b8818369f7d903a8ae4e97197d68a75483 (plain)
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
# ex:ts=8
# Ports collection makefile for:	gcc
# Date created:				17 Jan 1998
# Whom:					David O'Brien <obrien@NUXI.com>
#
# $FreeBSD$
#

PORTNAME=	gcc
PORTVERSION=	2.8.1
CATEGORIES=	lang
MASTER_SITES=	${MASTER_SITE_GNU}
MASTER_SITE_SUBDIR=	gcc

.if defined(WANT_BOUNDS_CHECKING)
PATCH_SITES=	http://web.inter.nl.net/hcc/Haj.Ten.Brugge/
PATCHFILES=	bounds-checking-2.8.1-1.01.tar.gz
.endif

MAINTAINER=	ports@FreeBSD.org
COMMENT=	GNU Compiler Collection 2.8

NO_CDROM=	'old version, not worth the cost in real estate'

LATEST_LINK=	gcc28

.include <bsd.port.pre.mk>

.if ${PORTOBJFORMAT} == "elf"
CONFIGURE_TARGET=	${ARCH}-portbld-freebsd${OSREL}
.else
CONFIGURE_TARGET=	${ARCH}-portbld-freebsdaout${OSREL}
.endif

PLIST_SUB=	GNUHOST=${CONFIGURE_TARGET}
CONFIGURE_ARGS=	--with-gxx-include-dir=${PREFIX}/lib/gcc-lib/${CONFIGURE_TARGET}/2.8.1/include/g++
GNU_CONFIGURE=	yes
USE_GMAKE=	yes
ALL_TARGET=	bootstrap
MAN1=		cccp28.1 g++28.1 gcc28.1

pre-fetch:
	@${ECHO} "GCC ${DISTNAME:S/^gcc-//} for ${OPSYS} ${OSREL} ${PORTOBJFORMAT}"

pre-patch:
	@${MV} ${WRKSRC}/config/i386/freebsd.h ${WRKSRC}/config/i386/freebsd-aout.h
	@${MV} ${WRKSRC}/config/i386/freebsd-elf.h ${WRKSRC}/config/i386/freebsd.h

pre-configure:
	@# Keep from running `autoconf' and `autoheader' since we modified
	@# configure.in by patching it.
	@${TOUCH} ${TOUCH_FLAGS} ${WRKSRC}/configure
	@${TOUCH} ${TOUCH_FLAGS} ${WRKSRC}/cstamp-h.in
	@(cd ${WRKSRC}/config/${ARCH}/ ; \
	MAJ=`/sbin/sysctl -n kern.osreldate | ${SED} -e '/.....$$/s///'` ; \
	${MV} freebsd-aout.h freebsd-aout.h.in ; \
	${SED} -e "s:__FreeBSD__=[0-9]*:__FreeBSD__=$${MAJ}:" \
		freebsd-aout.h.in >freebsd-aout.h ; \
	${MV} freebsd.h freebsd.h.in ; \
	${SED} -e "s:__FreeBSD__=[0-9]*:__FreeBSD__=$${MAJ}:" freebsd.h.in \
		>freebsd.h)

post-install:
	@${RM} -f ${PREFIX}/bin/c++
	(for prog in ${PREFIX}/bin/gcc ${PREFIX}/bin/g++ ${PREFIX}/bin/gcov \
	${PREFIX}/bin/protoize ${PREFIX}/bin/unprotoize \
	${PREFIX}/bin/${CONFIGURE_TARGET}-gcc \
	${PREFIX}/lib/gcc-lib/${CONFIGURE_TARGET}/2.8.1/cc1 \
	${PREFIX}/lib/gcc-lib/${CONFIGURE_TARGET}/2.8.1/cc1obj \
	${PREFIX}/lib/gcc-lib/${CONFIGURE_TARGET}/2.8.1/cc1plus \
	${PREFIX}/lib/gcc-lib/${CONFIGURE_TARGET}/2.8.1/cpp ; \
		do strip $$prog ; \
		done)
	${LN} -f ${PREFIX}/bin/gcc ${PREFIX}/bin/gcc28
	${LN} -f ${PREFIX}/bin/g++ ${PREFIX}/bin/g++28
	@${MV} ${PREFIX}/man/man1/cccp.1 ${PREFIX}/man/man1/cccp28.1
	@${MV} ${PREFIX}/man/man1/g++.1 ${PREFIX}/man/man1/g++28.1
	@${MV} ${PREFIX}/man/man1/gcc.1 ${PREFIX}/man/man1/gcc28.1
.for info in cpp gcc
	install-info ${PREFIX}/info/${info}.info ${PREFIX}/info/dir
.endfor

.include <bsd.port.post.mk>
OpenPOWER on IntegriCloud