mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
sci-libs/lrslib: add 073
Reroll the CFLAGS/LDFLAGS patch, and add a duct-tape test suite. Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
This commit is contained in:
@@ -1 +1,2 @@
|
||||
DIST lrslib-071b.tar.gz 466789 BLAKE2B 57a8abd9d203b1cdc62d6848afa77aa6912d9d720a0dedfbe72ca602ad8ba36d13160f7da7d719e3fa140ba2cb6432d20590ae9ea9b1f66bc2e24c393d9fe1bd SHA512 feafc5726e66c977e917f0b59ae950cdb98dbd84639885b487930aab2a89a7f067a3f39c381acc3eae7206b91255e1befa5551488d8816afc0f8054d801eb539
|
||||
DIST lrslib-073.tar.gz 4566562 BLAKE2B b3906b29d8b35452319af1d81184f3e49f9c74cdc8fadfdb7e0bd13797acecc0f21d0b375fbe7c00ff585bb51c0571003c131af8d732929ebb1d4ca3dc0d23ea SHA512 8966ed12f7dd9f178949bf51c64e75e4850bda5b77be1c6e525f77baef1bc0f5fbee69b09f6a4ee858532831a4c4ae4461eb598e635fae7aaa8d02bf145140b9
|
||||
|
||||
169
sci-libs/lrslib/files/lrslib-073-cflags-ldflags.patch
Normal file
169
sci-libs/lrslib/files/lrslib-073-cflags-ldflags.patch
Normal file
@@ -0,0 +1,169 @@
|
||||
diff --git a/makefile b/makefile
|
||||
index 8142044..1c26969 100755
|
||||
--- a/makefile
|
||||
+++ b/makefile
|
||||
@@ -35,7 +35,7 @@ LRSOBJ2=lrslib2.o lrslong2.o
|
||||
|
||||
#legacy lrs and mplrs
|
||||
#CFLAGS = -g -Wall -I ${ARITH}
|
||||
-CFLAGS = -O3 -Wall -I ${ARITH}
|
||||
+CFLAGS += -I ${ARITH}
|
||||
|
||||
#use this if you want only output file contain data between begin/end lines
|
||||
#CFLAGS = -O3 -Wall -I ${ARITH} -DLRS_QUIET
|
||||
@@ -89,14 +89,14 @@ MPLRSOBJ=lrslong1-mplrs.o lrslib1-mplrs.o lrslibgmp-mplrs.o lrsgmp-mplrs.o lrsdr
|
||||
MPLRSOBJ64=lrslong1-mplrs.o lrslib1-mplrs.o lrslibgmp-mplrs.o lrsgmp-mplrs.o lrsdriver-mplrs.o mplrs64.o
|
||||
|
||||
lrs: ${LRSOBJ} ${LRSOBJ2}
|
||||
- $(CC) ${CFLAGS} ${PLRSFLAGS} -DMA ${BITS} -L${LIBDIR} -o lrs ${LRSOBJ} ${LRSOBJ2} ${MINI} ${GMP}
|
||||
+ $(CC) ${CFLAGS} ${PLRSFLAGS} -DMA ${BITS} -L${LIBDIR} $(LDFLAGS) -o lrs ${LRSOBJ} ${LRSOBJ2} ${MINI} ${GMP}
|
||||
ln -s -f lrs redund
|
||||
ln -s -f lrs minrep
|
||||
ln -s -f lrs fel
|
||||
|
||||
lrsMP: ${LRSOBJMP}
|
||||
- $(CC) ${CFLAGS} ${PLRSFLAGS} -DMA ${BITS} -o lrsMP ${LRSOBJMP}
|
||||
- $(CC) -O3 hvref.c -o hvref
|
||||
+ $(CC) ${CFLAGS} ${PLRSFLAGS} -DMA ${BITS} $(LDFLAGS) -o lrsMP ${LRSOBJMP}
|
||||
+ $(CC) $(CFLAGS) hvref.c $(LDFLAGS) -o hvref
|
||||
ln -s -f lrs redund
|
||||
|
||||
lrs.o: lrs.c
|
||||
@@ -126,10 +126,10 @@ lrsmp.o: ${ARITH}lrsmp.c ${ARITH}lrsmp.h
|
||||
$(CC) ${CFLAGS} -DMA -DMP -c -o lrsmp.o ${ARITH}lrsmp.c
|
||||
|
||||
inedel: inedel.c ${ARITH}lrsgmp.h ${ARITH}lrsgmp.c
|
||||
- $(CC) ${CFLAGS} -I${INCLUDEDIR} -L${LIBDIR} -DGMP -o inedel inedel.c ${ARITH}lrsgmp.c -lgmp
|
||||
+ $(CC) ${CFLAGS} -I${INCLUDEDIR} -L${LIBDIR} -DGMP $(LDFLAGS) -o inedel inedel.c ${ARITH}lrsgmp.c -lgmp
|
||||
|
||||
polyv: polyv.c ${ARITH}lrsgmp.h ${ARITH}lrsgmp.c
|
||||
- $(CC) $(CFLAGS) -I${INCLUDEDIR} -L${LIBDIR} -DGMP -o polyv polyv.c ${ARITH}lrsgmp.c -lgmp
|
||||
+ $(CC) $(CFLAGS) -I${INCLUDEDIR} -L${LIBDIR} -DGMP $(LDFLAGS) -o polyv polyv.c ${ARITH}lrsgmp.c -lgmp
|
||||
|
||||
lrslong1-mplrs.o: ${ARITH}lrslong.c ${ARITH}lrslong.h
|
||||
$(mpicxx) ${CFLAGS} -DTIMES -DSIGNALS -DMA -DSAFE -DLRSLONG -DMPLRS -c -o lrslong1-mplrs.o ${ARITH}lrslong.c
|
||||
@@ -159,67 +159,67 @@ mplrs64.o: mplrs.c mplrs.h lrslib.h ${ARITH}lrsgmp.h
|
||||
$(mpicxx) ${CFLAGS} -I${INCLUDEDIR} ${GMP} -DMA -DMPLRS -DTIMES -DSIGNALS -D_WITH_GETLINE -c -o mplrs64.o mplrs.c
|
||||
|
||||
mplrs: ${MPLRSOBJ} ${MPLRSOBJ2}
|
||||
- $(mpicxx) ${CFLAGS} -DTIMES -DSIGNALS -D_WITH_GETLINE -DMPLRS -DMA ${BITS} -L${LIBDIR} -o mplrs ${MPLRSOBJ} ${MPLRSOBJ2} ${MINI} ${GMP}
|
||||
+ $(mpicxx) ${CFLAGS} -DTIMES -DSIGNALS -D_WITH_GETLINE -DMPLRS -DMA ${BITS} -L${LIBDIR} $(LDFLAGS) -o mplrs ${MPLRSOBJ} ${MPLRSOBJ2} ${MINI} ${GMP}
|
||||
|
||||
mplrs64: ${MPLRSOBJ64} mplrsgmp
|
||||
- $(mpicxx) ${CFLAGS} -DTIMES -DSIGNALS -D_WITH_GETLINE -DMPLRS -DMA -L${LIBDIR} -o mplrs ${MPLRSOBJ64} -lgmp
|
||||
+ $(mpicxx) ${CFLAGS} -DTIMES -DSIGNALS -D_WITH_GETLINE -DMPLRS -DMA -L${LIBDIR} $(LDFLAGS) -o mplrs ${MPLRSOBJ64} -lgmp
|
||||
|
||||
mplrsgmp: mplrs.c mplrs.h lrslib.c lrslib.h ${ARITH}lrsgmp.c ${ARITH}lrsgmp.h lrsdriver.h lrsdriver.c
|
||||
- $(mpicxx) ${CFLAGS} -DTIMES -DSIGNALS -D_WITH_GETLINE -DMPLRS -DGMP -I${INCLUDEDIR} mplrs.c lrslib.c ${ARITH}lrsgmp.c lrsdriver.c -L${LIBDIR} -o mplrsgmp -lgmp
|
||||
+ $(mpicxx) ${CFLAGS} -DTIMES -DSIGNALS -D_WITH_GETLINE -DMPLRS -DGMP -I${INCLUDEDIR} mplrs.c lrslib.c ${ARITH}lrsgmp.c lrsdriver.c -L${LIBDIR} $(LDFLAGS) -o mplrsgmp -lgmp
|
||||
|
||||
mplrs1: mplrs.c mplrs.h lrslib.c lrslib.h ${ARITH}lrslong.c ${ARITH}lrslong.h lrsdriver.h lrsdriver.c
|
||||
- $(mpicxx) ${CFLAGS} -DTIMES -DSIGNALS -D_WITH_GETLINE -DMPLRS -DSAFE -DLRSLONG mplrs.c lrslib.c ${ARITH}lrslong.c lrsdriver.c -o mplrs1
|
||||
+ $(mpicxx) ${CFLAGS} -DTIMES -DSIGNALS -D_WITH_GETLINE -DMPLRS -DSAFE -DLRSLONG mplrs.c lrslib.c ${ARITH}lrslong.c lrsdriver.c $(LDFLAGS) -o mplrs1
|
||||
|
||||
mplrs2: mplrs.c mplrs.h lrslib.c lrslib.h ${ARITH}lrslong.c ${ARITH}lrslong.h lrsdriver.h lrsdriver.c
|
||||
- $(mpicxx) ${CFLAGS} -DTIMES -DSIGNALS -D_WITH_GETLINE -DMPLRS -DSAFE -DLRSLONG ${BITS} mplrs.c lrslib.c ${ARITH}lrslong.c lrsdriver.c -o mplrs2
|
||||
+ $(mpicxx) ${CFLAGS} -DTIMES -DSIGNALS -D_WITH_GETLINE -DMPLRS -DSAFE -DLRSLONG ${BITS} mplrs.c lrslib.c ${ARITH}lrslong.c lrsdriver.c $(LDFLAGS) -o mplrs2
|
||||
|
||||
mplrsmp: mplrs.c mplrs.h lrslib.c lrslib.h ${ARITH}lrsmp.c ${ARITH}lrsmp.h lrsdriver.h lrsdriver.c
|
||||
- $(mpicxx) ${CFLAGS} -DMP -DTIMES -DSIGNALS -D_WITH_GETLINE -DMPLRS mplrs.c lrslib.c ${ARITH}lrsmp.c lrsdriver.c -o mplrsmp
|
||||
+ $(mpicxx) ${CFLAGS} -DMP -DTIMES -DSIGNALS -D_WITH_GETLINE -DMPLRS mplrs.c lrslib.c ${ARITH}lrsmp.c lrsdriver.c $(LDFLAGS) -o mplrsmp
|
||||
|
||||
singlemplrs: mplrs1 mplrs2
|
||||
|
||||
flint: lrs.c lrslib.c lrslib.h ${ARITH}lrsgmp.c ${ARITH}lrsgmp.h
|
||||
@test -d ${INCLUDEDIR}/flint || { echo ${INCLUDEDIR}/flint not found; exit 1; }
|
||||
- $(CC) -O3 -DFLINT ${PLRSFLAGS} -I/usr/local/include/flint lrs.c lrslib.c ${ARITH}lrsgmp.c lrsdriver.c -L/usr/local/lib -Wl,-rpath=/usr/local/lib -lflint -o lrsflint -lgmp
|
||||
+ $(CC) $(CFLAGS) -DFLINT ${PLRSFLAGS} -I/usr/local/include/flint lrs.c lrslib.c ${ARITH}lrsgmp.c lrsdriver.c -L/usr/local/lib -Wl,-rpath=/usr/local/lib -lflint $(LDFLAGS) -o lrsflint -lgmp
|
||||
|
||||
mplrsflint: mplrs.c mplrs.h lrslib.c lrslib.h ${ARITH}lrsgmp.c ${ARITH}lrsgmp.h lrsdriver.c lrsdriver.h
|
||||
- ${mpicxx} ${CFLAGS} -DTIMES -DSIGNALS -D_WITH_GETLINE -DFLINT -I${INCLUDEDIR}/flint -DMPLRS -o mplrsflint mplrs.c lrsdriver.c lrslib.c ${ARITH}lrsgmp.c -L${LIBDIR} -lflint -lgmp
|
||||
+ ${mpicxx} ${CFLAGS} -DTIMES -DSIGNALS -D_WITH_GETLINE -DFLINT -I${INCLUDEDIR}/flint -DMPLRS $(LDFLAGS) -o mplrsflint mplrs.c lrsdriver.c lrslib.c ${ARITH}lrsgmp.c -L${LIBDIR} -lflint -lgmp
|
||||
|
||||
lrsgmp: lrs.c lrslib.c lrslib.h ${ARITH}lrsgmp.c ${ARITH}lrsgmp.h lrsdriver.h lrsdriver.c
|
||||
- $(CC) ${CFLAGS} ${PLRSFLAGS} -I${INCLUDEDIR} -o lrsgmp lrs.c lrslib.c ${ARITH}lrsgmp.c lrsdriver.c -L${LIBDIR} ${MINI} ${GMP}
|
||||
+ $(CC) ${CFLAGS} ${PLRSFLAGS} -I${INCLUDEDIR} $(LDFLAGS) -o lrsgmp lrs.c lrslib.c ${ARITH}lrsgmp.c lrsdriver.c -L${LIBDIR} ${MINI} ${GMP}
|
||||
|
||||
single: lrs.c ${ARITH}lrslong.c ${ARITH}lrslong.h lrslib.c lrslib.h ${ARITH}lrsgmp.c ${ARITH}lrsgmp.h lrsdriver.h lrsdriver.c
|
||||
- $(CC) ${CFLAGS} ${PLRSFLAGS} -DSAFE -DLRSLONG -o lrs1 lrs.c lrslib.c ${ARITH}lrslong.c lrsdriver.c
|
||||
- $(CC) ${CFLAGS} ${PLRSFLAGS} ${BITS} -DSAFE -DLRSLONG -o lrs2 lrs.c lrslib.c ${ARITH}lrslong.c lrsdriver.c
|
||||
- $(CC) ${CFLAGS} ${PLRSFLAGS} -DMP -o lrsmp lrs.c lrslib.c lrsdriver.c ${ARITH}lrsmp.c
|
||||
- $(CC) ${CFLAGS} ${PLRSFLAGS} -DGMP -I${INCLUDEDIR} -o lrsgmp lrs.c lrslib.c ${ARITH}lrsgmp.c lrsdriver.c -L${LIBDIR} -lgmp
|
||||
- $(CC) ${CFLAGS} ${PLRSFLAGS} -DMGMP -DGMP -I${INCLUDEDIR} -o lrsmgmp lrs.c lrslib.c ${ARITH}lrsgmp.c lrsdriver.c ${ARITH}mini-gmp.c
|
||||
+ $(CC) ${CFLAGS} ${PLRSFLAGS} -DSAFE -DLRSLONG $(LDFLAGS) -o lrs1 lrs.c lrslib.c ${ARITH}lrslong.c lrsdriver.c
|
||||
+ $(CC) ${CFLAGS} ${PLRSFLAGS} ${BITS} -DSAFE -DLRSLONG $(LDFLAGS) -o lrs2 lrs.c lrslib.c ${ARITH}lrslong.c lrsdriver.c
|
||||
+ $(CC) ${CFLAGS} ${PLRSFLAGS} -DMP $(LDFLAGS) -o lrsmp lrs.c lrslib.c lrsdriver.c ${ARITH}lrsmp.c
|
||||
+ $(CC) ${CFLAGS} ${PLRSFLAGS} -DGMP -I${INCLUDEDIR} $(LDFLAGS) -o lrsgmp lrs.c lrslib.c ${ARITH}lrsgmp.c lrsdriver.c -L${LIBDIR} -lgmp
|
||||
+ $(CC) ${CFLAGS} ${PLRSFLAGS} -DMGMP -DGMP -I${INCLUDEDIR} $(LDFLAGS) -o lrsmgmp lrs.c lrslib.c ${ARITH}lrsgmp.c lrsdriver.c ${ARITH}mini-gmp.c
|
||||
|
||||
allmp: lrs.c lrslib.c lrslib.h ${ARITH}lrsmp.c ${ARITH}lrsmp.h lrsdriver.h lrsdriver.c
|
||||
- $(CC) ${CFLAGS} ${PLRSFLAGS} -DMP -o lrsmp lrs.c lrslib.c lrsdriver.c ${ARITH}lrsmp.c
|
||||
- $(CC) ${CFLAGS} ${PLRSFLAGS} -DSAFE -DLRSLONG -o lrs1 lrs.c lrslib.c lrsdriver.c ${ARITH}lrslong.c
|
||||
- $(CC) ${CFLAGS} ${PLRSFLAGS} -DSAFE -DLRSLONG ${BITS} -o lrs2 lrs.c lrslib.c lrsdriver.c ${ARITH}lrslong.c
|
||||
- $(CC) ${CFLAGS} -DMP -DLRS_QUIET -o lrsnash lrsnash.c lrsnashlib.c lrslib.c lrsdriver.c ${ARITH}lrsmp.c
|
||||
- $(CC) ${CFLAGS} -DMP -o setupnash setupnash.c lrslib.c lrsdriver.c ${ARITH}lrsmp.c
|
||||
- $(CC) ${CFLAGS} -DMP -o setupnash2 setupnash2.c lrslib.c lrsdriver.c ${ARITH}lrsmp.c
|
||||
- $(CC) ${CFLAGS} -o 2nash 2nash.c
|
||||
+ $(CC) ${CFLAGS} ${PLRSFLAGS} -DMP $(LDFLAGS) -o lrsmp lrs.c lrslib.c lrsdriver.c ${ARITH}lrsmp.c
|
||||
+ $(CC) ${CFLAGS} ${PLRSFLAGS} -DSAFE -DLRSLONG $(LDFLAGS) -o lrs1 lrs.c lrslib.c lrsdriver.c ${ARITH}lrslong.c
|
||||
+ $(CC) ${CFLAGS} ${PLRSFLAGS} -DSAFE -DLRSLONG ${BITS} $(LDFLAGS) -o lrs2 lrs.c lrslib.c lrsdriver.c ${ARITH}lrslong.c
|
||||
+ $(CC) ${CFLAGS} -DMP -DLRS_QUIET $(LDFLAGS) -o lrsnash lrsnash.c lrsnashlib.c lrslib.c lrsdriver.c ${ARITH}lrsmp.c
|
||||
+ $(CC) ${CFLAGS} -DMP $(LDFLAGS) -o setupnash setupnash.c lrslib.c lrsdriver.c ${ARITH}lrsmp.c
|
||||
+ $(CC) ${CFLAGS} -DMP $(LDFLAGS) -o setupnash2 setupnash2.c lrslib.c lrsdriver.c ${ARITH}lrsmp.c
|
||||
+ $(CC) ${CFLAGS} $(LDFLAGS) -o 2nash 2nash.c
|
||||
|
||||
demo: lpdemo1.c lrslib.c lrsdriver.c lrslib.h ${ARITH}lrsgmp.c ${ARITH}lrsgmp.h
|
||||
- $(CC) ${CFLAGS} -I${INCLUDEDIR} -L${LIBDIR} -o lpdemo1 lpdemo1.c lrslib.c lrsdriver.c ${ARITH}lrsgmp.c -lgmp -DGMP
|
||||
- $(CC) ${CFLAGS} -I${INCLUDEDIR} -L${LIBDIR} -o lpdemo lpdemo.c lrslib.c lrsdriver.c ${ARITH}lrsgmp.c -lgmp -DGMP
|
||||
- $(CC) ${CFLAGS} -I${INCLUDEDIR} -L${LIBDIR} -o lpdemo2 lpdemo2.c lrslib.c lrsdriver.c ${ARITH}lrsgmp.c -lgmp -DGMP
|
||||
- $(CC) ${CFLAGS} -I${INCLUDEDIR} -L${LIBDIR} -o vedemo vedemo.c lrslib.c lrsdriver.c ${ARITH}lrsgmp.c -lgmp -DGMP
|
||||
- $(CC) ${CFLAGS} -I${INCLUDEDIR} -L${LIBDIR} -o chdemo chdemo.c lrslib.c lrsdriver.c ${ARITH}lrsgmp.c -lgmp -DGMP
|
||||
+ $(CC) ${CFLAGS} -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o lpdemo1 lpdemo1.c lrslib.c lrsdriver.c ${ARITH}lrsgmp.c -lgmp -DGMP
|
||||
+ $(CC) ${CFLAGS} -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o lpdemo lpdemo.c lrslib.c lrsdriver.c ${ARITH}lrsgmp.c -lgmp -DGMP
|
||||
+ $(CC) ${CFLAGS} -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o lpdemo2 lpdemo2.c lrslib.c lrsdriver.c ${ARITH}lrsgmp.c -lgmp -DGMP
|
||||
+ $(CC) ${CFLAGS} -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o vedemo vedemo.c lrslib.c lrsdriver.c ${ARITH}lrsgmp.c -lgmp -DGMP
|
||||
+ $(CC) ${CFLAGS} -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o chdemo chdemo.c lrslib.c lrsdriver.c ${ARITH}lrsgmp.c -lgmp -DGMP
|
||||
|
||||
lrsnash: lrsnash.c nashdemo.c lrsnashlib.c lrslib.c lrsnashlib.h lrslib.h ${ARITH}lrsgmp.c ${ARITH}lrsgmp.h ${ARITH}lrslong.h lrsdriver.h lrsdriver.c
|
||||
- $(CC) ${CFLAGS} -I${INCLUDEDIR} -L${LIBDIR} -o lrsnashgmp lrsnash.c lrsnashlib.c lrslib.c ${ARITH}lrsgmp.c lrsdriver.c ${MINI} ${GMP}
|
||||
- $(CC) ${CFLAGS} -DNASH -I${INCLUDEDIR} -L${LIBDIR} -o lrsnash1 lrsnash.c lrsnashlib.c lrslib.c ${ARITH}lrslong.c lrsdriver.c -DLRSLONG -DSAFE
|
||||
-
|
||||
- $(CC) ${CFLAGS} -DNASH -I${INCLUDEDIR} -L${LIBDIR} -o lrsnash2 lrsnash.c lrsnashlib.c lrslib.c ${ARITH}lrslong.c lrsdriver.c -DLRSLONG -DSAFE ${BITS}
|
||||
- $(CC) ${CFLAGS} -I${INCLUDEDIR} -L${LIBDIR} -o nashdemo nashdemo.c lrsnashlib.c lrslib.c ${ARITH}lrsgmp.c lrsdriver.c ${MINI} ${GMP}
|
||||
- $(CC) ${CFLAGS} -DMP -o setupnash setupnash.c lrslib.c lrsdriver.c ${ARITH}lrsmp.c
|
||||
- $(CC) ${CFLAGS} -DMP -o setupnash2 setupnash2.c lrslib.c lrsdriver.c ${ARITH}lrsmp.c
|
||||
- $(CC) ${CFLAGS} -I${INCLUDEDIR} -L${LIBDIR} -o 2nash 2nash.c
|
||||
+ $(CC) ${CFLAGS} -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o lrsnashgmp lrsnash.c lrsnashlib.c lrslib.c ${ARITH}lrsgmp.c lrsdriver.c ${MINI} ${GMP}
|
||||
+ $(CC) ${CFLAGS} -DNASH -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o lrsnash1 lrsnash.c lrsnashlib.c lrslib.c ${ARITH}lrslong.c lrsdriver.c -DLRSLONG -DSAFE
|
||||
+
|
||||
+ $(CC) ${CFLAGS} -DNASH -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o lrsnash2 lrsnash.c lrsnashlib.c lrslib.c ${ARITH}lrslong.c lrsdriver.c -DLRSLONG -DSAFE ${BITS}
|
||||
+ $(CC) ${CFLAGS} -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o nashdemo nashdemo.c lrsnashlib.c lrslib.c ${ARITH}lrsgmp.c lrsdriver.c ${MINI} ${GMP}
|
||||
+ $(CC) ${CFLAGS} -DMP $(LDFLAGS) -o setupnash setupnash.c lrslib.c lrsdriver.c ${ARITH}lrsmp.c
|
||||
+ $(CC) ${CFLAGS} -DMP $(LDFLAGS) -o setupnash2 setupnash2.c lrslib.c lrsdriver.c ${ARITH}lrsmp.c
|
||||
+ $(CC) ${CFLAGS} -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o 2nash 2nash.c
|
||||
cp lrsnashgmp lrsnash
|
||||
|
||||
######################################################################
|
||||
@@ -246,7 +246,7 @@ SHLIBBIN=lrs-shared lrsnash-shared
|
||||
# Building (linking) the shared library, and relevant symlinks.
|
||||
|
||||
${SHLIB}: ${SHLIBOBJ}
|
||||
- $(CC) -shared -Wl,-soname=$(SONAME) $(SHLIBFLAGS) -o $@ ${SHLIBOBJ} -lgmp
|
||||
+ $(CC) -shared -Wl,-soname=$(SONAME) $(SHLIBFLAGS) $(LDFLAGS) -o $@ ${SHLIBOBJ} -lgmp
|
||||
|
||||
${SONAME}: ${SHLIB}
|
||||
ln -sf ${SHLIB} ${SONAME}
|
||||
@@ -259,11 +259,11 @@ ${SHLINK}: ${SONAME}
|
||||
all-shared: ${SHLIBBIN}
|
||||
|
||||
lrs-shared: ${SHLINK} lrs-shared.o
|
||||
- $(CC) $^ -o $@ -L . -llrs
|
||||
+ $(CC) $^ $(LDFLAGS) -o $@ -L . -llrs
|
||||
|
||||
|
||||
lrsnash-shared: ${SHLINK} lrsnash.c
|
||||
- $(CC) ${CFLAGS} -DGMP -DMA lrsnash.c lrsnashlib.c -I${INCLUDEDIR} -o $@ -L . -llrs -lgmp
|
||||
+ $(CC) ${CFLAGS} -DGMP -DMA lrsnash.c lrsnashlib.c -I${INCLUDEDIR} $(LDFLAGS) -o $@ -L . -llrs -lgmp
|
||||
|
||||
# driver object files
|
||||
|
||||
97
sci-libs/lrslib/lrslib-073.ebuild
Normal file
97
sci-libs/lrslib/lrslib-073.ebuild
Normal file
@@ -0,0 +1,97 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit toolchain-funcs
|
||||
|
||||
DESCRIPTION="Reverse-search algorithm for vertex enumeration problems"
|
||||
HOMEPAGE="https://cgm.cs.mcgill.ca/~avis/C/lrs.html"
|
||||
SRC_URI="https://cgm.cs.mcgill.ca/~avis/C/lrslib/archive/${P}.tar.gz"
|
||||
|
||||
# COPYING is GPL-2, but e.g. lrslib.h says "or ... any later version."
|
||||
LICENSE="GPL-2+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~riscv ~amd64-linux"
|
||||
IUSE="gmp mpi"
|
||||
|
||||
RDEPEND="
|
||||
gmp? (
|
||||
dev-libs/gmp:0=
|
||||
mpi? ( virtual/mpi )
|
||||
)"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${P}-cflags-ldflags.patch"
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
tc-export CC
|
||||
|
||||
# A LIBDIR variable exists in the makefile but "lib" remains
|
||||
# hard-coded in the install targets.
|
||||
sed -e "s,/usr/local,${EPREFIX}/usr,g" \
|
||||
-e "s,/lib,/$(get_libdir),g" \
|
||||
-i makefile || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if use gmp ; then
|
||||
emake
|
||||
emake all-shared
|
||||
use mpi && emake mplrs
|
||||
else
|
||||
emake allmp
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" prefix="${EPREFIX}/usr" install-common
|
||||
if use gmp; then
|
||||
emake DESTDIR="${D}" prefix="${EPREFIX}/usr" install
|
||||
use mpi && dobin mplrs
|
||||
fi
|
||||
dodoc README
|
||||
}
|
||||
|
||||
src_test() {
|
||||
bins=()
|
||||
|
||||
if use gmp; then
|
||||
bins+=( "./lrs" )
|
||||
use mpi && bins+=( "mpirun ./mplrs" )
|
||||
fi
|
||||
|
||||
for b in "${bins[@]}"; do
|
||||
for f in cube mp5; do
|
||||
# There are other ine/ext pairs in the tarball, but only
|
||||
# these two are at the top level and are obviously H/V
|
||||
# counterparts.
|
||||
|
||||
echo "Testing example ${f} under ${b}..."
|
||||
# Convert this H-repr to a V-repr, keeping only the list of
|
||||
# vertices (which are indented by one space). We also sort
|
||||
# the output because it's only consistent up to a
|
||||
# permutation.
|
||||
${b} "${f}.ine" \
|
||||
| grep '^ ' \
|
||||
| sort \
|
||||
> "${T}/actual.txt" \
|
||||
|| die
|
||||
|
||||
# The expected output is contained in the "ext" counterpart,
|
||||
# which we have to sort for the same reason we sorted the
|
||||
# actual output.
|
||||
grep '^ ' \
|
||||
"${f}.ext" \
|
||||
| sort \
|
||||
> "${T}/expected.txt" \
|
||||
|| die
|
||||
|
||||
cmp "${T}/actual.txt" "${T}/expected.txt" \
|
||||
|| die "test case ${f} under ${b} failed"
|
||||
done
|
||||
done
|
||||
}
|
||||
Reference in New Issue
Block a user