git: b348f4d6f01a - 2021Q3 - misc/xplr: Unbreak build on FreeBSD 11-{i386, amd64}

Lewis Cook lcook at FreeBSD.org
Sun Jul 11 17:58:04 UTC 2021


The branch 2021Q3 has been updated by lcook:

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

commit b348f4d6f01a86346b9b3f77045f6d24ca23aacd
Author:     Lewis Cook <lcook at FreeBSD.org>
AuthorDate: 2021-07-11 17:54:05 +0000
Commit:     Lewis Cook <lcook at FreeBSD.org>
CommitDate: 2021-07-11 17:57:20 +0000

    misc/xplr: Unbreak build on FreeBSD 11-{i386,amd64}
    
    getentropy(3) did not appear until FreeBSD 12, anything lower will
    not compile, throwing an undefined reference to `getentropy'.  We can
    safely remove this once FreeBSD 11 is EOL.
    
    Reported-by:    pkg-fallout
    (cherry picked from commit a3c6016fadb2d5a19fba9230cf49f17be1241f8f)
---
 misc/xplr/Makefile                                          | 13 +++++++++++--
 ...s_luajit-src-210.1.3+restyfe08842_luajit2_src_lj__prng.c | 11 +++++++++++
 2 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/misc/xplr/Makefile b/misc/xplr/Makefile
index 2355a074c27c..7071eab71790 100644
--- a/misc/xplr/Makefile
+++ b/misc/xplr/Makefile
@@ -1,7 +1,7 @@
 PORTNAME=	xplr
 DISTVERSIONPREFIX=	v
 DISTVERSION=	0.14.3
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	misc
 
 MAINTAINER=	lcook at FreeBSD.org
@@ -177,4 +177,13 @@ post-install-EXAMPLES-on:
 		${INSTALL_DATA} ${_EXAMPLES} \
 		${STAGEDIR}${EXAMPLESDIR}
 
-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+
+# XXX: getentropy(3) did not appear until FreeBSD 12, anything lower will
+# not compile, throwing an undefined reference to `getentropy'.  We can
+# safely remove this once FreeBSD 11 is EOL.
+.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1200000
+EXTRA_PATCHES=	${PATCHDIR}/extra-cargo-crates_luajit-src-210.1.3+restyfe08842_luajit2_src_lj__prng.c
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/misc/xplr/files/extra-cargo-crates_luajit-src-210.1.3+restyfe08842_luajit2_src_lj__prng.c b/misc/xplr/files/extra-cargo-crates_luajit-src-210.1.3+restyfe08842_luajit2_src_lj__prng.c
new file mode 100644
index 000000000000..f47decc315a6
--- /dev/null
+++ b/misc/xplr/files/extra-cargo-crates_luajit-src-210.1.3+restyfe08842_luajit2_src_lj__prng.c
@@ -0,0 +1,11 @@
+--- cargo-crates/luajit-src-210.1.3+restyfe08842/luajit2/src/lj_prng.c.orig	2021-07-11 17:23:58 UTC
++++ cargo-crates/luajit-src-210.1.3+restyfe08842/luajit2/src/lj_prng.c
+@@ -116,7 +116,7 @@ static PRGR libfunc_rgr;
+ #define LJ_TARGET_HAS_GETENTROPY	1
+ #endif
+ #elif LJ_TARGET_BSD || LJ_TARGET_SOLARIS || LJ_TARGET_CYGWIN
+-#define LJ_TARGET_HAS_GETENTROPY	1
++#define LJ_TARGET_HAS_GETENTROPY	0
+ #endif
+ 
+ #if LJ_TARGET_HAS_GETENTROPY


More information about the dev-commits-ports-branches mailing list