blob: 1ef41ea281c55e7fe08d726c2c2844e4ecdb3b56 (
plain)
1 # URL: http://gcc.gnu.org/fortran
2 # Description: Fortran (f95) add-on for GNU GCC compiler.
3 # Maintainer: Danny Rawlins, monster dot romster at gmail dot com
4 # Packager: acrux, acrux at linuxmail dot org
5 # Depends on: libmpfr
6
7 name=gcc-fortran
8 version=4.3.3
9 release=1
10 source=(ftp://sources.redhat.com/pub/gcc/releases/gcc-$version/gcc-{core,fortran}-$version.tar.bz2
11 $name-4.2.4-nocheck-fixincludes.patch)
12
13 build() {
14 patch -d gcc-$version -p 1 -i $SRC/$name-4.2.4-nocheck-fixincludes.patch
15
16 sed -i gcc-$version/gcc/version.c \
17 -e 's|VERSUFFIX ""|VERSUFFIX " (CRUX)"|'
18
19 mkdir build
20 cd build
21
22 ../gcc-$version/configure \
23 --prefix=/usr \
24 --libexecdir=/usr/lib \
25 --enable-languages=f95 \
26 --enable-threads=posix \
27 --enable-__cxa_atexit \
28 --enable-clocale=gnu \
29 --enable-shared \
30 --disable-nls \
31 --with-x=no
32
33 make bootstrap
34 make -j 1 check
35 make -j 1 DESTDIR=$PKG install
36
37 ln -fs gfortran $PKG/usr/bin/f90
38 ln -fs gfortran $PKG/usr/bin/f95
39
40 # remove un-needed files
41 find $PKG -name 'README' -delete
42
43 rm \
44 $PKG/usr/lib/libiberty.a \
45 $PKG/usr/bin/*-linux-gnu-* \
46 $PKG/usr/man/man1/{cpp,gcc,gcov}.1
47
48 rm -r \
49 $PKG/usr/info \
50 $PKG/usr/man/man7 \
51 $PKG/usr/lib/gcc/*/$version/install-tools \
52 $PKG/usr/lib/gcc/*/$version/include-fixed \
53 $PKG/usr/lib/gcc/*/$version/include
54
55 # remove files already on the system out of the port
56 for i in $(pkginfo -l gcc |sed -e "s|^|/|"); do
57 if [ -e "$i" ] && [ ! -d "$i" ]; then
58 if [ -e "$PKG$i" ]; then
59 rm "$PKG$i"
60 fi
61 fi
62 done
63
64 # Remove empty directories
65 find $PKG -depth -empty -exec rm -r {} \;
66
67 # remove build paths from *.la files
68 for i in `find $PKG -name '*.la' | sed -e "s|$PKG|/|"`; do
69 sed -i "s|-L$SRC[^ ]* ||g" $PKG/$i
70 done
71 }
|