SFEmpfr bump to 2.4.2 - adjust location of SFEgmp, always require SFEgmp
authortom68
Mon, 14 Jun 2010 20:44:56 +0000
changeset 2783 ebb6ee3bb662
parent 2782 79f2f8594684
child 2784 af6ee76a14db
SFEmpfr bump to 2.4.2 - adjust location of SFEgmp, always require SFEgmp SFEgmp bump to 4.3.2 - rework patch gmp-01, pause older assembly improvements on AMD64, add patch gmp-02 extern inline
SFEgmp.spec
SFEmpfr.spec
patches/gmp-01-solaris.diff
patches/gmp-02-extern-inline-gmp-h.in.diff
--- a/SFEgmp.spec	Mon Jun 14 18:16:20 2010 +0000
+++ b/SFEgmp.spec	Mon Jun 14 20:44:56 2010 +0000
@@ -29,12 +29,14 @@
 Name:                    SFEgmp
 Summary:                 GNU Multiple Presicion Arithmetic Library
 Group:                   libraries/math
-Version:                 4.2.1
+Version:                 4.3.2
 Source:                  http://ftp.sunet.se/pub/gnu/gmp/gmp-%{version}.tar.bz2
 %ifarch amd64
-Source1:                 http://www.loria.fr/~gaudry/mpn_AMD64/mpn_amd64.42.tgz
+##TODO## not longer needed? 
+#paused for 4.3.2 Source1:                 http://www.loria.fr/~gaudry/mpn_AMD64/mpn_amd64.42.tgz
 %endif
 Patch1:                  gmp-01-solaris.diff
+Patch2:                  gmp-02-extern-inline-gmp-h.in.diff
 URL:                     http://gmplib.org/
 SUNW_BaseDir:            %{_basedir}/%{_subdir}
 BuildRoot:               %{_tmppath}/%{name}-%{version}-build
@@ -52,11 +54,13 @@
 %ifarch amd64 sparcv9
 cp -pr gmp-%{version} gmp-%{version}-64
 %endif
-%ifarch amd64
-gtar fxz %{SOURCE1}
-cd mpn_amd64.42
-./install ../gmp-%{version}-64
-%endif
+##TODO## not longer needed? 
+#paused for 4.3.2 Source1 mpn_AMD64/mpn_amd64.42.tgz
+#%ifarch amd64
+#gtar fxz %{SOURCE1}
+#cd mpn_amd64.42
+#./install ../gmp-%{version}-64
+#%endif
 
 %build
 CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
@@ -82,9 +86,12 @@
 %endif
 
 %ifarch amd64
-export CC="gcc"
+#Source1 not used, go back to cc
+#export CC="gcc"
+export CC="cc"
 export CXX=${CXX64:-$CXX}
-export CFLAGS="-mtune=opteron -m64 -O3 -fomit-frame-pointer -fPIC -DPIC"
+#Source1 not used, go back to cc
+#export CFLAGS="-mtune=opteron -m64 -O3 -fomit-frame-pointer -fPIC -DPIC"
 export CXXFLAGS="$CXXFLAGS64"
 export LDFLAGS="$LDFLAGS64"
 %endif
@@ -93,6 +100,7 @@
 %ifarch amd64 sparcv9
 cd gmp-%{version}-64
 %patch1 -p1
+%patch2 -p1
 
 libtoolize --copy --force
 aclocal $ACLOCAL_FLAGS
@@ -114,6 +122,7 @@
 
 cd gmp-%{version}
 %patch1 -p1
+%patch2 -p1
 
 export CC=${CC32:-$CC}
 export CXX=${CXX32:-$CXX}
