summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Orlitzky <mjo@gentoo.org>2021-10-23 08:06:39 -0400
committerMichael Orlitzky <mjo@gentoo.org>2021-10-23 08:07:10 -0400
commit4bede998cb6d8b4654b50a706816796f08ee87e3 (patch)
treeade0cd0bc3788cb2994d42aa85f92c7c0c522425 /sci-libs/lrslib/files/lrslib-071b-makefile-cflags.patch
parentdev-python/virtualenv: Backport pypy3.8 fixes (diff)
downloadgentoo-4bede998cb6d8b4654b50a706816796f08ee87e3.tar.gz
gentoo-4bede998cb6d8b4654b50a706816796f08ee87e3.tar.bz2
gentoo-4bede998cb6d8b4654b50a706816796f08ee87e3.zip
sci-libs/lrslib: new revision with CFLAGS/LDFLAGS patches.
The LDFLAGS patch here is new, and fixes bug 728044. The CFLAGS patch merely replaces an inline "sed", but will allow me to send this change upstream (where they've made an effort to use CFLAGS before). Closes: https://bugs.gentoo.org/728044 Package-Manager: Portage-3.0.20, Repoman-3.0.3 Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
Diffstat (limited to 'sci-libs/lrslib/files/lrslib-071b-makefile-cflags.patch')
-rw-r--r--sci-libs/lrslib/files/lrslib-071b-makefile-cflags.patch100
1 files changed, 100 insertions, 0 deletions
diff --git a/sci-libs/lrslib/files/lrslib-071b-makefile-cflags.patch b/sci-libs/lrslib/files/lrslib-071b-makefile-cflags.patch
new file mode 100644
index 000000000000..1cc8303f616a
--- /dev/null
+++ b/sci-libs/lrslib/files/lrslib-071b-makefile-cflags.patch
@@ -0,0 +1,100 @@
+From 8a99af08a479c413d54c1a8def7479c778e55703 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 23 Oct 2021 07:53:22 -0400
+Subject: [PATCH 2/2] makefile: replace remaining "-O3" with $(CFLAGS).
+
+Some time in the past, $CFLAGS was inserted into most of the build
+rules, and defaulted to "-O3 -Wall" if the user does not override
+that. However a few lingering "-O3" and "-O3 -Wall" remain hard-
+coded in the makefile. Here we fix that.
+---
+ makefile | 48 ++++++++++++++++++++++++------------------------
+ 1 file changed, 24 insertions(+), 24 deletions(-)
+
+diff --git a/makefile b/makefile
+index fd8a613..c14b93e 100644
+--- a/makefile
++++ b/makefile
+@@ -64,12 +64,12 @@ MPLRSOBJ64=lrslong1-mplrs.o lrslib1-mplrs.o lrslibgmp-mplrs.o lrsgmp-mplrs.o lrs
+
+ lrs: ${LRSOBJ}
+ $(CC) ${CFLAGS} -DMA ${BITS} -L${LIBDIR} $(LDFLAGS) -o lrs ${LRSOBJ} -lgmp
+- $(CC) -O3 hvref.c $(LDFLAGS) -o hvref
++ $(CC) $(CFLAGS) hvref.c $(LDFLAGS) -o hvref
+ ln -s -f lrs redund
+
+ lrsmp: ${LRSOBJMP}
+ $(CC) ${CFLAGS} -DMA ${BITS} $(LDFLAGS) -o lrsmp ${LRSOBJMP}
+- $(CC) -O3 hvref.c $(LDFLAGS) -o hvref
++ $(CC) $(CFLAGS) hvref.c $(LDFLAGS) -o hvref
+ ln -s -f lrs redund
+
+ lrs64: ${LRSOBJ64}
+@@ -157,8 +157,8 @@ singlemplrs: mplrsgmp mplrs1 mplrs2
+
+ flint: lrs.c lrslib.c lrslib.h lrsgmp.c lrsgmp.h
+ @test -d ${INCLUDEDIR}/flint || { echo ${INCLUDEDIR}/flint not found; exit 1; }
+- $(CC) -O3 -DFLINT -I/usr/local/include/flint lrs.c lrslib.c lrsgmp.c lrsdriver.c -L/usr/local/lib -Wl,-rpath=/usr/local/lib -lflint $(LDFLAGS) -o lrsflint -lgmp
+-# $(CC) -O3 -DFLINT -I${INCLUDEDIR} -I${INCLUDEDIR}/flint lrs.c lrsdriver.c lrslib.c lrsgmp.c -L${LIBDIR} -lflint -o lrsflint -lgmp
++ $(CC) $(CFLAGS) -DFLINT -I/usr/local/include/flint lrs.c lrslib.c lrsgmp.c lrsdriver.c -L/usr/local/lib -Wl,-rpath=/usr/local/lib -lflint $(LDFLAGS) -o lrsflint -lgmp
++# $(CC) $(CFLAGS) -DFLINT -I${INCLUDEDIR} -I${INCLUDEDIR}/flint lrs.c lrsdriver.c lrslib.c lrsgmp.c -L${LIBDIR} -lflint -o lrsflint -lgmp
+
+ mplrsflint: mplrs.c mplrs.h lrslib.c lrslib.h lrsgmp.c lrsgmp.h lrsdriver.c lrsdriver.h
+ ${mpicxx} ${CFLAGS} -DTIMES -DSIGNALS -D_WITH_GETLINE -DFLINT -I${INCLUDEDIR}/flint -DPLRS $(LDFLAGS) -o mplrsflint mplrs.c lrsdriver.c lrslib.c lrsgmp.c -L${LIBDIR} -lflint -lgmp
+@@ -176,33 +176,33 @@ single: lrs.c lrslong.c lrslong.h lrslib.c lrslib.h lrsgmp.c lrsgmp.h lrsdriver
+ ln -s -f lrs2 redund2
+
+ allmp: lrs.c lrslib.c lrslib.h lrsmp.c lrsmp.h lrsdriver.h lrsdriver.c
+- $(CC) -Wall -O3 $(LDFLAGS) -o lrs lrs.c lrslib.c lrsdriver.c lrsmp.c
+- $(CC) -Wall -O3 -DSAFE -DLRSLONG $(LDFLAGS) -o lrs1 lrs.c lrslib.c lrsdriver.c lrslong.c
+- $(CC) -Wall -O3 -DSAFE -DLRSLONG ${BITS} $(LDFLAGS) -o lrs2 lrs.c lrslib.c lrsdriver.c lrslong.c
+- $(CC) -O3 -DLRS_QUIET $(LDFLAGS) -o lrsnash lrsnash.c lrsnashlib.c lrslib.c lrsdriver.c lrsmp.c -static
+- $(CC) -O3 $(LDFLAGS) -o setnash setupnash.c lrslib.c lrsdriver.c lrsmp.c
+- $(CC) -O3 $(LDFLAGS) -o setnash2 setupnash2.c lrslib.c lrsdriver.c lrsmp.c
+- $(CC) -O3 $(LDFLAGS) -o 2nash 2nash.c
++ $(CC) -Wall $(CFLAGS) $(LDFLAGS) -o lrs lrs.c lrslib.c lrsdriver.c lrsmp.c
++ $(CC) -Wall $(CFLAGS) -DSAFE -DLRSLONG $(LDFLAGS) -o lrs1 lrs.c lrslib.c lrsdriver.c lrslong.c
++ $(CC) -Wall $(CFLAGS) -DSAFE -DLRSLONG ${BITS} $(LDFLAGS) -o lrs2 lrs.c lrslib.c lrsdriver.c lrslong.c
++ $(CC) $(CFLAGS) -DLRS_QUIET $(LDFLAGS) -o lrsnash lrsnash.c lrsnashlib.c lrslib.c lrsdriver.c lrsmp.c -static
++ $(CC) $(CFLAGS) $(LDFLAGS) -o setnash setupnash.c lrslib.c lrsdriver.c lrsmp.c
++ $(CC) $(CFLAGS) $(LDFLAGS) -o setnash2 setupnash2.c lrslib.c lrsdriver.c lrsmp.c
++ $(CC) $(CFLAGS) $(LDFLAGS) -o 2nash 2nash.c
+
+ demo: lpdemo1.c lrslib.c lrsdriver.c lrslib.h lrsgmp.c lrsgmp.h
+- $(CC) -O3 -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o lpdemo1 lpdemo1.c lrslib.c lrsdriver.c lrsgmp.c -lgmp -DGMP
+- $(CC) -O3 -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o lpdemo lpdemo.c lrslib.c lrsdriver.c lrsgmp.c -lgmp -DGMP
+- $(CC) -O3 -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o lpdemo2 lpdemo2.c lrslib.c lrsdriver.c lrsgmp.c -lgmp -DGMP
+- $(CC) -O3 -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o vedemo vedemo.c lrslib.c lrsdriver.c lrsgmp.c -lgmp -DGMP
+- $(CC) -O3 -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o chdemo chdemo.c lrslib.c lrsdriver.c lrsgmp.c -lgmp -DGMP
++ $(CC) $(CFLAGS) -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o lpdemo1 lpdemo1.c lrslib.c lrsdriver.c lrsgmp.c -lgmp -DGMP
++ $(CC) $(CFLAGS) -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o lpdemo lpdemo.c lrslib.c lrsdriver.c lrsgmp.c -lgmp -DGMP
++ $(CC) $(CFLAGS) -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o lpdemo2 lpdemo2.c lrslib.c lrsdriver.c lrsgmp.c -lgmp -DGMP
++ $(CC) $(CFLAGS) -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o vedemo vedemo.c lrslib.c lrsdriver.c lrsgmp.c -lgmp -DGMP
++ $(CC) $(CFLAGS) -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o chdemo chdemo.c lrslib.c lrsdriver.c lrsgmp.c -lgmp -DGMP
+
+ lrsnash: lrsnash.c nashdemo.c lrsnashlib.c lrslib.c lrsnashlib.h lrslib.h lrsgmp.c lrsgmp.h lrslong.h lrsdriver.h lrsdriver.c
+- $(CC) -O3 -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o lrsnashgmp lrsnash.c lrsnashlib.c lrslib.c lrsgmp.c lrsdriver.c -lgmp -DGMP
+- $(CC) -O3 -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o lrsnash1 lrsnash.c lrsnashlib.c lrslib.c lrslong.c lrsdriver.c -DLRSLONG -DSAFE
+- $(CC) -O3 -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o lrsnash2 lrsnash.c lrsnashlib.c lrslib.c lrslong.c lrsdriver.c -DLRSLONG -DSAFE ${BITS}
+- $(CC) -O3 -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o nashdemo nashdemo.c lrsnashlib.c lrslib.c lrsgmp.c lrsdriver.c -lgmp -DGMP
+- $(CC) -O3 -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o 2nash 2nash.c
++ $(CC) $(CFLAGS) -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o lrsnashgmp lrsnash.c lrsnashlib.c lrslib.c lrsgmp.c lrsdriver.c -lgmp -DGMP
++ $(CC) $(CFLAGS) -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o lrsnash1 lrsnash.c lrsnashlib.c lrslib.c lrslong.c lrsdriver.c -DLRSLONG -DSAFE
++ $(CC) $(CFLAGS) -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o lrsnash2 lrsnash.c lrsnashlib.c lrslib.c lrslong.c lrsdriver.c -DLRSLONG -DSAFE ${BITS}
++ $(CC) $(CFLAGS) -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o nashdemo nashdemo.c lrsnashlib.c lrslib.c lrsgmp.c lrsdriver.c -lgmp -DGMP
++ $(CC) $(CFLAGS) -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o 2nash 2nash.c
+ cp lrsnashgmp lrsnash
+
+ fel: fel.c lrslib.h lrslib.c lrsgmp.h lrsgmp.c lrslong.c
+- $(CC) -O3 -Wall -DGMP -I${INCLUDEDIR} fel.c lrslib.c lrsdriver.c lrsgmp.c -L${LIBDIR} -lgmp $(LDFLAGS) -o felgmp
+- $(CC) -O3 -Wall -I${INCLUDEDIR} fel.c lrslib.c lrsdriver.c lrslong.c -L${LIBDIR} -DLRSLONG -DSAFE $(LDFLAGS) -o fel1
+- $(CC) -O3 -Wall -I${INCLUDEDIR} fel.c lrslib.c lrsdriver.c lrslong.c -L${LIBDIR} -DLRSLONG -DSAFE ${BITS} $(LDFLAGS) -o fel2
++ $(CC) $(CFLAGS) -DGMP -I${INCLUDEDIR} fel.c lrslib.c lrsdriver.c lrsgmp.c -L${LIBDIR} -lgmp $(LDFLAGS) -o felgmp
++ $(CC) $(CFLAGS) -I${INCLUDEDIR} fel.c lrslib.c lrsdriver.c lrslong.c -L${LIBDIR} -DLRSLONG -DSAFE $(LDFLAGS) -o fel1
++ $(CC) $(CFLAGS) -I${INCLUDEDIR} fel.c lrslib.c lrsdriver.c lrslong.c -L${LIBDIR} -DLRSLONG -DSAFE ${BITS} $(LDFLAGS) -o fel2
+
+ ######################################################################
+ # From here on the author is David Bremner <bremner@unb.ca> to whom you should turn for help
+--
+2.32.0
+