aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Kubaj <pkubaj@FreeBSD.org>2023-01-04 16:52:41 +0000
committerPiotr Kubaj <pkubaj@FreeBSD.org>2023-01-04 23:04:12 +0000
commit44378cfde01b3c04918c50b38009092ccee9f6c7 (patch)
tree5f11acf800995327b9dfccb3bec7fd75e33c7939
parent69659c020c17d878f814a815028e96989e4cef49 (diff)
downloadports-44378cfde01b3c04918c50b38009092ccee9f6c7.tar.gz
ports-44378cfde01b3c04918c50b38009092ccee9f6c7.zip
lang/luajit: use clang on powerpc
Merge recent patch for luajit that fixes build with clang. Since clang's assembler before LLVM 14 doesn't understand some instructions, use binutils' as when using older LLVM.
-rw-r--r--lang/luajit/Makefile14
-rw-r--r--lang/luajit/distinfo4
2 files changed, 12 insertions, 6 deletions
diff --git a/lang/luajit/Makefile b/lang/luajit/Makefile
index e865adb8900f..cac47cb19078 100644
--- a/lang/luajit/Makefile
+++ b/lang/luajit/Makefile
@@ -5,6 +5,9 @@ CATEGORIES= lang
MASTER_SITES= https://luajit.org/download/
DISTNAME= LuaJIT-${DISTVERSION}
+PATCH_SITES= https://github.com/LuaJIT/LuaJIT/commit/
+PATCHFILES= a4f4f5b83564a1075bea0ac7c1fd8768be1caff7.patch:-p1
+
MAINTAINER= osa@FreeBSD.org
COMMENT= Just-In-Time Compiler for Lua
WWW= https://luajit.org/luajit.html
@@ -23,16 +26,17 @@ IGNORE_riscv64= fails to compile: lj_arch.h:55:2: No support for this architect
CONFLICTS_INSTALL= luajit-devel luajit-openresty
WRKSRC= ${WRKDIR}/LuaJIT-${DISTVERSION}
-USES= cpe gmake
+USES= compiler cpe gmake
USE_LDCONFIG= yes
MAKE_ARGS= CC=${CC} CCOPT= CCOPT_x86=
PLIST_SUB+= VERSION=${DISTVERSION}
-.include <bsd.port.options.mk>
+.include <bsd.port.pre.mk>
-.if ${ARCH:Mpowerpc*} || ${ARCH:Mmips*} || ${ARCH:Msparc*}
-USE_GCC=yes
+.if ${ARCH:Mpowerpc*} && ${COMPILER_VERSION} < 140
+BUILD_DEPENDS+= as:devel/binutils
+CFLAGS+= -fno-integrated-as
.endif
.if ${PORT_OPTIONS:MPTHREAD}
@@ -44,4 +48,4 @@ post-install:
${STAGEDIR}${PREFIX}/bin/${PORTNAME}
${INSTALL_MAN} ${WRKSRC}/etc/luajit.1 ${STAGEDIR}${MAN1PREFIX}/man/man1
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/lang/luajit/distinfo b/lang/luajit/distinfo
index 45e239a1956f..6678f4a7dbd5 100644
--- a/lang/luajit/distinfo
+++ b/lang/luajit/distinfo
@@ -1,3 +1,5 @@
-TIMESTAMP = 1493823315
+TIMESTAMP = 1672840245
SHA256 (LuaJIT-2.0.5.tar.gz) = 874b1f8297c697821f561f9b73b57ffd419ed8f4278c82e05b48806d30c1e979
SIZE (LuaJIT-2.0.5.tar.gz) = 849845
+SHA256 (a4f4f5b83564a1075bea0ac7c1fd8768be1caff7.patch) = 172ee031fa64644b91c74b8488f976b39215bd128e5217eb93791729bd20916a
+SIZE (a4f4f5b83564a1075bea0ac7c1fd8768be1caff7.patch) = 831