blob: a6d0ea73174756169ad6164b513af4a30abf67dd (
plain)
1 # Description: GDC is a D language front end for the GNU Compiler Collection.
2 # URL: http://dgcc.sourceforge.net/
3 # Maintainer: Danny Rawlins, monster dot romster at gmail dot com
4 # Packager: Danny Rawlins, monster dot romster at gmail dot com
5
6 name=gdc
7 version=0.24
8 gcc_version=4.1.2
9 release=2
10 source=(http://downloads.sourceforge.net/project/dgcc/$name-$version-src.tar.bz2
11 ftp://ftp.gnu.org/pub/gnu/gcc/gcc-$gcc_version/gcc-{core,g++}-$gcc_version.tar.bz2
12 gdc-$gcc_version-nocheck-fixincludes.patch
13 gdc-$gcc_version-fixinc.patch)
14
15 build() {
16 patch -d gcc-$gcc_version -p1 -i $SRC/gdc-$gcc_version-nocheck-fixincludes.patch
17 patch -d gcc-$gcc_version -p1 -i $SRC/gdc-$gcc_version-fixinc.patch
18
19 sed -i -e 's|VERSUFFIX ""|VERSUFFIX " (CRUX)"|' \
20 gcc-$gcc_version/gcc/version.c
21
22 mkdir build
23 cd build
24 mv $SRC/d $SRC/gcc-$gcc_version/gcc/d
25
26 (
27 cd ../gcc-$gcc_version
28 ./gcc/d/setup-gcc.sh
29 )
30
31 ../gcc-$gcc_version/configure \
32 --prefix=/usr \
33 --libexecdir=/usr/lib \
34 --enable-languages=d \
35 --enable-threads=posix \
36 --enable-__cxa_atexit \
37 --enable-clocale=gnu \
38 --enable-shared \
39 --disable-nls \
40 --with-x=no
41
42 make bootstrap
43 make check
44 make DESTDIR=$PKG install
45
46 rm \
47 $PKG/usr/lib/libiberty.a \
48 $PKG/usr/bin/*-linux-gnu-* \
49 $PKG/usr/lib/gcc/*/$gcc_version/include/README \
50 $PKG/usr/man/man1/{cpp,gcc,gcov}.1
51
52 rm -r \
53 $PKG/usr/info \
54 $PKG/usr/lib/gcc/*/$gcc_version/install-tools \
55 $PKG/usr/man/man7
56
57 # remove files already on the system out of the port
58 for i in $(pkginfo -l gcc |sed -e "s|^|/|"); do
59 if [ -e "$i" ] && [ ! -d "$i" ]; then
60 if [ -e "$PKG$i" ]; then
61 rm "$PKG$i"
62 fi
63 fi
64 done
65
66 # Remove empty directories
67 find $PKG -depth -empty -exec rm -r {} \;
68
69 # remove build paths from *.la files
70 for i in $(find $PKG -name '*.la' | sed -e "s|$PKG|/|"); do
71 sed -i "s|-L$SRC[^ ]* ||g" $PKG/$i
72 done
73 }
|