summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Payno <vpayno+gentoo@gmail.com>2020-01-22 22:53:32 -0800
committerGeorgy Yakovlev <gyakovlev@gentoo.org>2020-03-15 16:53:19 -0700
commitaa4c6dc7a70a17f1c9a64f7532ae5182a55ea649 (patch)
treede88f37321b0757eecbc62622c370df418f37822 /dev-lua/luafilesystem/luafilesystem-1.7.0.2.ebuild
parentdev-lua/luacheck: fix dependency default on luajit (diff)
downloadgentoo-aa4c6dc7a70a17f1c9a64f7532ae5182a55ea649.tar.gz
gentoo-aa4c6dc7a70a17f1c9a64f7532ae5182a55ea649.tar.bz2
gentoo-aa4c6dc7a70a17f1c9a64f7532ae5182a55ea649.zip
dev-lua/luafilesystem: version bump to 1.7.0.2
Updated the ebuild so that it builds the lib for all the installed Lua versions. If luajit use flag is used, it will pull the appropriate lua5.x abi matching version from the build since it replaces it. Closes: https://github.com/gentoo/gentoo/pull/14416 Signed-off-by: Victor Payno <vpayno+gentoo@gmail.com> Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to 'dev-lua/luafilesystem/luafilesystem-1.7.0.2.ebuild')
-rw-r--r--dev-lua/luafilesystem/luafilesystem-1.7.0.2.ebuild66
1 files changed, 66 insertions, 0 deletions
diff --git a/dev-lua/luafilesystem/luafilesystem-1.7.0.2.ebuild b/dev-lua/luafilesystem/luafilesystem-1.7.0.2.ebuild
new file mode 100644
index 000000000000..c6f529263025
--- /dev/null
+++ b/dev-lua/luafilesystem/luafilesystem-1.7.0.2.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit toolchain-funcs
+
+MY_PV=${PV//./_}
+
+DESCRIPTION="File System Library for the Lua Programming Language"
+HOMEPAGE="https://keplerproject.github.io/luafilesystem/"
+SRC_URI="https://github.com/keplerproject/luafilesystem/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~x86"
+IUSE="luajit test"
+
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ >=dev-lang/lua-5.1:*
+ luajit? ( dev-lang/luajit:2 )"
+BDEPEND="
+ virtual/pkgconfig
+ test? ( ${RDEPEND} )"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+src_configure() {
+ cat > config <<-EOF
+ # Installation directories
+
+ # Default installation prefix
+ PREFIX="${ED}/$($(tc-getPKG_CONFIG) --variable exec_prefix $(usex luajit 'luajit' 'lua'))"
+
+ # System's libraries directory (where binary libraries are installed)
+ LUA_LIBDIR="${ED}/$($(tc-getPKG_CONFIG) --variable INSTALL_CMOD $(usex luajit 'luajit' 'lua'))"
+
+ # Lua includes directory
+ LUA_INC=-I$(pwd)/src
+ LUA_INC+=-I$($(tc-getPKG_CONFIG) --variable includedir $(usex luajit 'luajit' 'lua'))
+
+ # OS dependent
+ LIB_OPTION=-shared #for Linux
+
+ LIBNAME=$T.so.$V
+
+ # Compilation directives
+ WARN=-O2 -Wall -fPIC -W -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings -pedantic
+ INCS=\$(LUA_INC)
+ CFLAGS=\$(WARN) \$(INCS)
+ CC=gcc
+ EOF
+}
+
+src_test() {
+ LUA_CPATH=./src/?.so $(usex luajit 'luajit' 'lua') tests/test.lua || die
+}
+
+src_install() {
+ local -a HTML_DOCS=( doc/us )
+ einstalldocs
+
+ emake DESTDIR="${D}" install
+}