the Fink project is an effort to port
popular Unix programs to Mac OS X
Package: g95
Version: 0.91
Revision: 1002
Distribution: 10.5
Source: ftp://gcc.gnu.org/pub/gcc/releases/gcc-4.0.3/gcc-core-4.0.3.tar.bz2
Source-MD5: 347231730fb44b609b69226c3e432d80
Source2: ftp://anonymous%%40g95%%2Eorg:none@ftp.g95.org/v0.91/g95_source.tgz
Source2-MD5: 35e1852e09b69555bc07f30d0ab4b6ba
NoSourceDirectory: True
NoSetCPPFLAGS: True
NoSetLDFLAGS: True
NoSetMAKEFLAGS: true
Depends: cctools (>= 622-1)
BuildDepends: fink (>= 0.28)
BuildConflicts: autogen-dev
Shlibs: !%p/lib/gcc-lib/%m-apple-darwin9/4.0.3/lib/libgcc_s.1.0.dylib
PatchFile: %n-darwin9.patch
PatchFile-MD5: 4be0b5a60f199d1d68442bc962558c82
PatchScript: <<
#!/bin/sh -ev
cd g95-%v
tar -xvzf libf95.a-%v.tar.gz
# don't try to get darwin-fpsave.o from /usr/lib/libgcc.a, get instead
# from gccdir (/usr/lib/libgcc.a doesn't exist in 10.4).
perl -pi -e 's|ar x /usr/lib/libgcc.a darwin-fpsave.o|cp \@GCC_DIR\@/g95/gcc/libgcc/darwin-fpsave.o .|' Makefile.in
cd ../gcc-4.0.3
# make odcctools being used.
darwinvers=`uname -r|cut -f1 -d.`
if [ $darwinvers == 9 ]; then patch -p1 < %{PatchFile}; gccver=4.0.3;
perl -pi -e 's|686|386|g' ../gcc-${gccver}/gcc/config/i386/darwin.h;
perl -pi -e 's|tjmp %%%%edx|tjmp *%%%%edx|g' ../gcc-${gccver}/gcc/config/i386/i386.c; fi
<<
CompileScript: <<
#!/bin/sh -ev
gccver=4.0.3
darwinvers=`uname -r|cut -f1 -d.`
cd gcc-${gccver}
mkdir g95
cd g95
# build gcc 4.0.3
../configure --prefix=%p/lib/gcc-lib/%m-apple-darwin${darwinvers}/${gccver} --enable-languages=c --with-included-gettext
make
<<
InstallScript: <<
#!/bin/sh -ev
gccver=4.0.3
darwinvers=`uname -r|cut -f1 -d.`
# since we've gone through the trouble to build it,
# also install gcc 4.0.3.
cd gcc-${gccver}/g95
make install DESTDIR=%d
# build and install g95.
# have to build g95 after gcc 4.0.3 is installed, cause
# g95 messes with the files.
cd ../../g95-%v
./configure --prefix=%p --with-gcc-dir=%b/gcc-${gccver} --host=%m-apple-darwin${darwinvers}
make
cd libf95.a-%v
./configure %c --host=%m-apple-darwin${darwinvers}
make
cd ..
mv Makefile Makefile.orig
sed "s|%p/lib/gcc-lib/%m-apple-darwin${darwinvers}/${gccver}|%i/lib/gcc-lib/%m-apple-darwin${darwinvers}/${gccver}|g" < Makefile.orig > Makefile
make install prefix=%i
cd libf95.a-%v
mv Makefile Makefile.orig
sed "s|%p/lib/gcc-lib/%m-apple-darwin${darwinvers}/${gccver}|%i/lib/gcc-lib/%m-apple-darwin${darwinvers}/${gccver}|g" < Makefile.orig > Makefile
make install prefix=%i
ranlib %i/lib/gcc-lib/%m-apple-darwin${darwinvers}/${gccver}/libf95.a
ranlib %i/lib/gcc-lib/%m-apple-darwin${darwinvers}/${gccver}/libgcc.a
ranlib %i/lib/gcc-lib/%m-apple-darwin${darwinvers}/${gccver}/libgcc_eh.a
ln -s %p/bin/%m-apple-darwin${darwinvers}-g95 %i/bin/g95
/bin/rm -f %i/INSTALL
mkdir -p %i/share/doc/%n
mv %i/G95Manual.pdf %i/share/doc/%n
ln -s %p/lib/gcc-lib/%m-apple-darwin${darwinvers}/${gccver}/libf95.a %i/lib/libg95.a
<<
License: GPL
DocFiles: g95-%v/COPYING
Description: Another GNU Fortran 95 compiler
DescDetail: <<
The goal of the g95 project is to create a free, open source
Fortran 95 compiler and runtime libraries.
The 'gfortran' package is the official Fortran 95 compiler for the gcc
project, and is included in gcc 4.x. gfortran originated from
the g95 codebase.
Also installs the gcc 4.0.3 C compiler.
<<
DescPackaging: <<
There are now separate files g95-10.4.info and g95-10.5.info only because
of the Shlibs entry (since the dylib has different names in the different
cases).
<<
DescPort: <<
Installs gcc 4.0.3 C compiler as well, since it is used by r-base.
In order for the C compiler to install properly, 'make install'
for gcc 4.0.3 must be run before the configure step for g95.
<<
Homepage: http://g95.org
Maintainer: None