2006-11-21 22:03:23 +11:00
|
|
|
# URL: http://gcc.gnu.org/fortran
|
|
|
|
# Description: Fortran (f95) add-on for GNU GCC compiler.
|
|
|
|
# Maintainer: Danny Rawlins, romster at shortcircuit dot net dot au
|
|
|
|
# Packager: acrux, acrux at linuxmail dot org
|
|
|
|
# Depends on: libmpfr
|
|
|
|
|
|
|
|
name=gcc-fortran
|
|
|
|
version=4.0.3
|
2007-02-15 16:00:38 +11:00
|
|
|
release=3
|
2006-11-21 22:03:23 +11:00
|
|
|
source=(ftp://sources.redhat.com/pub/gcc/releases/gcc-$version/gcc-{core,fortran}-$version.tar.bz2 \
|
2007-02-15 16:00:38 +11:00
|
|
|
gcc-fortran-$version-version.patch)
|
2006-11-21 22:03:23 +11:00
|
|
|
|
|
|
|
build() {
|
2007-02-15 16:00:38 +11:00
|
|
|
patch -d gcc-$version -p1 -i $SRC/gcc-fortran-$version-version.patch
|
|
|
|
cd gcc-$version
|
2006-11-21 22:03:23 +11:00
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
|
|
|
|
../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
|
|
|
|
#make check
|
|
|
|
make DESTDIR=$PKG install
|
|
|
|
|
|
|
|
ln -s gfortran $PKG/usr/bin/f90
|
|
|
|
ln -s gfortran $PKG/usr/bin/f95
|
|
|
|
|
|
|
|
# remove un-needed files
|
|
|
|
find $PKG -name 'README' -exec rm {} \;
|
|
|
|
|
|
|
|
rm \
|
|
|
|
$PKG/usr/lib/libiberty.a \
|
2007-02-15 16:00:38 +11:00
|
|
|
$PKG/usr/bin/*-linux-gnu-* \
|
|
|
|
$PKG/usr/man/man1/{cpp,gcc,gcov}.1
|
2006-11-21 22:03:23 +11:00
|
|
|
|
|
|
|
rm -r \
|
|
|
|
$PKG/usr/info \
|
2007-02-15 16:00:38 +11:00
|
|
|
$PKG/usr/man/man7 \
|
|
|
|
$PKG/usr/lib/gcc/*/$version/install-tools \
|
|
|
|
$PKG/usr/lib/gcc/*/$version/include
|
2006-11-21 22:03:23 +11:00
|
|
|
|
|
|
|
# remove files already on the system out of the port
|
|
|
|
for i in $(find $PKG | sed -e "s|$PKG|/|"); do
|
|
|
|
if [ -e "$i" ] && [ ! -d "$i" ] ; then
|
|
|
|
rm $PKG/$i
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
# Remove empty directories
|
|
|
|
find $PKG -depth -empty -exec rm -r {} \;
|
|
|
|
|
2007-02-15 16:00:38 +11:00
|
|
|
# remove build paths from *.la files
|
2006-11-21 22:03:23 +11:00
|
|
|
for i in `find $PKG -name '*.la' | sed -e "s|$PKG|/|"`; do
|
|
|
|
sed -i "s|-L$SRC[^ ]* ||g" $PKG/$i
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|