Lines 6-58
Link Here
|
6 |
# |
6 |
# |
7 |
|
7 |
|
8 |
PORTNAME= armv5 |
8 |
PORTNAME= armv5 |
9 |
PORTVERSION= 20110627 |
9 |
PORTVERSION= ${SNAPSHOT} |
10 |
PORTREVISION= 1 |
|
|
11 |
CATEGORIES= lang |
10 |
CATEGORIES= lang |
12 |
MASTER_SITES= http://downloads.dragonlace.net/src/ \ |
11 |
MASTER_SITES= ${MASTER_SITE_GCC} |
13 |
http://dragonlace.mirrors.ada.cx/src/ |
12 |
MASTER_SITE_SUBDIR= releases/gcc-${GCC_VERSION} |
14 |
PKGNAMEPREFIX= gnatdroid- |
13 |
PKGNAMEPREFIX= gnatdroid- |
15 |
DISTNAME= arm-gnat-${PORTVERSION} |
14 |
DISTNAME= arm-gnat-${PORTVERSION} |
|
|
15 |
DISTFILES= gcc-core-${GCC_VERSION}.tar.bz2 \ |
16 |
gcc-ada-${GCC_VERSION}.tar.bz2 \ |
17 |
gcc-testsuite-${GCC_VERSION}.tar.bz2 |
16 |
|
18 |
|
17 |
MAINTAINER= draco@marino.st |
19 |
MAINTAINER= draco@marino.st |
18 |
COMMENT= C/Ada cross-compiler, target: Android ARMv5 |
20 |
COMMENT= C/Ada cross-compiler, target: Android ARMv5 |
19 |
|
21 |
|
20 |
BUILD_DEPENDS= gnatdroid-sysroot>=9:${PORTSDIR}/lang/gnatdroid-sysroot \ |
22 |
BUILD_DEPENDS= gnatdroid-sysroot>=9:${PORTSDIR}/lang/gnatdroid-sysroot \ |
21 |
gnatdroid-binutils>=2.21:${PORTSDIR}/lang/gnatdroid-binutils \ |
23 |
gnatdroid-binutils>=2.21:${PORTSDIR}/lang/gnatdroid-binutils \ |
22 |
${LOCALBASE}/lib/libgmp.so:${PORTSDIR}/math/gmp \ |
24 |
gnat-aux>=20110325:${PORTSDIR}/lang/gnat-aux |
23 |
${LOCALBASE}/lib/libmpfr.so:${PORTSDIR}/math/mpfr \ |
25 |
RUN_DEPENDS:= gnatdroid-sysroot>=9:${PORTSDIR}/lang/gnatdroid-sysroot \ |
24 |
${LOCALBASE}/lib/libmpc.so:${PORTSDIR}/math/mpc |
26 |
gnatdroid-binutils>=2.21:${PORTSDIR}/lang/gnatdroid-binutils |
25 |
RUN_DEPENDS:= ${BUILD_DEPENDS} |
27 |
|
26 |
BUILD_DEPENDS+= gnat-aux>=20110325:${PORTSDIR}/lang/gnat-aux |
28 |
.include "${.CURDIR}/../gnat-aux/Makefile.common" |
27 |
|
29 |
|
28 |
USE_BZIP2= YES |
30 |
LANGS= c ada |
29 |
USE_GMAKE= YES |
31 |
APPLY_DIFFS= core ada ada-testsuite gcc-testsuite |
30 |
HAS_CONFIGURE= YES |
|
|
31 |
USE_ICONV= YES |
32 |
USE_BISON= build |
33 |
ALL_TARGET= default |
34 |
NO_MTREE= YES |
32 |
NO_MTREE= YES |
35 |
MAKE_JOBS_SAFE= YES |
33 |
|
|
|
34 |
# Disable C++ until arm.cc/no-rtti issue resolved for libsupc++ |
35 |
#OPTIONS+= CXX "Also build C++ language" off |
36 |
|
37 |
OPTIONS+= FORT "Also build Fortran language" off |
38 |
OPTIONS+= OBJC "Also build Objective-C language" off |
36 |
|
39 |
|
37 |
DROID_TARGET= arm-android-eabi |
40 |
DROID_TARGET= arm-android-eabi |
38 |
DROID_ARCH= armv5te |
41 |
DROID_ARCH= armv5te |
39 |
ARMVERSION= ARMv5 |
42 |
ARMVERSION= ARMv5 |
40 |
FPU= vfp |
43 |
FPU= vfp |
41 |
GCC_BRANCH= 4.6 |
44 |
WRKSRC= ${WRKDIR}/gcc-${GCC_VERSION} |
42 |
GCC_VERSION= 4.6.1 |
|
|
43 |
WRKSRC= ${WRKDIR}/gcc-${GCC_BRANCH}-${PORTVERSION} |
44 |
BUILDDIR= ${WRKDIR}/build |
45 |
BUILDDIR= ${WRKDIR}/build |
|
|
46 |
FILESDIR= ${.CURDIR}/../gnat-aux/files |
45 |
CFG_SCRIPT= ${WRKSRC}/configure |
47 |
CFG_SCRIPT= ${WRKSRC}/configure |
46 |
REVFILE= ${WRKSRC}/gcc/REVISION |
48 |
REVFILE= ${WRKSRC}/gcc/REVISION |
47 |
SRPREFIX= ${LOCALBASE}/android9 |
49 |
SRPREFIX= ${LOCALBASE}/android9 |
48 |
PREFIX= ${SRPREFIX}/${ARMVERSION} |
50 |
PREFIX= ${SRPREFIX}/${ARMVERSION} |
49 |
FULL_GNATGCC= ${LOCALBASE}/bin/gnatgcc |
51 |
FULL_GNATGCC= ${LOCALBASE}/bin/gnatgcc |
|
|
52 |
INSTALLDIRS= lib/gcc libexec/gcc share |
53 |
INSTALLDIRS+= ${DROID_TARGET}/lib/armv7-a |
54 |
INSTALLDIRS+= ${DROID_TARGET}/lib/thumb |
50 |
PLIST_SUB+= TARGET="${DROID_TARGET}" |
55 |
PLIST_SUB+= TARGET="${DROID_TARGET}" |
51 |
PLIST_SUB+= GCCVERS="${GCC_VERSION}" |
56 |
PLIST_SUB+= GCCVERS="${GCC_VERSION}" |
52 |
|
57 |
|
53 |
ADA_CONFIGURE_ENV= CC=${FULL_GNATGCC} |
58 |
ADA_CONFIGURE_ENV= CC=${FULL_GNATGCC} |
54 |
|
59 |
|
55 |
.include <bsd.port.pre.mk> |
60 |
.include <bsd.port.pre.mk> |
|
|
61 |
.include <bsd.port.options.mk> |
56 |
|
62 |
|
57 |
.if ${ARCH} == "amd64" |
63 |
.if ${ARCH} == "amd64" |
58 |
OS_LABEL4VERS= "[FreeBSD64 x Android ${ARMVERSION}]" |
64 |
OS_LABEL4VERS= "[FreeBSD64 x Android ${ARMVERSION}]" |
Lines 60-66
Link Here
|
60 |
OS_LABEL4VERS= "[FreeBSD32 x Android ${ARMVERSION}]" |
66 |
OS_LABEL4VERS= "[FreeBSD32 x Android ${ARMVERSION}]" |
61 |
.endif |
67 |
.endif |
62 |
|
68 |
|
63 |
CONFIGURE_ARGS= --enable-languages=c,ada |
69 |
########### |
|
|
70 |
## C++ ## |
71 |
########### |
72 |
|
73 |
.if defined(WITH_CXX) |
74 |
LANGS+= c++ |
75 |
APPLY_DIFFS+= cxx cxx-testsuite |
76 |
DISTFILES+= gcc-g++-${GCC_VERSION}.tar.bz2 |
77 |
INSTALLDIRS+= include/c++/${GCC_VERSION} |
78 |
PLIST_SUB+= CXX="" |
79 |
.else |
80 |
PLIST_SUB+= CXX="@comment " |
81 |
.endif |
82 |
|
83 |
############### |
84 |
## Fortran ## |
85 |
############### |
86 |
|
87 |
.if defined(WITH_FORT) |
88 |
LANGS+= fortran |
89 |
APPLY_DIFFS+= fortran |
90 |
DISTFILES+= gcc-fortran-${GCC_VERSION}.tar.bz2 |
91 |
PLIST_SUB+= FRT="" |
92 |
.else |
93 |
PLIST_SUB+= FRT="@comment " |
94 |
.endif |
95 |
|
96 |
################### |
97 |
## Objective-C ## |
98 |
################### |
99 |
|
100 |
.if defined(WITH_OBJC) |
101 |
LANGS+= objc |
102 |
DISTFILES+= gcc-objc-${GCC_VERSION}.tar.bz2 |
103 |
.endif |
104 |
|
105 |
CONFIGURE_ARGS= --enable-languages=${LANGS:Q} |
64 |
CONFIGURE_ARGS+= --target=${DROID_TARGET} |
106 |
CONFIGURE_ARGS+= --target=${DROID_TARGET} |
65 |
CONFIGURE_ARGS+= --program-prefix=${DROID_TARGET}- |
107 |
CONFIGURE_ARGS+= --program-prefix=${DROID_TARGET}- |
66 |
CONFIGURE_ARGS+= --prefix=${PREFIX} |
108 |
CONFIGURE_ARGS+= --prefix=${PREFIX} |
Lines 81-87
Link Here
|
81 |
CONFIGURE_ARGS+= --disable-libgomp |
123 |
CONFIGURE_ARGS+= --disable-libgomp |
82 |
CONFIGURE_ARGS+= --disable-libmudflap |
124 |
CONFIGURE_ARGS+= --disable-libmudflap |
83 |
CONFIGURE_ARGS+= --disable-libquadmath |
125 |
CONFIGURE_ARGS+= --disable-libquadmath |
84 |
CONFIGURE_ARGS+= --disable-libstdcxx-pch |
126 |
CONFIGURE_ARGS+= --disable-sjlj-exceptions |
85 |
CONFIGURE_ARGS+= --disable-tls |
127 |
CONFIGURE_ARGS+= --disable-tls |
86 |
CONFIGURE_ARGS+= --disable-nls |
128 |
CONFIGURE_ARGS+= --disable-nls |
87 |
|
129 |
|
Lines 89-94
Link Here
|
89 |
# Personalize GNAT for each different machine |
131 |
# Personalize GNAT for each different machine |
90 |
@${ECHO} "-=> GNAT AUX ${OS_LABEL4VERS}" > ${REVFILE} |
132 |
@${ECHO} "-=> GNAT AUX ${OS_LABEL4VERS}" > ${REVFILE} |
91 |
|
133 |
|
|
|
134 |
# Create new directories in preparation of applying diff files |
135 |
.if defined(WITH_CXX) |
136 |
${MKDIR} ${WRKSRC}/libstdc++-v3/config/locale/dragonfly |
137 |
${MKDIR} ${WRKSRC}/libstdc++-v3/config/os/bsd/dragonfly |
138 |
.endif |
139 |
|
140 |
# Apply required composite diff files |
141 |
.for suffix in ${APPLY_DIFFS} |
142 |
@${ECHO} "Applying composite patch diff-${suffix}" |
143 |
@${PATCH} -d ${WRKSRC} -s -E < ${FILESDIR}/diff-${suffix} |
144 |
.endfor |
145 |
|
92 |
do-configure: |
146 |
do-configure: |
93 |
${MKDIR} ${BUILDDIR} |
147 |
${MKDIR} ${BUILDDIR} |
94 |
cd ${BUILDDIR} && ${SETENV} ${ADA_CONFIGURE_ENV} \ |
148 |
cd ${BUILDDIR} && ${SETENV} ${ADA_CONFIGURE_ENV} \ |
Lines 103-111
Link Here
|
103 |
${PREFIX}/bin/${DROID_TARGET}-gnatgcc |
157 |
${PREFIX}/bin/${DROID_TARGET}-gnatgcc |
104 |
${MV} ${PREFIX}/${DROID_TARGET}/bin/gcc \ |
158 |
${MV} ${PREFIX}/${DROID_TARGET}/bin/gcc \ |
105 |
${PREFIX}/${DROID_TARGET}/bin/gnatgcc |
159 |
${PREFIX}/${DROID_TARGET}/bin/gnatgcc |
|
|
160 |
.if defined(WITH_FORT) |
161 |
${MV} ${PREFIX}/bin/${DROID_TARGET}-gfortran \ |
162 |
${PREFIX}/bin/${DROID_TARGET}-gnatgfortran |
163 |
${MV} ${PREFIX}/${DROID_TARGET}/bin/gfortran \ |
164 |
${PREFIX}/${DROID_TARGET}/bin/gnatgfortran |
165 |
.endif |
106 |
|
166 |
|
107 |
post-install: |
167 |
post-install: |
108 |
.for d in lib/gcc libexec/gcc share |
168 |
.for d in ${INSTALLDIRS} |
109 |
cd ${PREFIX}; ${FIND} $d \( -type f -or -type l \) | ${SORT} >> ${TMPPLIST} |
169 |
cd ${PREFIX}; ${FIND} $d \( -type f -or -type l \) | ${SORT} >> ${TMPPLIST} |
110 |
cd ${PREFIX}; ${FIND} $d -type d | ${SORT} -dr | \ |
170 |
cd ${PREFIX}; ${FIND} $d -type d | ${SORT} -dr | \ |
111 |
${SED} -e 's/^/@dirrm /g' >> ${TMPPLIST} |
171 |
${SED} -e 's/^/@dirrm /g' >> ${TMPPLIST} |