community/lrs to 071-3

This commit is contained in:
Kevin Mihelich 2020-06-04 12:55:36 +00:00
parent 1ce51cb5ad
commit d984de7ebc
5 changed files with 96 additions and 77 deletions

View file

@ -1,54 +0,0 @@
From d820f5c88bea19ba23e4d603d6d9369dd2b525ee Mon Sep 17 00:00:00 2001
From: Kevin Mihelich <kevin@archlinuxarm.org>
Date: Tue, 9 Jul 2019 07:45:26 -0600
Subject: [PATCH] 32-bit changes
---
makefile | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/makefile b/makefile
index 06b115c..37e4185 100644
--- a/makefile
+++ b/makefile
@@ -8,10 +8,10 @@
#try uncommenting next line if cc is the default C compiler
#CC = gcc
-default: lrs redund lrsgmp redundgmp
+#default: lrs redund lrsgmp redundgmp
#choose line below instead if __int128 not supported
-#default: lrs64 redund64 lrsgmp redundgmp
+default: lrs64 redund64 lrsgmp redundgmp
#make lrs lrs,lrsgmp redund,redundgmp hybrid and gmp versions
@@ -195,7 +195,7 @@ SOMINOR ?=.0.0
SHLIB ?=$(SONAME)$(SOMINOR)
SHLINK ?=liblrs.so
-SHLIBOBJ=lrslong1-shr.o lrslong2-shr.o lrslib1-shr.o lrslib2-shr.o \
+SHLIBOBJ=lrslong1-shr.o lrslib1-shr.o \
lrslibgmp-shr.o lrsgmp-shr.o lrsdriver-shr.o
SHLIBBIN=lrs-shared redund-shared lrsnash-shared
@@ -215,11 +215,11 @@ ${SHLINK}: ${SONAME}
all-shared: ${SHLIBBIN}
-lrs-shared: ${SHLINK} lrs.o
- $(CC) lrs.o -o $@ -L . -llrs ${LDFLAGS}
+lrs-shared: ${SHLINK} lrs64.o
+ $(CC) lrs64.o -o $@ -L . -llrs ${LDFLAGS}
-redund-shared: ${SHLINK} redund.o
- $(CC) redund.o -o $@ -L . -llrs ${LDFLAGS}
+redund-shared: ${SHLINK} redund64.o
+ $(CC) redund64.o -o $@ -L . -llrs ${LDFLAGS}
lrsnash-shared: ${SHLINK} lrsnash.c
$(CC) -DGMP -DMA lrsnash.c lrsnashlib.c -I${INCLUDEDIR} -o $@ -L . -llrs -lgmp ${LDFLAGS}
--
2.21.0

View file

@ -0,0 +1,36 @@
diff -urN a/makefile b/makefile
--- a/makefile 2020-06-04 06:47:14.484574508 -0600
+++ b/makefile 2020-06-04 06:52:20.348011716 -0600
@@ -8,10 +8,10 @@
#try uncommenting next line if cc is the default C compiler
#CC = gcc
-default: lrs
+#default: lrs
#choose line below instead if __int128 not supported
-#default: lrs64 lrsgmp
+default: lrs64 lrsgmp
#make lrs lrs,lrsgmp hybrid and gmp versions
@@ -185,7 +185,7 @@
SHLIB ?=$(SONAME)$(SOMINOR)
SHLINK ?=liblrs.so
-SHLIBOBJ=lrslong1-shr.o lrslong2-shr.o lrslib1-shr.o lrslib2-shr.o \
+SHLIBOBJ=lrslong1-shr.o lrslib1-shr.o \
lrslibgmp-shr.o lrsgmp-shr.o lrsdriver-shr.o
SHLIBBIN=lrs-shared lrsnash-shared
@@ -205,8 +205,8 @@
all-shared: ${SHLIBBIN}
-lrs-shared: ${SHLINK} lrs.o
- $(CC) lrs.o -o $@ -L . -llrs ${LDFLAGS}
+lrs-shared: ${SHLINK} lrs64.o
+ $(CC) lrs64.o -o $@ -L . -llrs ${LDFLAGS}
lrsnash-shared: ${SHLINK} lrsnash.c

