the Fink project is an effort to port
popular Unix programs to Mac OS X
Info4: <<
Package: gmp%type_pkg[-64bit]
Version: 4.3.2
Revision: 9
GCC: 4.0
Type: -64bit (boolean)
Architecture: ( %type_raw[-64bit] = -64bit ) powerpc, ( %type_raw[-64bit] = -64bit ) i386
# Source: mirror:gnu:gmp/gmp-%v.tar.gz
# Source-MD5: 2a431d487dfd76d0f618d241b1e551cc
Source: http://www.csl.cornell.edu/~fang/sw/%{ni}-%v.20100509.tar.gz
Source-MD5: 24192251ecddbc26296788bcae110b0c
SourceDirectory: %{ni}-%v
Source2: http://www.csl.cornell.edu/~fang/sw/gmp-trunk-20110131-config.guess
Source2-MD5: d526c73bbb512808aa4e871937dd6fa4
PatchFile: %{ni}.patch
PatchFile-MD5: 9b8c1d5647b7b8470ba2065544636e30
Depends: <<
%N-shlibs (= %v-%r),
libgmpxx%type_pkg[-64bit]-shlibs (= %v-%r),
( %type_raw[-64bit] = -64bit ) 64bit-cpu
<<
BuildDepends: fink (>= 0.26.0)
# gcc4.0 (>= 4.0.1-1)
Conflicts: gmp, gmp-64bit, gmp5, gmp5-64bit
Replaces: gmp, gmp-64bit, gmp5, gmp5-64bit
SetCPPFLAGS: -fexceptions
ConfigureParams: <<
ABI=$ABI \
$host_build_override \
--libdir='${prefix}/%lib' \
--infodir='${prefix}/share/info' \
--enable-cxx
<<
PatchScript: <<
#!/bin/sh -ev
%{default_script}
echo "replacing gmp's config.guess with newer one from trunk (patched)"
mv config.guess config.guess.orig
# gmp4's configure isn't aware of corei, so the next best is core2
sed 's|corei[a-z]*|core2|g' ../gmp-trunk-*-config.guess > ./config.guess
chmod +x ./config.guess
<<
UseMaxBuildJobs: true
CompileScript: <<
#! /bin/sh -ev
mkdir build
cd build
# extra checks for compiler version
# darwin8's default compiler is good
# darwin9 needs newer compiler
# darwin10's default compiler is good
darwin_vers=`uname -r | cut -d. -f1`
if test "$darwin_vers" = 9 ; then
export CC=gcc-4.2
export CXX=g++-4.2
test -x `which gcc-4.2` || { echo "gcc-4.2 required, but missing!"; exit 1; }
fi
# force i386 to bump to i686 to avoid symbol dep on __sync_fetch_and_add_4
hb=`../config.guess`
case $hb in
i386-*-*) hb=`echo $hb | sed 's|i386|i686|'`
host_build_override="--host=$hb --build=$hb" ;;
esac
if [ "%type_raw[-64bit]" == "." ] ; then
case "%m" in
i386 | powerpc) ABI=32 ;;
x86_64) ABI=64 ;;
esac
else
case "%m" in
i386) ABI=64 ;;
powerpc) ABI=mode64 ;;
esac
fi
prefix=%p echo "configuring with: %c"
../configure %c
make
make check
<<
InstallScript: <<
#!/bin/sh -ev
cd build
make -j1 DESTDIR=%d install
<<
DocFiles: COPYING COPYING.LIB README
InfoDocs: gmp.info
BuildDependsOnly: True
SplitOff: <<
Package: %N-shlibs
Depends: ( %type_raw[-64bit] = -64bit ) 64bit-cpu
Replaces: gmp (<< 4.0.1-1)
Files: %lib/libgmp.*.dylib
Shlibs: <<
%p/%lib/libgmp.3.dylib 9.0.0 %n (>= 4.2.1-1) %type_num[-64bit]
<<
Description: Shared library for gmp package
DocFiles: doc/* AUTHORS COPYING COPYING.LIB ChangeLog INSTALL NEWS README
<<
SplitOff2: <<
Package: libgmpxx%type_pkg[-64bit]-shlibs
Depends: ( %type_raw[-64bit] = -64bit ) 64bit-cpu, %N-shlibs
Replaces: gmp (<< 4.0.1-1), gmp-shlibs (<< 4.1.4-1)
Files: %lib/libgmpxx.*.dylib
Shlibs: <<
%p/%lib/libgmpxx.4.dylib 6.0.0 %n (>= 4.2.1-1) %type_num[-64bit]
<<
Description: Shared C++ library for gmp package
DocFiles: doc/* AUTHORS COPYING COPYING.LIB ChangeLog INSTALL NEWS README
<<
License: LGPL
Description: GNU multiple precision arithmetic library
DescDetail: <<
GNU MP is a portable library written in C for arbitrary precision
arithmetic on integers, rational numbers, and floating-point numbers.
<<
DescPackaging: <<
Unfortunately, the libgmpxx4 splitoff, which existed from vers. 4.1.4-1
through vers. 4.2.1-1008, was misnamed. It *should* have been called
libgmpxx3, and the new version of that library should now be in a splitoff
called libgmpxx4. To work around this, the splitoff is now called
libgmpxx (with no number); note that the next time the major version of
this library changes, the splitoff should go to libgmpxx5.
Future major versions should be installed to private pkglib dirs so
that multiple versions may coexist without conflict.
The source was regenerated from a checkout from upstream that contains
the cumulative patches relative to 4.3.2, which added support for
corei family of CPUs. Re-rolling the dist was much easier than trying to
create a working patch.
<<
DescPort: <<
Patch from Ben Hines to build libgmpxx, as of vers. 4.1-2. As of vers.
4.1.4-1, libgmpxx gets its own splitoff.
As of vers. 4.2, mpfr is a separate library, available in fink as the
libmpfr1 package.
The patch, provided by Martin Costabel, makes the 64bit variant compile on
the new MacBookPros whose core2 duo processor is misidentified as pentium3.
As of vers. 4.2.3, we are building with -fexceptions, for the benefit of
ppl library that will be used in gcc 4.4.x. (Suggested by Jack Howarth;
see http://www.cs.unipr.it/ppl/ and http://gcc.gnu.org/wiki/Graphite .)
<<
Maintainer: David Fang
# Former maintainer: Dave Morrison
Homepage: http://gmplib.org
<<
--- gmp-4.3.2/configure.orig 2012-03-18 15:42:05.000000000 -0400
+++ gmp-4.3.2/configure 2012-03-18 15:45:19.000000000 -0400
@@ -30563,7 +30563,7 @@
esac
cat >conftest.c <
+const int foo[] = {1,2,3};
EOF
echo "Test program:" >&5
cat conftest.c >&5
--- gmp-4.3.2/acinclude.m4.orig 2012-03-18 15:40:17.000000000 -0400
+++ gmp-4.3.2/acinclude.m4 2012-03-18 15:45:34.000000000 -0400
@@ -1942,7 +1942,7 @@
esac
cat >conftest.c <
+const int foo[] = {1,2,3};
EOF
echo "Test program:" >&AC_FD_CC
cat conftest.c >&AC_FD_CC