git: 97bbcc913240 - main - math/lrslib: Update 071a → 7.2

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Tue, 15 Aug 2023 03:00:48 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=97bbcc913240fe271a1589b0efd426fa966acd21

commit 97bbcc913240fe271a1589b0efd426fa966acd21
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2023-08-15 02:59:10 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2023-08-15 03:00:41 +0000

    math/lrslib: Update 071a → 7.2
    
    Also switch to the versioning scheme A.B
    according how versions are described on their
    website.
    
    Reported by:    portscout
---
 math/lrslib/Makefile             |  6 +++++-
 math/lrslib/distinfo             |  6 +++---
 math/lrslib/files/patch-lrslib.c | 20 ++++++++++++++++++++
 math/lrslib/files/patch-makefile | 22 +++++++++++-----------
 4 files changed, 39 insertions(+), 15 deletions(-)

diff --git a/math/lrslib/Makefile b/math/lrslib/Makefile
index 01531a3ac931..ff90efd67b17 100644
--- a/math/lrslib/Makefile
+++ b/math/lrslib/Makefile
@@ -1,7 +1,9 @@
 PORTNAME=	lrslib
-PORTVERSION=	071a
+PORTVERSION=	7.2
+PORTEPOCH=	1
 CATEGORIES=	math
 MASTER_SITES=	http://cgm.cs.mcgill.ca/~avis/C/lrslib/archive/
+DISTNAME=	${PORTNAME}-0${PORTVERSION:S/.//}
 
 MAINTAINER=	yuri@FreeBSD.org
 COMMENT=	Reverse search algorithm for vertex enumeration/convex hull problems
@@ -28,6 +30,8 @@ MAKE_ARGS=	CFLAGS="${CFLAGS}" INCLUDEDIR=${LOCALBASE}/include LIBDIR=${LOCALBASE
 
 LDFLAGS+=	-lthr
 
+BINARY_ALIAS=	gcc=${CC}
+
 post-install:
 	@cd ${STAGEDIR}${PREFIX} && ${STRIP_CMD} bin/* lib/*.so
 
diff --git a/math/lrslib/distinfo b/math/lrslib/distinfo
index 8e1f12b6a6d2..f61bda8a52bf 100644
--- a/math/lrslib/distinfo
+++ b/math/lrslib/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1621638167
-SHA256 (lrslib-071a.tar.gz) = 926636ea68de46625f141f6e025dce967cc7e68cf4bf4a597375c063f5c11673
-SIZE (lrslib-071a.tar.gz) = 458590
+TIMESTAMP = 1692066216
+SHA256 (lrslib-072.tar.gz) = fc48754a1ded1d8445d40ecfbe3546e4f27d53aaee95dc2c8c0c79fb9cd532f0
+SIZE (lrslib-072.tar.gz) = 496411
diff --git a/math/lrslib/files/patch-lrslib.c b/math/lrslib/files/patch-lrslib.c
new file mode 100644
index 000000000000..fbf12fc76261
--- /dev/null
+++ b/math/lrslib/files/patch-lrslib.c
@@ -0,0 +1,20 @@
+--- lrslib.c.orig	2022-03-10 09:42:46 UTC
++++ lrslib.c
+@@ -32,6 +32,8 @@
+ #include <limits.h>
+ #include <libgen.h>
+ 
++#include <libgen.h> // for basename(3)
++
+ #include "lrsrestart.h"
+ #include "lrslib.h"
+ 
+@@ -75,7 +77,7 @@ static void ptimes (void);
+ static double get_time(void);
+ #endif
+ 
+-char *basename(char *path);
++//char *basename(char *path);
+ 
+ /*******************************/
+ /* signals handling            */
diff --git a/math/lrslib/files/patch-makefile b/math/lrslib/files/patch-makefile
index 258feba116c9..5388f8509c94 100644
--- a/math/lrslib/files/patch-makefile
+++ b/math/lrslib/files/patch-makefile
@@ -1,6 +1,6 @@
---- makefile.orig	2021-05-21 23:54:11 UTC
+--- makefile.orig	2022-03-10 09:42:46 UTC
 +++ makefile
-@@ -194,7 +194,7 @@ SHLIBBIN=lrs-shared lrsnash-shared
+@@ -231,7 +231,7 @@ SHLIBBIN=lrs-shared lrsnash-shared
  # Building (linking) the shared library, and relevant symlinks.
  
  ${SHLIB}: ${SHLIBOBJ}
@@ -9,25 +9,25 @@
  
  ${SONAME}: ${SHLIB}
  	ln -sf ${SHLIB} ${SONAME}
-@@ -207,11 +207,11 @@ ${SHLINK}: ${SONAME}
+@@ -244,11 +244,11 @@ ${SHLINK}: ${SONAME}
  all-shared: ${SHLIBBIN}
  
- lrs-shared: ${SHLINK} lrs.o
--	$(CC) lrs.o -o $@ -L . -llrs
-+	$(CC) lrs.o -o $@ -L . $(LDFLAGS) -llrs
+ lrs-shared: ${SHLINK} lrs-shared.o
+-	$(CC) $^ -o $@ -L . -llrs
++	$(CC) $^ -o $@ -L . $(LDFLAGS) -llrs
  
  
  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 $(LDFLAGS) -lgmp
+-	$(CC) ${CFLAGS} -DGMP -DMA lrsnash.c  lrsnashlib.c -I${INCLUDEDIR} -o $@ -L . -llrs -lgmp
++	$(CC) ${CFLAGS} -DGMP -DMA lrsnash.c  lrsnashlib.c -I${INCLUDEDIR} -o $@ -L . $(LDFLAGS) -llrs -lgmp
  
- # build object files for the shared library
+ # driver object files
  
-@@ -240,19 +240,19 @@ lrslib2-shr.o: lrslib.c lrslib.h
+@@ -282,19 +282,19 @@ lrslib2-shr.o: lrslib.c lrslib.h
  # 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_INCLUDES=lrslib.h lrsdriver.h lrsgmp.h lrslong.h lrsmp.h lrsnashlib.h lrsrestart.h mplrs.h
  
  install: all-shared install-common