View file

@ -4,9 +4,9 @@
# - patch to fix up makefile for 32-bit builds # - patch to fix up makefile for 32-bit builds
pkgname=lrs pkgname=lrs
pkgver=070.a pkgver=071
_pkgver=${pkgver/./} _pkgver=${pkgver/./}
pkgrel=2 pkgrel=3
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"
@ -14,22 +14,23 @@ 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
0001-32-bit-changes.patch) lrs-missing-include.patch
sha256sums=('d38cb8633e856398b461b35daa269d960c2c0e12b3df5725359dc3940b518e0c' 32-bit-support.patch)
'23814d543e458f43b9871f5de6112f3ca331d8ded3449c7e2efa681ca5a6606f' sha256sums=('d3ea5636bfde3011d43c835773fabe131d9251197b6cc666a52d8caa3e1c7816'
'af8dee8dffc5483a87f77401e5ac8c41d7506c9dfb202d07ad81dc0396846f4a') '8e43f9f6c583c653e28b75907f27f616f45f36d6fc677a4aae6a7004d60424c0'
'61da0543e92ab242df1d5adcb6bb842a3c489c011c858705278de1c6cf580649'
'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
if [[ $CARCH != "aarch64" ]]; then patch -p1 -i ../lrs-missing-include.patch # Install missing header
patch -p1 -i ../0001-32-bit-changes.patch [[ $CARCH != "aarch64" ]] && patch -p1 -i ../32-bit-support.patch || true
fi
} }
build() { build() {
cd lrslib-${pkgver%.*} cd lrslib-${pkgver%.*}
make -j1 make
} }
package() { package() {

View file

@ -0,0 +1,34 @@
--- 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;

View file

@ -1,14 +1,19 @@
--- lrslib-070/makefile.orig 2019-04-29 11:53:55.707113154 +0000 --- lrslib-071/makefile.orig 2020-06-04 09:58:02.217703517 +0000
+++ lrslib-070/makefile 2019-04-29 11:55:36.485187714 +0000 +++ lrslib-071/makefile 2020-06-04 09:59:20.505523290 +0000
@@ -35,7 +35,6 @@ @@ -32,10 +32,9 @@
#INCLUDEDIR = /usr/local/include:/usr/include #LIBDIR = /usr/lib
#LIBDIR = /usr/local/lib:/usr/lib
-CFLAGS = -O3 -Wall #Kyoto machines usage
SHLIB_CFLAGS = -fPIC -INCLUDEDIR = /usr/local/include
mpicxx=mpic++ -LIBDIR = /usr/local/lib
+INCLUDEDIR = /usr/include
+LIBDIR = /usr/lib
@@ -204,7 +203,7 @@ -CFLAGS = -O3 -Wall
#CFLAGS = -g -Wall
#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}
@ -17,16 +22,13 @@
${SONAME}: ${SHLIB} ${SONAME}: ${SHLIB}
ln -sf ${SHLIB} ${SONAME} ln -sf ${SHLIB} ${SONAME}
@@ -217,13 +216,13 @@ @@ -207,11 +206,11 @@
all-shared: ${SHLIBBIN} all-shared: ${SHLIBBIN}
lrs-shared: ${SHLINK} lrs.o lrs-shared: ${SHLINK} lrs.o
- $(CC) lrs.o -o $@ -L . -llrs - $(CC) lrs.o -o $@ -L . -llrs
+ $(CC) lrs.o -o $@ -L . -llrs ${LDFLAGS} + $(CC) lrs.o -o $@ -L . -llrs ${LDFLAGS}
redund-shared: ${SHLINK} redund.o
- $(CC) redund.o -o $@ -L . -llrs
+ $(CC) redund.o -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) -DGMP -DMA lrsnash.c lrsnashlib.c -I${INCLUDEDIR} -o $@ -L . -llrs -lgmp