blob: ff69b42984b30b685acd8c7183aa242d46732420 (
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
128
129
130
131
132
133
134
135
|
# New ports collection makefile for: djgpp-gcc
# Date created: 27 Jan 2007
# Whom: Peter Johnson <johnson.peter@gmail.com>
#
# $FreeBSD$
#
PORTNAME= gcc
PORTVERSION= ${GCCVERSION}
PORTREVISION= 6
CATEGORIES= devel
MASTER_SITES= ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/:djsource \
ftp://ftp.mirror.ac.uk/sites/www.delorie.com/current/v2gnu/:djsource \
http://djgpp.linux-mirror.org/v2gnu/:djsource \
http://djgpp.oss-mirror.org/v2gnu/:djsource \
${MASTER_SITE_SOURCEWARE}
MASTER_SITE_SUBDIR= ${PORTNAME}/releases/${PORTNAME}-${GCCVERSION}
PKGNAMEPREFIX= djgpp-
DISTFILES= gcc410s2.zip:djsource \
${PORTNAME}-core-${GCCVERSION}.tar.gz \
${PORTNAME}-g++-${GCCVERSION}.tar.gz \
${PORTNAME}-objc-${GCCVERSION}.tar.gz \
# ${PORTNAME}-ada-${GCCVERSION}.tar.gz
EXTRACT_ONLY= gcc410s2.zip
MAINTAINER= johnson.peter@gmail.com
COMMENT= FSF gcc-4.1 for DJGPP cross-development
BROKEN= Does not work with autoconf>=2.64 - no upstream fix.
BUILD_DEPENDS= ${TARGET}-as:${PORTSDIR}/devel/${PKGNAMEPREFIX}binutils \
${LOCALBASE}/${TARGET}/bin/stubify:${PORTSDIR}/devel/${PKGNAMEPREFIX}crx \
autoconf-2.13:${PORTSDIR}/devel/autoconf213 \
autoconf-2.68:${PORTSDIR}/devel/autoconf268 \
aclocal-1.11:${PORTSDIR}/devel/automake111
.if defined(WITH_FORTRAN)
LIB_DEPENDS= gmp.10:${PORTSDIR}/math/gmp \
mpfr.4:${PORTSDIR}/math/mpfr
.endif
RUN_DEPENDS= ${TARGET}-as:${PORTSDIR}/devel/${PKGNAMEPREFIX}binutils \
${LOCALBASE}/${TARGET}/bin/stubify:${PORTSDIR}/devel/${PKGNAMEPREFIX}crx
TARGET= i586-pc-msdosdjgpp
GCCVERSION= 4.1.0
USE_ZIP= yes
USE_PERL5_BUILD=yes
USE_GMAKE= yes
USE_ICONV= yes
SCRIPTS_ENV= gcc_dir=${SRCDIR} PATCH=${PATCH}
PATCH_WRKSRC= ${SRCDIR}
CONFIGURE_SCRIPT= ../${SRCDIR:C/${WRKDIR}//}/configure
SRCDIR= ${WRKDIR}/gnu/gcc-${GCCVERSION}
WRKSRC= ${WRKDIR}/build
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --target=${TARGET} \
--with-gcc --with-gnu-ld --with-gnu-as \
--disable-nls --disable-shared \
--with-gxx-include-dir=${PREFIX}/${TARGET}/include/c++/ \
--includedir=${PREFIX}/${TARGET}/include \
--datadir=${PREFIX}/${TARGET}/share
.if defined(WITH_FORTRAN)
CONFIGURE_ARGS+=--enable-languages=c,c++,fortran,objc,obj-c++
.else
CONFIGURE_ARGS+=--enable-languages=c,c++,objc,obj-c++
.endif
INFO_PATH= ${TARGET}/info
MAKE_ENV= PATH=${PREFIX}/bin:${PATH}
LIBTOOLFILES= configure gcc/configure
MAN1= ${TARGET}-gcc.1 ${TARGET}-g++.1 \
${TARGET}-cpp.1 ${TARGET}-gcov.1
PLIST_SUB+= GCC_TARG=${TARGET} GCC_REV=${GCCVERSION}
INFO= cpp cppinternals gcc gccinstall gccint
INFO_PATH= ${TARGET}/info
BINARIES= gcc cpp g++ gcov
.include <bsd.port.pre.mk>
.if defined(WITH_FORTRAN)
DISTFILES+= ${PORTNAME}-fortran-${GCCVERSION}.tar.gz
CONFIGURE_ARGS+=--with-gmp=${LOCALBASE}
MAN1+= ${TARGET}-gfortran.1
INFO+= gfortran
BINARIES+= gfortran
PLIST_SUB+= FORTRAN=""
.else
PLIST_SUB+= FORTRAN="@comment "
.endif
.if exists(${LOCALBASE}/lib/libiconv.so.3)
WITH_LIBICONV= yes
.endif
.if defined(WITH_LIBICONV)
USE_ICONV= yes
CONFIGURE_ARGS+= --with-libiconv-prefix=${LOCALBASE}
.endif
post-extract:
@${MKDIR} ${WRKDIR}/gnu
@cd ${WRKDIR}/gnu && ${GZIP_CMD} -dc ${DISTDIR}/${PORTNAME}-core-${GCCVERSION}.tar.gz | ${TAR} -xf -
@cd ${WRKDIR}/gnu && ${GZIP_CMD} -dc ${DISTDIR}/${PORTNAME}-g++-${GCCVERSION}.tar.gz | ${TAR} -xf -
.if defined(WITH_FORTRAN)
@cd ${WRKDIR}/gnu && ${GZIP_CMD} -dc ${DISTDIR}/${PORTNAME}-fortran-${GCCVERSION}.tar.gz | ${TAR} -xf -
.endif
@cd ${WRKDIR}/gnu && ${GZIP_CMD} -dc ${DISTDIR}/${PORTNAME}-objc-${GCCVERSION}.tar.gz | ${TAR} -xf -
# @cd ${WRKDIR}/gnu && ${GZIP_CMD} -dc ${DISTDIR}/${PORTNAME}-ada-${GCCVERSION}.tar.gz | ${TAR} -xf -
@${RM} -rf ${SRCDIR}/boehm-gc
@${RM} -rf ${SRCDIR}/fastjar
@${RM} -rf ${SRCDIR}/libffi
@${RM} -rf ${SRCDIR}/libjava
@${RM} -rf ${SRCDIR}/libchill
@${RM} -rf ${SRCDIR}/zlib
@${RM} -rf ${SRCDIR}/gcc/java
@${RM} -rf ${SRCDIR}/gcc/testsuite
@${RM} -rf ${SRCDIR}/gcc/treelang
@${RM} -rf ${SRCDIR}/libmudflap
pre-configure:
@${MKDIR} ${CONFIGURE_WRKSRC}
post-install:
.for F in ${BINARIES}
@${LN} -f ${PREFIX}/bin/${TARGET}-$F ${PREFIX}/${TARGET}/bin/$F
.endfor
@cd ${PREFIX}/${TARGET}/lib && ${LN} -f libstdcxx.a libstdc++.a
@cd ${PREFIX}/${TARGET}/lib && ${LN} -f libstdcxx.la libstdc++.la
.include <bsd.port.post.mk>
|