mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
community/lrs to 071.b-1
This commit is contained in:
parent
a3f556dcb1
commit
fa986ac55e
4 changed files with 82 additions and 76 deletions
|
@ -1,12 +1,11 @@
|
||||||
diff -urN a/makefile b/makefile
|
--- makefile.orig 2021-06-04 10:48:58.746663307 -0600
|
||||||
--- a/makefile 2020-06-04 06:47:14.484574508 -0600
|
+++ makefile 2021-06-04 11:03:59.777040326 -0600
|
||||||
+++ b/makefile 2020-06-04 06:52:20.348011716 -0600
|
|
||||||
@@ -8,10 +8,10 @@
|
@@ -8,10 +8,10 @@
|
||||||
#try uncommenting next line if cc is the default C compiler
|
#try uncommenting next line if cc is the default C compiler
|
||||||
#CC = gcc
|
#CC = gcc
|
||||||
|
|
||||||
-default: lrs
|
-default: lrs lrsgmp
|
||||||
+#default: lrs
|
+#default: lrs lrsgmp
|
||||||
|
|
||||||
#choose line below instead if __int128 not supported
|
#choose line below instead if __int128 not supported
|
||||||
-#default: lrs64 lrsgmp
|
-#default: lrs64 lrsgmp
|
||||||
|
@ -14,23 +13,69 @@ diff -urN a/makefile b/makefile
|
||||||
|
|
||||||
|
|
||||||
#make lrs lrs,lrsgmp hybrid and gmp versions
|
#make lrs lrs,lrsgmp hybrid and gmp versions
|
||||||
@@ -185,7 +185,7 @@
|
@@ -47,12 +47,12 @@
|
||||||
|
|
||||||
|
# for 32 bit machines
|
||||||
|
|
||||||
|
-# BITS=-DB32
|
||||||
|
-# MPLRSOBJ2=
|
||||||
|
+BITS=-DB32
|
||||||
|
+MPLRSOBJ2=
|
||||||
|
|
||||||
|
# for 64 bit machines
|
||||||
|
-BITS=-DB128
|
||||||
|
-MPLRSOBJ2=lrslib2-mplrs.o lrslong2-mplrs.o
|
||||||
|
+#BITS=-DB128
|
||||||
|
+#MPLRSOBJ2=lrslib2-mplrs.o lrslong2-mplrs.o
|
||||||
|
|
||||||
|
|
||||||
|
LRSOBJ=lrs.o lrslong1.o lrslong2.o lrslib1.o lrslib2.o lrslibgmp.o lrsgmp.o lrsdriver.o
|
||||||
|
@@ -171,14 +171,14 @@
|
||||||
|
|
||||||
|
single: lrs.c lrslong.c lrslong.h lrslib.c lrslib.h lrsgmp.c lrsgmp.h lrsdriver.h lrsdriver.c
|
||||||
|
$(CC) ${CFLAGS} -DSAFE -DLRSLONG -o lrs1 lrs.c lrslib.c lrslong.c lrsdriver.c
|
||||||
|
- $(CC) ${CFLAGS} ${BITS} -DSAFE -DLRSLONG -o lrs2 lrs.c lrslib.c lrslong.c lrsdriver.c
|
||||||
|
+ #$(CC) ${CFLAGS} ${BITS} -DSAFE -DLRSLONG -o lrs2 lrs.c lrslib.c lrslong.c lrsdriver.c
|
||||||
|
ln -s -f lrs1 redund1
|
||||||
|
ln -s -f lrs2 redund2
|
||||||
|
|
||||||
|
allmp: lrs.c lrslib.c lrslib.h lrsmp.c lrsmp.h lrsdriver.h lrsdriver.c
|
||||||
|
$(CC) -Wall -O3 -o lrs lrs.c lrslib.c lrsdriver.c lrsmp.c
|
||||||
|
$(CC) -Wall -O3 -DSAFE -DLRSLONG -o lrs1 lrs.c lrslib.c lrsdriver.c lrslong.c
|
||||||
|
- $(CC) -Wall -O3 -DSAFE -DLRSLONG ${BITS} -o lrs2 lrs.c lrslib.c lrsdriver.c lrslong.c
|
||||||
|
+ #$(CC) -Wall -O3 -DSAFE -DLRSLONG ${BITS} -o lrs2 lrs.c lrslib.c lrsdriver.c lrslong.c
|
||||||
|
$(CC) -O3 -DLRS_QUIET -o lrsnash lrsnash.c lrsnashlib.c lrslib.c lrsdriver.c lrsmp.c -static
|
||||||
|
$(CC) -O3 -o setnash setupnash.c lrslib.c lrsdriver.c lrsmp.c
|
||||||
|
$(CC) -O3 -o setnash2 setupnash2.c lrslib.c lrsdriver.c lrsmp.c
|
||||||
|
@@ -194,7 +194,7 @@
|
||||||
|
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} -o lrsnashgmp lrsnash.c lrsnashlib.c lrslib.c lrsgmp.c lrsdriver.c -lgmp -DGMP
|
||||||
|
$(CC) -O3 -I${INCLUDEDIR} -L${LIBDIR} -o lrsnash1 lrsnash.c lrsnashlib.c lrslib.c lrslong.c lrsdriver.c -DLRSLONG -DSAFE
|
||||||
|
- $(CC) -O3 -I${INCLUDEDIR} -L${LIBDIR} -o lrsnash2 lrsnash.c lrsnashlib.c lrslib.c lrslong.c lrsdriver.c -DLRSLONG -DSAFE ${BITS}
|
||||||
|
+ #$(CC) -O3 -I${INCLUDEDIR} -L${LIBDIR} -o lrsnash2 lrsnash.c lrsnashlib.c lrslib.c lrslong.c lrsdriver.c -DLRSLONG -DSAFE ${BITS}
|
||||||
|
$(CC) -O3 -I${INCLUDEDIR} -L${LIBDIR} -o nashdemo nashdemo.c lrsnashlib.c lrslib.c lrsgmp.c lrsdriver.c -lgmp -DGMP
|
||||||
|
$(CC) -O3 -I${INCLUDEDIR} -L${LIBDIR} -o 2nash 2nash.c
|
||||||
|
cp lrsnashgmp lrsnash
|
||||||
|
@@ -202,7 +202,7 @@
|
||||||
|
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 -o felgmp
|
||||||
|
$(CC) -O3 -Wall -I${INCLUDEDIR} fel.c lrslib.c lrsdriver.c lrslong.c -L${LIBDIR} -DLRSLONG -DSAFE -o fel1
|
||||||
|
- $(CC) -O3 -Wall -I${INCLUDEDIR} fel.c lrslib.c lrsdriver.c lrslong.c -L${LIBDIR} -DLRSLONG -DSAFE ${BITS} -o fel2
|
||||||
|
+ #$(CC) -O3 -Wall -I${INCLUDEDIR} fel.c lrslib.c lrsdriver.c lrslong.c -L${LIBDIR} -DLRSLONG -DSAFE ${BITS} -o fel2
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
# From here on the author is David Bremner <bremner@unb.ca> to whom you should turn for help
|
||||||
|
@@ -213,11 +213,11 @@
|
||||||
SHLIB ?=$(SONAME)$(SOMINOR)
|
SHLIB ?=$(SONAME)$(SOMINOR)
|
||||||
SHLINK ?=liblrs.so
|
SHLINK ?=liblrs.so
|
||||||
|
|
||||||
-SHLIBOBJ=lrslong1-shr.o lrslong2-shr.o lrslib1-shr.o lrslib2-shr.o \
|
-SHLIBOBJ2=lrslib2-shr.o lrslong2-shr.o
|
||||||
+SHLIBOBJ=lrslong1-shr.o lrslib1-shr.o \
|
+#SHLIBOBJ2=lrslib2-shr.o lrslong2-shr.o
|
||||||
lrslibgmp-shr.o lrsgmp-shr.o lrsdriver-shr.o
|
|
||||||
|
|
||||||
SHLIBBIN=lrs-shared lrsnash-shared
|
# for 32 bit machines
|
||||||
@@ -205,8 +205,8 @@
|
|
||||||
|
|
||||||
all-shared: ${SHLIBBIN}
|
-# SHLIBOBJ2=
|
||||||
|
+SHLIBOBJ2=
|
||||||
|
|
||||||
-lrs-shared: ${SHLINK} lrs.o
|
SHLIBOBJ=lrslong1-shr.o lrslib1-shr.o \
|
||||||
- $(CC) lrs.o -o $@ -L . -llrs ${LDFLAGS}
|
lrslibgmp-shr.o lrsgmp-shr.o lrsdriver-shr.o \
|
||||||
+lrs-shared: ${SHLINK} lrs64.o
|
|
||||||
+ $(CC) lrs64.o -o $@ -L . -llrs ${LDFLAGS}
|
|
||||||
|
|
||||||
|
|
||||||
lrsnash-shared: ${SHLINK} lrsnash.c
|
|
||||||
|
|
|
@ -4,28 +4,25 @@
|
||||||
# - patch to fix up makefile for 32-bit builds
|
# - patch to fix up makefile for 32-bit builds
|
||||||
|
|
||||||
pkgname=lrs
|
pkgname=lrs
|
||||||
pkgver=071.a
|
pkgver=071.b
|
||||||
_pkgver=${pkgver/./}
|
_pkgver=${pkgver/./}
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="C implementation of the reverse search algorithm for vertex enumeration/convex hull problems"
|
pkgdesc='C implementation of the reverse search algorithm for vertex enumeration/convex hull problems'
|
||||||
arch=(x86_64)
|
arch=(x86_64)
|
||||||
url="http://cgm.cs.mcgill.ca/~avis/C/lrs.html"
|
url='http://cgm.cs.mcgill.ca/~avis/C/lrs.html'
|
||||||
license=(GPL)
|
license=(GPL)
|
||||||
depends=(gmp)
|
depends=(gmp)
|
||||||
source=("http://cgm.cs.mcgill.ca/~avis/C/lrslib/archive/lrslib-$_pkgver.tar.gz"
|
source=(http://cgm.cs.mcgill.ca/~avis/C/lrslib/archive/lrslib-$_pkgver.tar.gz
|
||||||
lrs-system-cflags.patch
|
lrs-system-cflags.patch
|
||||||
lrs-missing-include.patch
|
|
||||||
32-bit-support.patch)
|
32-bit-support.patch)
|
||||||
sha256sums=('926636ea68de46625f141f6e025dce967cc7e68cf4bf4a597375c063f5c11673'
|
sha256sums=('df22682cd742315fe04f866cfe4804d5950f7dc7f514d5b5f36f5b7f5aff9188'
|
||||||
'8e43f9f6c583c653e28b75907f27f616f45f36d6fc677a4aae6a7004d60424c0'
|
'617ed06ae2584ef3349a3b1f6ab1a4acd11f18211394458498e1223a65bb0e73'
|
||||||
'61da0543e92ab242df1d5adcb6bb842a3c489c011c858705278de1c6cf580649'
|
'6d04500e37d1917ad64e86195f47b05425ae1b6ba2bbbddd78166af10d2327a8')
|
||||||
'1981f63153f9fbf3730cea68ff68be0645cecbaa385aa63912e3ab22c978c59c')
|
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
cd lrslib-$_pkgver
|
cd lrslib-$_pkgver
|
||||||
patch -p1 -i ../lrs-system-cflags.patch # Use system CFLAGS/LDFLAGS
|
patch -p1 -i ../lrs-system-cflags.patch # Use system CFLAGS/LDFLAGS
|
||||||
patch -p1 -i ../lrs-missing-include.patch # Install missing header
|
[[ $CARCH != "aarch64" ]] && patch -p0 -i ../32-bit-support.patch || true
|
||||||
[[ $CARCH != "aarch64" ]] && patch -p1 -i ../32-bit-support.patch || true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
|
|
|
@ -1,34 +0,0 @@
|
||||||
--- lrslib-071/makefile.orig 2020-06-04 09:58:02.217703517 +0000
|
|
||||||
+++ lrslib-071/makefile 2020-06-04 09:59:20.505523290 +0000
|
|
||||||
@@ -239,7 +239,7 @@
|
|
||||||
# install targets
|
|
||||||
# where to install binaries, libraries, include files
|
|
||||||
prefix ?= /usr/local
|
|
||||||
-INSTALL_INCLUDES=lrslib.h lrsdriver.h lrsgmp.h lrslong.h lrsmp.h
|
|
||||||
+INSTALL_INCLUDES=lrslib.h lrsdriver.h lrsgmp.h lrslong.h lrsmp.h lrsrestart.h
|
|
||||||
|
|
||||||
install: all-shared install-common
|
|
||||||
mkdir -p $(DESTDIR)${prefix}/bin
|
|
||||||
diff --git a/lrslib-071/lrslib.h.orig b/lrslib-071/lrslib.h
|
|
||||||
index a2eb4b5..ee48475 100644
|
|
||||||
--- lrslib-071/lrslib.h.orig
|
|
||||||
+++ lrslib-071/lrslib.h
|
|
||||||
@@ -148,6 +148,8 @@
|
|
||||||
|
|
||||||
#include ARITH
|
|
||||||
|
|
||||||
+#include "lrsdriver.h"
|
|
||||||
+
|
|
||||||
#ifndef SIGNALS
|
|
||||||
#include <signal.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
--- lrslib-071/lrslib.c.orig 2020-06-04 10:43:56.790948185 +0000
|
|
||||||
+++ lrslib-071/lrslib.c 2020-06-04 10:44:05.641075898 +0000
|
|
||||||
@@ -27,7 +27,6 @@
|
|
||||||
#include <string.h>
|
|
||||||
#include <setjmp.h>
|
|
||||||
#include <limits.h>
|
|
||||||
-#include "lrsrestart.h"
|
|
||||||
#include "lrslib.h"
|
|
||||||
|
|
||||||
static unsigned long dict_count, dict_limit, cache_tries, cache_misses;
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- lrslib-071/makefile.orig 2020-06-04 09:58:02.217703517 +0000
|
--- lrslib-071/makefile.orig 2020-06-04 09:58:02.217703517 +0000
|
||||||
+++ lrslib-071/makefile 2020-06-04 09:59:20.505523290 +0000
|
+++ lrslib-071/makefile 2020-06-04 09:59:20.505523290 +0000
|
||||||
@@ -32,10 +32,9 @@
|
@@ -32,8 +32,8 @@
|
||||||
#LIBDIR = /usr/lib
|
#LIBDIR = /usr/lib
|
||||||
|
|
||||||
#Kyoto machines usage
|
#Kyoto machines usage
|
||||||
|
@ -9,11 +9,9 @@
|
||||||
+INCLUDEDIR = /usr/include
|
+INCLUDEDIR = /usr/include
|
||||||
+LIBDIR = /usr/lib
|
+LIBDIR = /usr/lib
|
||||||
|
|
||||||
-CFLAGS = -O3 -Wall
|
CFLAGS ?= -O3 -Wall
|
||||||
#CFLAGS = -g -Wall
|
#CFLAGS = -g -Wall
|
||||||
|
@@ -228,7 +228,7 @@
|
||||||
#use this if you want only output file contain data between begin/end lines
|
|
||||||
@@ -194,7 +193,7 @@
|
|
||||||
# Building (linking) the shared library, and relevant symlinks.
|
# Building (linking) the shared library, and relevant symlinks.
|
||||||
|
|
||||||
${SHLIB}: ${SHLIBOBJ}
|
${SHLIB}: ${SHLIBOBJ}
|
||||||
|
@ -22,17 +20,17 @@
|
||||||
|
|
||||||
${SONAME}: ${SHLIB}
|
${SONAME}: ${SHLIB}
|
||||||
ln -sf ${SHLIB} ${SONAME}
|
ln -sf ${SHLIB} ${SONAME}
|
||||||
@@ -207,11 +206,11 @@
|
@@ -241,11 +240,11 @@
|
||||||
all-shared: ${SHLIBBIN}
|
all-shared: ${SHLIBBIN}
|
||||||
|
|
||||||
lrs-shared: ${SHLINK} lrs.o
|
lrs-shared: ${SHLINK} lrs-shared.o
|
||||||
- $(CC) lrs.o -o $@ -L . -llrs
|
- $(CC) $^ -o $@ -L . -llrs
|
||||||
+ $(CC) lrs.o -o $@ -L . -llrs ${LDFLAGS}
|
+ $(CC) $^ -o $@ -L . -llrs ${LDFLAGS}
|
||||||
|
|
||||||
|
|
||||||
lrsnash-shared: ${SHLINK} lrsnash.c
|
lrsnash-shared: ${SHLINK} lrsnash.c
|
||||||
- $(CC) -DGMP -DMA lrsnash.c lrsnashlib.c -I${INCLUDEDIR} -o $@ -L . -llrs -lgmp
|
- $(CC) ${CFLAGS} -DGMP -DMA lrsnash.c lrsnashlib.c -I${INCLUDEDIR} -o $@ -L . -llrs -lgmp
|
||||||
+ $(CC) -DGMP -DMA lrsnash.c lrsnashlib.c -I${INCLUDEDIR} -o $@ -L . -llrs -lgmp ${LDFLAGS}
|
+ $(CC) ${CFLAGS} -DGMP -DMA lrsnash.c lrsnashlib.c -I${INCLUDEDIR} -o $@ -L . -llrs -lgmp ${LDFLAGS}
|
||||||
|
|
||||||
# build object files for the shared library
|
# driver object files
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue