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