[SCM] lcalc: program for computing zeros and values of L-functions branch, master, updated. debian/0.0.20080205-1.2-15-gb903849

Tobias Hansen tobias.han at gmx.de
Sat Jan 12 03:33:49 UTC 2013


The following commit has been merged in the master branch:
commit 699429c5af3f62fb98684ddfe992c72146a879d0
Author: Tobias Hansen <tobias.han at gmx.de>
Date:   Sat Jan 12 04:13:13 2013 +0100

    Add (and modify) Makefile.patch from Sage.

diff --git a/debian/patches/Makefile.patch b/debian/patches/Makefile.patch
new file mode 100644
index 0000000..e50a6fb
--- /dev/null
+++ b/debian/patches/Makefile.patch
@@ -0,0 +1,164 @@
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -29,7 +29,15 @@
+ 
+ OS_NAME := $(shell uname)
+ 
+-CC = g++
++#CC = g++
++# Note: I've also changed various rules to use $CXX instead of $CC,
++# since we mostly compile C++, not C, and $CC is by convention
++# used for the *C* compiler.
++# I've kept the [name] CCFLAGS though, which we add $CXXFLAGS to.
++# -leif (03/2012)
++CC ?= gcc
++CXX ?= g++
++
+ #cc = /home/mrubinst/local/bin/gcc
+ #CC = /home/mrubinst/local/bin/g++
+ #LD = /home/mrubinst/local/bin/g++
+@@ -58,9 +66,7 @@
+    #MACHINE_SPECIFIC_FLAGS = -mpowerpc -mpowerpc64 -m64
+ endif
+ 
+-CCFLAGS =  -Wa,-W -O3 $(OPENMP_FLAG) -Wno-deprecated $(PREPROCESSOR_DEFINE) $(MACHINE_SPECIFIC_FLAGS) $(EXTRA)
+-#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)
++CCFLAGS = $(CCFLAGS) $(CXXFLAGS) -O3  $(OPENMP_FLAG)  $(PREPROCESSOR_DEFINE) $(MACHINE_SPECIFIC_FLAGS) $(EXTRA)
+ 
+ #warning- O2 doesn't help with -DUSE_LONG_DOUBLE on mac, and actually seems to hurt, making runtime longer
+ #by a factor of 1.5
+@@ -68,12 +74,12 @@
+ 
+ ifeq ($(PARI_DEFINE),-DINCLUDE_PARI)
+     #location of pari.h.
+-    LOCATION_PARI_H = /usr/local/include/pari #usual location
++    LOCATION_PARI_H = /usr/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 = /usr/lib #usual location
+ else
+     #supplied as a dummy so as to avoid more ifeq's below
+     LOCATION_PARI_H = .
+@@ -88,26 +94,12 @@
+ #For Mac os x we omit shared library options
+ 
+ ifeq ($(OS_NAME),Darwin)
+-    LDFLAGS2 =
+     DYN_OPTION=dynamiclib
+ else
+-    LDFLAGS1 = -Xlinker -export-dynamic #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)
+-    #else
+-    #    LDFLAGS2 = $(LDFLAGS1)
+-    #endif
+     DYN_OPTION=shared
+ endif
+ 
+-ifeq ($(PARI_DEFINE),-DINCLUDE_PARI)
+-    LDFLAGS = $(LDFLAGS2) -L$(LOCATION_PARI_LIBRARY) -lpari
+-else
+-    LDFLAGS = $(LDFLAGS2)
+-endif
++LDFLAGS = $(LDFLAGS) -L$(LOCATION_PARI_LIBRARY) -lpari -lgmp
+ 
+ 
+ 
+@@ -129,7 +121,7 @@
+ #become clear which libraries the computer can find.
+ 
+ 
+-INSTALL_DIR= /usr/local
++INSTALL_DIR ?= /usr/local
+ 
+ #object files for the libLfunction library
+ OBJ_L = Lglobals.o Lgamma.o Lriemannsiegel.o Lriemannsiegel_blfi.o Ldokchitser.o
+@@ -140,34 +132,37 @@
+ OBJECTS = $(OBJ3)
+ 
+ all:
+-#	make print_vars
+-	make libLfunction.so
+-	make lcalc
+-	make examples
+-#	make find_L
+-#	make test
++#	$(MAKE) print_vars
++	$(MAKE) libLfunction.so
++	$(MAKE) lcalc
++	$(MAKE) examples
++#	$(MAKE) find_L
++#	$(MAKE) test
+ 
+ print_vars:
+ 	@echo OS_NAME = $(OS_NAME)
+ 
+ lcalc: $(OBJECTS)
+-	$(CC) $(CCFLAGS) $(INCLUDEFILES) $(OBJECTS) $(LDFLAGS) -o lcalc $(GMP_FLAGS)
++	$(CXX) $(CCFLAGS) $(INCLUDEFILES) $(OBJECTS) $(LDFLAGS) -o lcalc $(GMP_FLAGS)
+ 
+ examples:
+-	$(CC) $(CCFLAGS) $(INCLUDEFILES) example_programs/example.cc libLfunction.so -o example_programs/example $(GMP_FLAGS)
++	$(CXX) $(CCFLAGS) $(INCLUDEFILES) example_programs/example.cc libLfunction.so -o example_programs/example $(GMP_FLAGS)
+ 
+ 
+ proc:
+-	$(CC) $(CCFLAGS) $(INCLUDEFILES) example_programs/proc.cc libLfunction.so -o example_programs/proc $(GMP_FLAGS)
++	$(CXX) $(CCFLAGS) $(INCLUDEFILES) example_programs/proc.cc libLfunction.so -o example_programs/proc $(GMP_FLAGS)
+ 
+ test:
+-	$(CC) $(CCFLAGS) $(INCLUDEFILES) example_programs/test.cc libLfunction.so -o example_programs/test $(GMP_FLAGS)
++	$(CXX) $(CCFLAGS) $(INCLUDEFILES) example_programs/test.cc libLfunction.so -o example_programs/test $(GMP_FLAGS)
+ 
+ find_L:
+-	$(CC) $(CCFLAGS) $(INCLUDEFILES) find_L_functions/find_L_functions.cc libLfunction.so -o find_L_functions/find_L $(GMP_FLAGS)
++	$(CXX) $(CCFLAGS) $(INCLUDEFILES) find_L_functions/find_L_functions.cc libLfunction.so -o find_L_functions/find_L $(GMP_FLAGS)
++
+ 
+ .cc.o:
+-	$(CC) $(CCFLAGS) $(INCLUDEFILES) -c $<
++	$(CXX) $(CCFLAGS) $(INCLUDEFILES) -c $<
++
++# Warning: We add $CXXFLAGS to CCFLAGS above.
+ .c.o:
+ 	$(CC) $(CCFLAGS) $(INCLUDEFILES) -c $<
+ 
+@@ -227,7 +222,7 @@
+ Lcommandline_elliptic.o: ../include/Lvalue.h ../include/Lfind_zeros.h
+ Lcommandline_elliptic.o: ../include/Lcommandline_numbertheory.h
+ Lcommandline_elliptic.o: ../include/Lcommandline_globals.h
+-	$(CC) $(CCFLAGS) $(INCLUDEFILES) -I$(LOCATION_PARI_H) $(PARI_DEFINE) -c Lcommandline_elliptic.cc
++	$(CXX) $(CCFLAGS) $(INCLUDEFILES) -I$(LOCATION_PARI_H) $(PARI_DEFINE) -c Lcommandline_elliptic.cc
+ 
+ Lcommandline_twist.o: ../include/Lcommandline_twist.h ../include/L.h
+ Lcommandline_twist.o: ../include/Lglobals.h ../include/Lcommon.h ../include/Lcomplex.h ../include/Lnumeric.h ../include/Lint_complex.h
+@@ -239,7 +234,7 @@
+ Lcommandline_twist.o: ../include/Lcommandline_numbertheory.h
+ Lcommandline_twist.o: ../include/Lcommandline_globals.h
+ Lcommandline_twist.o: ../include/Lcommandline_elliptic.h
+-	$(CC) $(CCFLAGS) $(INCLUDEFILES) -I$(LOCATION_PARI_H) $(PARI_DEFINE) -c Lcommandline_twist.cc
++	$(CXX) $(CCFLAGS) $(INCLUDEFILES) -I$(LOCATION_PARI_H) $(PARI_DEFINE) -c Lcommandline_twist.cc
+ 
+ cmdline.o: ../include/cmdline.h ../include/getopt.h
+ #$(CC) $(CCFLAGS) $(INCLUDEFILES) -DHAVE_LONG_LONG -c cmdline.c
+@@ -258,11 +253,11 @@
+ Lcommandline.o: ../include/Lcommandline_elliptic.h
+ Lcommandline.o: ../include/Lcommandline_twist.h
+ Lcommandline.o: ../include/Lcommandline_values_zeros.h
+-	$(CC) $(CCFLAGS) $(INCLUDEFILES) -I$(LOCATION_PARI_H) $(PARI_DEFINE) -c Lcommandline.cc
++	$(CXX) $(CCFLAGS) $(INCLUDEFILES) -I$(LOCATION_PARI_H) $(PARI_DEFINE) -c Lcommandline.cc
+ 
+ 
+ libLfunction.so: $(OBJ_L)
+-	g++ -$(DYN_OPTION)  -o libLfunction.so $(OBJ_L)
++	$(CXX) -$(DYN_OPTION) -o libLfunction.so $(OBJ_L)
+ 
+ clean:
+ 	rm -f *.o lcalc libLfunction.so example_programs/example
diff --git a/debian/patches/series b/debian/patches/series
index 47f7164..86ff1a1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 lcalc-const-fixes.patch
 gcc.patch
 pari_2.5.patch
+Makefile.patch
diff --git a/debian/rules b/debian/rules
index 80cae2c..b36c196 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,8 +4,7 @@
 	dh $@ --sourcedirectory=src --parallel
 
 override_dh_auto_build:
-	dh_auto_build -- LOCATION_PARI_H=/usr/include/pari \
-                LOCATION_PARI_LIBRARY=/usr/lib PARI_DEFINE=-DINCLUDE_PARI \
+	dh_auto_build -- PARI_DEFINE=-DINCLUDE_PARI \
                 GMP_FLAGS="-lpari -lmpfr -lgmpxx -lgmp -lgmpxx"
 
 override_dh_auto_test:

-- 
lcalc: program for computing zeros and values of L-functions



More information about the debian-science-commits mailing list