From 049397bd3b7284c083eb1988c0602666384d515a Mon Sep 17 00:00:00 2001 From: Dominik Christ Date: Tue, 26 Nov 2013 17:57:42 +0000 Subject: [PATCH] Fixed compile on darwin13 for bumped metis, scotch, parmetis --- .../rpmBuild/SOURCES/metis-5.1.0_patch_darwin | 89 +++++++++++++++++++ .../rpmBuild/SOURCES/scotch-6.0.0_patch_0 | 4 +- .../SOURCES/scotch-6.0.0_patch_darwin | 25 ++++++ ThirdParty/rpmBuild/SPECS/metis-5.1.0.spec | 4 +- ThirdParty/rpmBuild/SPECS/parmetis-4.0.3.spec | 2 +- ThirdParty/rpmBuild/SPECS/scotch-6.0.0.spec | 5 ++ 6 files changed, 124 insertions(+), 5 deletions(-) create mode 100644 ThirdParty/rpmBuild/SOURCES/metis-5.1.0_patch_darwin create mode 100644 ThirdParty/rpmBuild/SOURCES/scotch-6.0.0_patch_darwin diff --git a/ThirdParty/rpmBuild/SOURCES/metis-5.1.0_patch_darwin b/ThirdParty/rpmBuild/SOURCES/metis-5.1.0_patch_darwin new file mode 100644 index 000000000..28f350199 --- /dev/null +++ b/ThirdParty/rpmBuild/SOURCES/metis-5.1.0_patch_darwin @@ -0,0 +1,89 @@ +--- metis-5.1.0/GKlib/Makefile 2007-03-27 17:34:29.000000000 -0400 ++++ metis-5.1.0/GKlib/Makefile 2010-10-26 01:02:24.000000000 -0400 +@@ -55,6 +55,23 @@ + LIBEXT = .lib + EXEEXT = .exe + else ++ ++ #------------------------------------------------------------------- ++ # These defs are common among the GNU/GCC based systems ++ #------------------------------------------------------------------- ++ #Library creation information ++ AR = ar crv $@ ++ RANLIB = ar -ts $@ ++ ++ #Compile input/output file specification ++ SOURCEFILE = -c $< ++ OUTPUTFILE = -o $@ ++ ++ # Standard file extensions ++ OBJEXT = .o ++ LIBEXT = .a ++ EXEEXT = ++ + ifeq ($(systype),Linux) + ifeq ($(x86compiler),gcc) + #Compiler information +@@ -86,7 +103,7 @@ + ifeq ($(systype),Darwin) + #Compiler information + CC = gcc +- OPTFLAGS = -O6 ++ OPTFLAGS = -O3 -shared + COPTIONS = -DDARWIN -D_FILE_OFFSET_BITS=64 -Wall -std=c99 -pedantic + + #Linker information +@@ -95,7 +112,11 @@ + + #Linker information + LDOPTIONS = +- LD = gcc ++ #LD = gcc ++ AR = gcc -shared -dynamiclib -undefined dynamic_lookup -o $@ ++ LD = $(CC) -dynamiclib -undefined dynamic_lookup ++ RANLIB = ++ LIBEXT = .dylib + endif + + +@@ -121,22 +142,6 @@ + LD = gcc + endif + +- +- #------------------------------------------------------------------- +- # These defs are common among the GNU/GCC based systems +- #------------------------------------------------------------------- +- #Library creation information +- AR = ar crv $@ +- RANLIB = ar -ts $@ +- +- #Compile input/output file specification +- SOURCEFILE = -c $< +- OUTPUTFILE = -o $@ +- +- # Standard file extensions +- OBJEXT = .o +- LIBEXT = .a +- EXEEXT = + endif + + +diff -uNr metis-5.0pre2/Makefile.in metis-5.0pre2_patch/Makefile.in +--- metis-5.0pre2/Makefile.in 2007-04-08 00:01:04.000000000 -0400 ++++ metis-5.0pre2_patch/Makefile.in 2010-10-26 01:01:50.000000000 -0400 +@@ -105,8 +105,12 @@ + ifeq ($(systype),Darwin) + #Compiler information + CC = gcc +- OPTFLAGS = -O6 +- COPTIONS += -DDARWINPPC ++ OPTFLAGS = -O3 -shared ++ COPTIONS += -DDARWIN ++ AR = gcc -shared -dynamiclib -undefined dynamic_lookup -o $@ ++ LD = $(CC) -dynamiclib -undefined dynamic_lookup ++ RANLIB = ++ LIBEXT = .dylib + endif + + ifeq ($(systype),CYGWIN) diff --git a/ThirdParty/rpmBuild/SOURCES/scotch-6.0.0_patch_0 b/ThirdParty/rpmBuild/SOURCES/scotch-6.0.0_patch_0 index d9512db30..9a9347305 100644 --- a/ThirdParty/rpmBuild/SOURCES/scotch-6.0.0_patch_0 +++ b/ThirdParty/rpmBuild/SOURCES/scotch-6.0.0_patch_0 @@ -1,6 +1,6 @@ diff -ruN scotch_5.1.10b_orig/src/Make.inc/Makefile.inc.i686_mac_darwin10.shlib scotch_5.1.10b/src/Make.inc/Makefile.inc.i686_mac_darwin10.shlib ---- scotch_5.1.10b_orig/src/Make.inc/Makefile.inc.i686_mac_darwin10.shlib 1969-12-31 19:00:00.000000000 -0500 -+++ scotch_5.1.10b/src/Make.inc/Makefile.inc.i686_mac_darwin10.shlib 2010-10-31 15:44:58.000000000 -0400 +--- scotch_6.0.0/src/Make.inc/Makefile.inc.i686_mac_darwin10.shlib 1969-12-31 19:00:00.000000000 -0500 ++++ scotch_6.0.0/src/Make.inc/Makefile.inc.i686_mac_darwin10.shlib 2010-10-31 15:44:58.000000000 -0400 @@ -0,0 +1,22 @@ +EXE = +LIB = .dylib diff --git a/ThirdParty/rpmBuild/SOURCES/scotch-6.0.0_patch_darwin b/ThirdParty/rpmBuild/SOURCES/scotch-6.0.0_patch_darwin new file mode 100644 index 000000000..ec5b96bd4 --- /dev/null +++ b/ThirdParty/rpmBuild/SOURCES/scotch-6.0.0_patch_darwin @@ -0,0 +1,25 @@ +--- scotch_6.0.0_orig/src/Make.inc/Makefile.inc.i686_mac_darwin10.shlib 1970-01-01 01:00:00.000000000 +0100 ++++ scotch_6.0.0/src/Make.inc/Makefile.inc.i686_mac_darwin10.shlib 2013-11-26 17:28:43.000000000 +0000 +@@ -0,0 +1,22 @@ ++EXE = ++LIB = .dylib ++OBJ = .o ++ ++MAKE = make ++AR = gcc ++ARFLAGS = -shared -dynamiclib -undefined dynamic_lookup -o ++CAT = cat ++CCS = gcc ++CCP = mpicc ++CCD = mpicc ++CFLAGS = -O3 -Destrict=__restrict -DCOMMON_RANDOM_FIXED_SEED -DCOMMON_TIMING_OLD -DCOMMON_FILE_COMPRESS_GZ -DSCOTCH_RENAME ++CLIBFLAGS = ++LDFLAGS = -lz -lm ++LIBLDFLAGS = -dynamiclib -undefined dynamic_lookup ++CP = cp ++LEX = flex ++LN = ln ++MKDIR = mkdir ++MV = mv ++RANLIB = ranlib ++YACC = bison -y diff --git a/ThirdParty/rpmBuild/SPECS/metis-5.1.0.spec b/ThirdParty/rpmBuild/SPECS/metis-5.1.0.spec index ad1fd8308..669fcffa5 100644 --- a/ThirdParty/rpmBuild/SPECS/metis-5.1.0.spec +++ b/ThirdParty/rpmBuild/SPECS/metis-5.1.0.spec @@ -77,7 +77,7 @@ URL: http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis Source: %url/%{name}-%{version}.tar.gz Prefix: %{_prefix} Group: Development/Tools -Patch0: metis-5.0pre2_patch_darwin +Patch0: metis-5.1.0_patch_darwin %define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS} @@ -88,7 +88,7 @@ Patch0: metis-5.0pre2_patch_darwin %setup -q %ifos darwin -%patch0 -p1 +#%patch0 -p1 %endif %build diff --git a/ThirdParty/rpmBuild/SPECS/parmetis-4.0.3.spec b/ThirdParty/rpmBuild/SPECS/parmetis-4.0.3.spec index a5a6d84cf..40c9f1352 100644 --- a/ThirdParty/rpmBuild/SPECS/parmetis-4.0.3.spec +++ b/ThirdParty/rpmBuild/SPECS/parmetis-4.0.3.spec @@ -89,7 +89,7 @@ Patch1: ParMetis-3.1.1.patch %setup -q %ifos darwin -%patch0 -p1 +#%patch0 -p1 #%else #patch1 -p1 %endif diff --git a/ThirdParty/rpmBuild/SPECS/scotch-6.0.0.spec b/ThirdParty/rpmBuild/SPECS/scotch-6.0.0.spec index 51db9bb43..48349be57 100644 --- a/ThirdParty/rpmBuild/SPECS/scotch-6.0.0.spec +++ b/ThirdParty/rpmBuild/SPECS/scotch-6.0.0.spec @@ -78,6 +78,7 @@ Source: %url/%{name}-%{version}.tar.gz Prefix: %{_prefix} Group: Development/Tools Patch0: scotch-6.0.0_patch_0 +Patch1: scotch-6.0.0_patch_darwin %define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS} @@ -87,7 +88,11 @@ Patch0: scotch-6.0.0_patch_0 %prep %setup -q -n %{name}_%{version} +%ifos darwin +%patch1 -p1 +%else %patch0 -p1 +%endif %build # export WM settings in a form that GNU configure recognizes