@@ -187,6 +196,12 @@
 %{_includedir}/*
 
 %changelog
+* Sun Jun  6 2010 - Thomas Wagner
+- bump to 4.3.2
+- rework patch gmp-01 for version 4.3.2
+- pause/remove Source1 for AMD64 assembly improvements (is this still needed?)
+- use SunStudio for 64bit  (was gcc used for the Source1 AMD64 assembly improvements? pls speak up if you need this again)
+- add patch2 extern inline (http://gmplib.org/list-archives/gmp-discuss/2010-February/004031.html)
 * Sat Mar 14 2009 - Thomas Wagner
 - shorten ACLOCAL flags by removing -I %{_datadir}/aclocal (fails if diry not present)
 - fix packaging error by adding %_datadir to configure
--- a/SFEmpfr.spec	Mon Jun 14 18:16:20 2010 +0000
+++ b/SFEmpfr.spec	Mon Jun 14 20:44:56 2010 +0000
@@ -18,12 +18,15 @@
 ##TODO## think on usr-gnu.inc define infodir inside /usr/gnu/share to avoid conflicts
 %define _infodir           %{_datadir}/info
 
-%define SFEgmp   %(/usr/bin/pkginfo -q SFEgmp && echo 1 || echo 0)
+#%define SFEgmp   %(/usr/bin/pkginfo -q SFEgmp && echo 1 || echo 0)
+#SFEmpfr without SFEgmp makes no sense! Make it a hard Reqirement for now
+##TODO## ##FIXME## need a clever decision here
+%define SFEgmp 1
 
 
 Name:                SFEmpfr
 Summary:             C library for multiple-precision floating-point computations
-Version:             2.4.1
+Version:             2.4.2
 Source:              http://www.mpfr.org/mpfr-current/mpfr-%{version}.tar.bz2
 SUNW_BaseDir:        %{_basedir}/%{_subdir}
 BuildRoot:           %{_tmppath}/%{name}-%{version}-build
@@ -32,8 +35,10 @@
 %if %SFEgmp
 BuildRequires: SFEgmp-devel
 Requires: SFEgmp
-Conflicts: SUNWgnu-mpfr
-%define SFEgmpbasedir %(pkgparam SFEgmp BASEDIR)
+#IPS doesn't honour SUNW_BaseDir 
+##TODO## ##FIXME##
+#%define SFEgmpbasedir %(pkgparam SFEgmp BASEDIR)
+%define SFEgmpbasedir %{_prefix} 
 %else
 BuildRequires: SUNWgnu-mp
 Requires: SUNWgnu-mp
@@ -163,6 +168,8 @@
 %dir %attr (0755, root, bin) %{_libdir}
 %{_libdir}/lib*.so*
 %dir %attr (0755, root, sys) %{_datadir}
+%dir %attr (0755, root, other) %{_datadir}/doc
+%{_datadir}/doc/*/*
 %dir %attr(0755, root, bin) %{_infodir}
 %{_infodir}/*
 %ifarch amd64 sparcv9
@@ -176,6 +183,12 @@
 %{_includedir}/*
 
 %changelog
+* Sun Jun 14 2010 - Thomas Wagner
+- Bumped up the version to 2.4.2
+- where is my gmp? workaround for IPS ever setting SUNW_BaseDir "/": derive 
+  value from _prefix (/usr or /usr/gnu)
+- make SFEgmp 1 - so always Require SFEgmp (leave the rest of the logic in place)
+- removed Conflicts: SUNWgnu-mpfr (we live in /usr/gnu/)
 * Sat Mar 07 2009 - Thomas Wagner
 - Bumped up the version to 2.4.1
 - fix packaging error by adding %_datadir to configure
--- a/patches/gmp-01-solaris.diff	Mon Jun 14 18:16:20 2010 +0000
+++ b/patches/gmp-01-solaris.diff	Mon Jun 14 20:44:56 2010 +0000
@@ -1,21 +1,16 @@
---- gmp-4.2.1.orig/configure.in	2007年  8月 17日 五 07:14:22
-+++ gmp-4.2.1/configure.in	2007年  8月 17日 五 07:15:54
-@@ -1437,6 +1437,18 @@
-     fi
+--- gmp-4.3.2/configure.in.orig	2010-01-07 21:09:02.000000000 +0100
++++ gmp-4.3.2/configure.in	2010-06-06 00:51:06.952256588 +0200
+@@ -1470,8 +1470,12 @@
+         case $host in
+           *-*-solaris*)
+             # Sun cc.
+-            cclist_64="$cclist_64 cc"
++            cclist="cc gcc"
++            cclist_64="cc $cclist_64"
+             cc_64_cflags="-xO3 -m64"
++            abilist="64 32"
++            path="x86/p6/p3mmx x86/p6/mmx x86/p6 x86"
++            path_64="x86_64"
+             ;;
+         esac
  
-     case $host in
-+      *-*-solaris*)
-+        abilist="64 32"
-+        path="x86/p6/p3mmx x86/p6/mmx x86/p6 x86"
-+        path_64="x86_64"
-+        cclist="cc gcc"
-+        cclist_64="cc gcc"
-+        gcc_64_cflags="-O2 -m64"
-+        gcc_64_cflags_optlist="cpu"
-+        CALLING_CONVENTIONS_OBJS_64='amd64call.lo amd64check$U.lo'
-+        SPEED_CYCLECOUNTER_OBJ_64=x86_64.lo
-+        cyclecounter_size_64=2
-+        ;;
-       x86_64-*-*)
-         abilist="64 32"
-         path_64="x86_64"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/gmp-02-extern-inline-gmp-h.in.diff	Mon Jun 14 20:44:56 2010 +0000
@@ -0,0 +1,14 @@
+http://gmplib.org/list-archives/gmp-discuss/2010-February/004031.html
+
+fixed in some 5.x version but not yet in 4.x (if at all)
+--- gmp-4.3.2/gmp-h.in.orig	2010-01-07 21:09:02.000000000 +0100
++++ gmp-4.3.2/gmp-h.in	2010-06-06 03:31:31.740609132 +0200
+@@ -463,7 +463,7 @@
+ /* Recent enough Sun C compilers accept "extern inline" */
+ #if defined (__SUNPRO_C) && __SUNPRO_C >= 0x560 \
+   && ! defined (__GMP_EXTERN_INLINE)
+-#define __GMP_EXTERN_INLINE  extern inline
++#define __GMP_EXTERN_INLINE  inline
+ #endif
+ 
+ /* Somewhat older Sun C compilers accept "static inline" */