blob: 1ea8c3443cd9933eff28da61ec610fe859080a2c (
plain)
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
|
# Description: Le compilateur Fortran GNU
# URL: http://gcc.gnu.org
# Maintainer: NuTyX core team
# Packager: thierryn1 at hispeed dot ch
# Depends on:
name=gcc-fortran
version=4.4.1
release=1
source=(http://ftp.gnu.org/gnu/gcc/gcc-$version/gcc-$version.tar.bz2)
build() {
cd gcc-$version
# Don't install libiberty
sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in
# Don't run fixincludes
sed -i -e 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
mkdir ../gcc-build
cd ../gcc-build
../gcc-$version/configure \
--prefix=/usr \
--libexecdir=/usr/lib \
--enable-languages=f95 \
--enable-threads=posix \
--enable-__cxa_atexit \
--enable-clocale=gnu \
--enable-shared \
--disable-nls \
--with-x=no
make -j3 bootstrap
#make check
make -j3 DESTDIR=$PKG install
ln -fs gfortran $PKG/usr/bin/f90
ln -fs gfortran $PKG/usr/bin/f95
# remove un-needed files
find $PKG -name 'README' -delete
rm \
$PKG/usr/bin/*-linux-gnu-* \
$PKG/usr/man/man1/{cpp,gcc,gcov}.1
rm -r \
$PKG/usr/info \
$PKG/usr/man/man7 \
$PKG/usr/lib/gcc/*/$version/install-tools \
$PKG/usr/lib/gcc/*/$version/include
# remove files already on the system out of the port
for i in $(pkginfo -l gcc |sed -e "s|^|/|"); do
if [ -e "$i" ] && [ ! -d "$i" ]; then
if [ -e "$PKG$i" ]; then
rm "$PKG$i"
fi
fi
done
# Remove empty directories
find $PKG -depth -empty -exec rm -r {} \;
# remove build paths from *.la files
for i in `find $PKG -name '*.la' | sed -e "s|$PKG|/|"`; do
sed -i "s|-L$SRC[^ ]* ||g" $PKG/$i
done
# for i in $PKG/usr/lib/libssp*
# do rm $i
# done
# for i in $PKG/usr/lib/libmudflap*
# do rm $i
# done
# for i in $PKG/usr/lib/libgomp*
# do rm $i
# done
# rm $PKG/usr/lib/libgcc_s.so
# rm $PKG/usr/lib/libgcc_s.so.1
# for i in cc1 collect2 crtbegin.o crtbeginS.o \
# crtbeginT.o crtend.o crtendS.o crtfastmath.o libgcc.a libgcc_eh.a libgcov.a
# do rm $PKG/usr/lib/gcc/i686-pc-linux-gnu/$version/$i
# done
}
|