summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/luajit/luajit-2.1.0_beta3-r2.ebuild')
-rw-r--r--dev-lang/luajit/luajit-2.1.0_beta3-r2.ebuild56
1 files changed, 56 insertions, 0 deletions
diff --git a/dev-lang/luajit/luajit-2.1.0_beta3-r2.ebuild b/dev-lang/luajit/luajit-2.1.0_beta3-r2.ebuild
new file mode 100644
index 00000000000..cb942e454d0
--- /dev/null
+++ b/dev-lang/luajit/luajit-2.1.0_beta3-r2.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit pax-utils toolchain-funcs
+
+MY_PV="$(ver_cut 1-5)"
+MY_PV="${MY_PV/_beta/-beta}"
+MY_P="LuaJIT-${MY_PV}"
+
+DESCRIPTION="Just-In-Time Compiler for the Lua programming language"
+HOMEPAGE="https://luajit.org/"
+SRC_URI="https://luajit.org/download/${MY_P}.tar.gz"
+
+LICENSE="MIT"
+# this should probably be pkgmoved to 2.0 for sake of consistency.
+SLOT="2"
+KEYWORDS="~arm64"
+IUSE="lua52compat static-libs"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2-ldconfig.patch"
+ "${FILESDIR}/CVE-2020-15890.patch"
+)
+
+S="${WORKDIR}/${MY_P}"
+
+_emake() {
+ emake \
+ Q= \
+ PREFIX="${EPREFIX}/usr" \
+ MULTILIB="$(get_libdir)" \
+ DESTDIR="${D}" \
+ HOST_CC="$(tc-getBUILD_CC)" \
+ STATIC_CC="$(tc-getCC)" \
+ DYNAMIC_CC="$(tc-getCC) -fPIC" \
+ TARGET_LD="$(tc-getCC)" \
+ TARGET_AR="$(tc-getAR) rcus" \
+ BUILDMODE="$(usex static-libs mixed dynamic)" \
+ TARGET_STRIP="true" \
+ INSTALL_LIB="${ED}/usr/$(get_libdir)" \
+ "$@"
+}
+
+src_compile() {
+ _emake XCFLAGS="$(usex lua52compat "-DLUAJIT_ENABLE_LUA52COMPAT" "")"
+}
+
+src_install() {
+ _emake install
+
+ pax-mark m "${ED}/usr/bin/luajit-${MY_PV}"
+
+ HTML_DOCS="doc/." einstalldocs
+}