git: 5d2007b1ed1c - main - security/intel-ipsec-mb: Update to 1.1

From: Daniel Engberg <diizzy_at_FreeBSD.org>
Date: Wed, 05 Jan 2022 23:43:54 UTC
The branch main has been updated by diizzy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5d2007b1ed1c42a8c28b7016f1d6cc6a4a608f79

commit 5d2007b1ed1c42a8c28b7016f1d6cc6a4a608f79
Author:     Daniel Engberg <diizzy@FreeBSD.org>
AuthorDate: 2022-01-05 23:05:42 +0000
Commit:     Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2022-01-05 23:05:53 +0000

    security/intel-ipsec-mb: Update to 1.1
    
    Changelog: https://github.com/intel/intel-ipsec-mb/releases/tag/v1.1
    
    Backport upstream commit 3a1c8c1c2c24a9d6cb56439c6aa6bea4d4fb1093
    to fix compilation
    Set MAKE_JOBS_UNSAFE to avoid OOM issues
    Set rpath to avoid requirement of installing port to run test(s)
    
    PR:             260961
    Reviewed by:    Martin Filla <freebsd@sysctl.cz> (maintainer)
---
 security/intel-ipsec-mb/Makefile                  | 24 +++++++++++++++--------
 security/intel-ipsec-mb/distinfo                  |  8 +++++---
 security/intel-ipsec-mb/files/patch-test_Makefile | 15 ++++++++++++++
 3 files changed, 36 insertions(+), 11 deletions(-)

diff --git a/security/intel-ipsec-mb/Makefile b/security/intel-ipsec-mb/Makefile
index fb274b8104af..d68b50cde663 100644
--- a/security/intel-ipsec-mb/Makefile
+++ b/security/intel-ipsec-mb/Makefile
@@ -1,8 +1,11 @@
 PORTNAME=	intel-ipsec-mb
-DISTVERSION=	0.55.0
-DISTVERSIONSUFFIX=	-dev
+DISTVERSIONPREFIX=	v
+DISTVERSION=	1.1
 CATEGORIES=	security
 
+PATCH_SITES=	https://github.com/intel/intel-ipsec-mb/commit/
+PATCHFILES=	3a1c8c1c2c24a9d6cb56439c6aa6bea4d4fb1093.patch:-p1
+
 MAINTAINER=	freebsd@sysctl.cz
 COMMENT=	Intel(R) Multi-Buffer Crypto for IPsec Library
 
@@ -17,23 +20,28 @@ USES=		gmake compiler:c11 localbase:ldflags
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	intel
-GH_TAGNAME=	55179f0
 
 USE_LDCONFIG=	yes
+
 PLIST_FILES=	include/intel-ipsec-mb.h \
 		lib/libIPSec_MB.so \
-		lib/libIPSec_MB.so.0 \
-		lib/libIPSec_MB.so.${DISTVERSION} \
+		lib/libIPSec_MB.so.1 \
+		lib/libIPSec_MB.so.${DISTVERSION}.0 \
 		man/man7/libipsec-mb.7.gz
 
+# While parallel compiling works it can easily eat up 8+ Gb of RAM which will
+# result in unnecessary OOM errors
+MAKE_JOBS_UNSAFE=	yes
+
 do-install:
 	${INSTALL_DATA} ${WRKSRC}/lib/intel-ipsec-mb.h ${STAGEDIR}${PREFIX}/include/
-	${INSTALL_LIB} ${WRKSRC}/lib/libIPSec_MB.so.${DISTVERSION} ${STAGEDIR}${PREFIX}/lib/libIPSec_MB.so.${DISTVERSION}
-	${RLN} ${STAGEDIR}${PREFIX}/lib/libIPSec_MB.so.${DISTVERSION} ${STAGEDIR}${PREFIX}/lib/libIPSec_MB.so.0
-	${RLN} ${STAGEDIR}${PREFIX}/lib/libIPSec_MB.so.0 ${STAGEDIR}${PREFIX}/lib/libIPSec_MB.so
+	${INSTALL_LIB} ${WRKSRC}/lib/libIPSec_MB.so.${DISTVERSION}.0 ${STAGEDIR}${PREFIX}/lib/libIPSec_MB.so.${DISTVERSION}.0
+	${RLN} ${STAGEDIR}${PREFIX}/lib/libIPSec_MB.so.${DISTVERSION}.0 ${STAGEDIR}${PREFIX}/lib/libIPSec_MB.so.1
+	${RLN} ${STAGEDIR}${PREFIX}/lib/libIPSec_MB.so.${DISTVERSION}.0 ${STAGEDIR}${PREFIX}/lib/libIPSec_MB.so
 	${INSTALL_MAN} ${WRKSRC}/lib/libipsec-mb.7 ${STAGEDIR}${PREFIX}/man/man7
 
 do-test:
+	${RLN} ${WRKSRC}/lib/libIPSec_MB.so.${DISTVERSION}.0 ${WRKSRC}/test/libIPSec_MB.so.1
 	cd ${WRKSRC}/test && ./ipsec_xvalid_test -v
 	cd ${WRKSRC}/test && ./ipsec_MB_testapp --auto-detect
 
diff --git a/security/intel-ipsec-mb/distinfo b/security/intel-ipsec-mb/distinfo
index bc7ce14a6be5..5e1d2ed8ce2e 100644
--- a/security/intel-ipsec-mb/distinfo
+++ b/security/intel-ipsec-mb/distinfo
@@ -1,3 +1,5 @@
-TIMESTAMP = 1605371320
-SHA256 (intel-intel-ipsec-mb-0.55.0-dev-55179f0_GH0.tar.gz) = acd90fae86dea1f86c7a8be649e0ab3981f7df9f4e80b1f2b922d5edc8ebcd87
-SIZE (intel-intel-ipsec-mb-0.55.0-dev-55179f0_GH0.tar.gz) = 1019534
+TIMESTAMP = 1641389422
+SHA256 (intel-intel-ipsec-mb-v1.1_GH0.tar.gz) = 0eed29151f57c98ed30fb899fab81438264bc5578bd7cc11d23ccc619af9beac
+SIZE (intel-intel-ipsec-mb-v1.1_GH0.tar.gz) = 1227915
+SHA256 (3a1c8c1c2c24a9d6cb56439c6aa6bea4d4fb1093.patch) = 076d4069033ace59c3508f249cac095c09c6bffb449f6d0fc0772372e5803a17
+SIZE (3a1c8c1c2c24a9d6cb56439c6aa6bea4d4fb1093.patch) = 1811
diff --git a/security/intel-ipsec-mb/files/patch-test_Makefile b/security/intel-ipsec-mb/files/patch-test_Makefile
new file mode 100644
index 000000000000..c7a8371445f8
--- /dev/null
+++ b/security/intel-ipsec-mb/files/patch-test_Makefile
@@ -0,0 +1,15 @@
+--- test/Makefile.orig	2022-01-05 18:18:41 UTC
++++ test/Makefile
+@@ -139,10 +139,10 @@ endif
+ all: $(TEST_APP) $(XVALID_APP) $(FUZZ_APP)
+ 
+ $(TEST_APP): $(OBJECTS)
+-	$(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@
++	$(CC) $(LDFLAGS) $^ $(LDLIBS) -Wl,-rpath,. -o $@
+ 
+ $(XVALID_APP): $(XVALID_OBJECTS)
+-	$(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@
++	$(CC) $(LDFLAGS) $^ $(LDLIBS) -Wl,-rpath,. -o $@
+ 
+ $(FUZZ_APP): $(FUZZ_SOURCES)
+ ifneq (, $(shell which clang))