diff options
author | Katharina Fey <kookie@spacekookie.de> | 2019-10-05 12:43:18 +0000 |
---|---|---|
committer | Katharina Fey <kookie@spacekookie.de> | 2019-10-05 12:44:52 +0000 |
commit | cf85056ba64caf3267d43255ef4a1243e9c8ee3b (patch) | |
tree | 3051519e9c8275b870aac43f80af875715c9d124 /nixpkgs/pkgs/development/libraries/science/math/lcalc/makefile.patch | |
parent | 1148b1d122bc03e9a3665856c9b7bb96bd4e3994 (diff) | |
parent | 2436c27541b2f52deea3a4c1691216a02152e729 (diff) |
Add 'nixpkgs/' from commit '2436c27541b2f52deea3a4c1691216a02152e729'
git-subtree-dir: nixpkgs
git-subtree-mainline: 1148b1d122bc03e9a3665856c9b7bb96bd4e3994
git-subtree-split: 2436c27541b2f52deea3a4c1691216a02152e729
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/science/math/lcalc/makefile.patch')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/science/math/lcalc/makefile.patch | 113 |
1 files changed, 113 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/science/math/lcalc/makefile.patch b/nixpkgs/pkgs/development/libraries/science/math/lcalc/makefile.patch new file mode 100644 index 00000000000..f55bbe3f24f --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/science/math/lcalc/makefile.patch @@ -0,0 +1,113 @@ +diff --git a/src/Makefile b/src/Makefile +index 84e4e88..56ca676 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -58,7 +58,7 @@ ifeq ($(G5),TRUE) + #MACHINE_SPECIFIC_FLAGS = -mpowerpc -mpowerpc64 -m64 + endif + +-CCFLAGS = -Wa,-W -O3 $(OPENMP_FLAG) -Wno-deprecated $(PREPROCESSOR_DEFINE) $(MACHINE_SPECIFIC_FLAGS) $(EXTRA) ++CCFLAGS = $(CXXFLAGS) $(OPENMP_FLAG) $(PREPROCESSOR_DEFINE) $(MACHINE_SPECIFIC_FLAGS) + #CCFLAGS = -Wa,-W -O3 $(OPENMP_FLAG) $(PREPROCESSOR_DEFINE) $(MACHINE_SPECIFIC_FLAGS) $(EXTRA) + #CCFLAGS = -Wa,-W -O2 -fno-exceptions -Wno-deprecated $(PREPROCESSOR_DEFINE) $(MACHINE_SPECIFIC_FLAGS) $(EXTRA) + +@@ -68,12 +68,12 @@ CCFLAGS = -Wa,-W -O3 $(OPENMP_FLAG) -Wno-deprecated $(PREPROCESSOR_DEFINE) $(MA + + ifeq ($(PARI_DEFINE),-DINCLUDE_PARI) + #location of pari.h. +- LOCATION_PARI_H = /usr/local/include/pari #usual location ++ LOCATION_PARI_H = $(PARI_PREFIX)/include/pari #usual location + + #location of libpari.a or of libpari.so + #depending on whether static or dynamic libraries are being used. + #On mac os x it's the former, on linux I think usually the latter. +- LOCATION_PARI_LIBRARY = /usr/local/lib #usual location ++ LOCATION_PARI_LIBRARY = $(PARI_PREFIX)/lib #usual location + else + #supplied as a dummy so as to avoid more ifeq's below + LOCATION_PARI_H = . +@@ -89,24 +89,24 @@ INCLUDEFILES= -I../include + + ifeq ($(OS_NAME),Darwin) + LDFLAGS2 = +- DYN_OPTION=dynamiclib ++ DYN_OPTION=-dynamiclib + else +- LDFLAGS1 = -Xlinker -export-dynamic #not sure why pari calls these when linking but on the web I found ++ LDFLAGS1 = #not sure why pari calls these when linking but on the web I found + #'Libtool provides the `-export-dynamic' link flag (see section Link mode), which does this declaration. + #You need to use this flag if you are linking a shared library that will be dlopened' + #see notes below + #ifeq ($(PARI_DEFINE),-DINCLUDE_PARI) +- LDFLAGS2 = $(LDFLAGS1) -Xlinker -rpath -Xlinker $(LOCATION_PARI_LIBRARY) ++ LDFLAGS2 = $(LDFLAGS) + #else + # LDFLAGS2 = $(LDFLAGS1) + #endif +- DYN_OPTION=shared ++ DYN_OPTION=$(LDFLAGS) -shared -Wl,-soname,libLfunction.so + endif + + ifeq ($(PARI_DEFINE),-DINCLUDE_PARI) +- LDFLAGS = $(LDFLAGS2) -L$(LOCATION_PARI_LIBRARY) -lpari ++ MYLDFLAGS = $(LDFLAGS2) -L$(LOCATION_PARI_LIBRARY) -lpari + else +- LDFLAGS = $(LDFLAGS2) ++ MYLDFLAGS = $(LDFLAGS2) + endif + + +@@ -129,7 +129,8 @@ endif + #become clear which libraries the computer can find. + + +-INSTALL_DIR= /usr/local ++INSTALL_DIR= $(DESTDIR) ++LIB_DIR ?=lib + + #object files for the libLfunction library + OBJ_L = Lglobals.o Lgamma.o Lriemannsiegel.o Lriemannsiegel_blfi.o Ldokchitser.o +@@ -141,9 +142,8 @@ OBJECTS = $(OBJ3) + + all: + # make print_vars +- make libLfunction.so +- make lcalc +- make examples ++ ${MAKE} libLfunction.so ++ ${MAKE} lcalc + # make find_L + # make test + +@@ -151,7 +151,7 @@ print_vars: + @echo OS_NAME = $(OS_NAME) + + lcalc: $(OBJECTS) +- $(CC) $(CCFLAGS) $(INCLUDEFILES) $(OBJECTS) $(LDFLAGS) -o lcalc $(GMP_FLAGS) ++ $(CC) $(CCFLAGS) $(INCLUDEFILES) $(OBJECTS) $(MYLDFLAGS) -o lcalc $(GMP_FLAGS) + + examples: + $(CC) $(CCFLAGS) $(INCLUDEFILES) example_programs/example.cc libLfunction.so -o example_programs/example $(GMP_FLAGS) +@@ -262,15 +262,18 @@ Lcommandline.o: ../include/Lcommandline_values_zeros.h + + + libLfunction.so: $(OBJ_L) +- g++ -$(DYN_OPTION) -o libLfunction.so $(OBJ_L) ++ g++ $(DYN_OPTION) -o libLfunction.so $(OBJ_L) + + clean: + rm -f *.o lcalc libLfunction.so example_programs/example + + install: +- cp -f lcalc $(INSTALL_DIR)/bin/. +- cp -f libLfunction.so $(INSTALL_DIR)/lib/. +- cp -rf ../include $(INSTALL_DIR)/include/Lfunction ++ install -d $(INSTALL_DIR)/bin ++ install -d $(INSTALL_DIR)/$(LIB_DIR) ++ install -d $(INSTALL_DIR)/include/libLfunction ++ install lcalc $(INSTALL_DIR)/bin ++ install libLfunction.so $(INSTALL_DIR)/$(LIB_DIR) ++ install -m 644 -t $(INSTALL_DIR)/include/libLfunction ../include/*.h + + + SRCS = Lcommandline.cc Lcommandline_elliptic.cc Lcommandline_globals.cc Lcommandline_misc.cc Lcommandline_numbertheory.cc Lcommandline_twist.cc Lcommandline_values_zeros.cc Lgamma.cc Lglobals.cc Lmisc.cc Lriemannsiegel.cc Lriemannsiegel_blfi.cc cmdline.c |