summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConrad Kostecki <conikost@gentoo.org>2020-11-30 01:14:45 +0100
committerConrad Kostecki <conikost@gentoo.org>2020-11-30 01:16:00 +0100
commit0d903986eb9894fad0924b485402376cdbd7c4ca (patch)
tree46aca0805a001284c74127ac139554449ccc2342 /dev-lua
parentdev-lua/busted-htest: new package (diff)
downloadgentoo-0d903986eb9894fad0924b485402376cdbd7c4ca.tar.gz
gentoo-0d903986eb9894fad0924b485402376cdbd7c4ca.tar.bz2
gentoo-0d903986eb9894fad0924b485402376cdbd7c4ca.zip
dev-lua/luarocks: bump to version 3.4.0, migrate to lua eclass
Closes: https://bugs.gentoo.org/590474 Closes: https://bugs.gentoo.org/752654 Package-Manager: Portage-3.0.9, Repoman-3.0.2 Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
Diffstat (limited to 'dev-lua')
-rw-r--r--dev-lua/luarocks/Manifest1
-rw-r--r--dev-lua/luarocks/luarocks-3.4.0-r100.ebuild61
-rw-r--r--dev-lua/luarocks/luarocks-3.4.0.ebuild63
-rw-r--r--dev-lua/luarocks/metadata.xml4
4 files changed, 129 insertions, 0 deletions
diff --git a/dev-lua/luarocks/Manifest b/dev-lua/luarocks/Manifest
index dd6984a12195..6bc9964136da 100644
--- a/dev-lua/luarocks/Manifest
+++ b/dev-lua/luarocks/Manifest
@@ -1 +1,2 @@
DIST luarocks-3.3.1.tar.gz 241636 BLAKE2B fd34d7a233bbf1c5f224bd04886a7f1382d63ffc014c8b78ae7924fb799d66a32e048298deed103686771263885c85c9173c013d1bbb3bad6a48e9fd99fdaac0 SHA512 0a695ceb30ae575cbca52abd2aad9675e33a234c53c5d1e125442d874c21e0e3cf6157431f07085e4311f81833680366adfe5c626a66cb5880380b48899a116a
+DIST luarocks-3.4.0.tar.gz 244013 BLAKE2B 873c315ca3616179d20d665ceb09b8549c6f007d721581751bb4bb27d147547a52f5be1458541f9c0f936fcc3659c1d8eb253431ee0cf12530f3bef09aa838a3 SHA512 111ef93cbc4c0d79fdb26d9696b76e6b9e7fb1e30029db43feae9622cc6dd89991f1a62f87af0ca11f4043cb0d445ec73c5edf53e1af5f0d9bc4f756d4c18151
diff --git a/dev-lua/luarocks/luarocks-3.4.0-r100.ebuild b/dev-lua/luarocks/luarocks-3.4.0-r100.ebuild
new file mode 100644
index 000000000000..e13283efaff7
--- /dev/null
+++ b/dev-lua/luarocks/luarocks-3.4.0-r100.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+LUA_COMPAT=( lua5-{1..3} luajit )
+
+inherit lua-single
+
+DESCRIPTION="A package manager for the Lua programming language"
+HOMEPAGE="http://www.luarocks.org"
+SRC_URI="http://luarocks.org/releases/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
+IUSE="libressl test"
+REQUIRED_USE="${LUA_REQUIRED_USE}"
+RESTRICT="test"
+
+RDEPEND="${LUA_DEPS}"
+
+DEPEND="
+ net-misc/curl
+ libressl? ( dev-libs/libressl:0 )
+ !libressl? ( dev-libs/openssl:0 )
+ ${RDEPEND}
+"
+
+BDEPEND="
+ virtual/pkgconfig
+ test? (
+ $(lua_gen_cond_dep '>=dev-lua/busted-2.0.0-r100[${LUA_USEDEP}]')
+ $(lua_gen_cond_dep '>=dev-lua/busted-htest-1.0.0-r100[${LUA_USEDEP}]')
+ ${RDEPEND}
+ )
+"
+
+src_configure() {
+ local myeconfargs=(
+ "--prefix=${EPRIFIX}/usr"
+ "--rocks-tree=$(lua_get_lmod_dir)"
+ "--with-lua-include=$(lua_get_include_dir)"
+ "--with-lua-interpreter=${ELUA}"
+ "--with-lua-lib=$(lua_get_cmod_dir)"
+ )
+
+ # Since the configure script is handcrafted,
+ # and yells at unknown options, do not use 'econf'.
+ ./configure "${myeconfargs[@]}" || die
+}
+
+src_test() {
+ busted --lua=${ELUA} || die
+}
+
+src_install() {
+ default
+
+ { find "${D}" -type f -exec sed -i -e "s:${D}::g" {} \;; } || die
+}
diff --git a/dev-lua/luarocks/luarocks-3.4.0.ebuild b/dev-lua/luarocks/luarocks-3.4.0.ebuild
new file mode 100644
index 000000000000..e1ebfcab4448
--- /dev/null
+++ b/dev-lua/luarocks/luarocks-3.4.0.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs
+
+DESCRIPTION="A package manager for the Lua programming language"
+HOMEPAGE="http://www.luarocks.org"
+SRC_URI="http://luarocks.org/releases/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
+IUSE="luajit libressl test"
+REQUIRED_USE="${LUA_REQUIRED_USE}"
+RESTRICT="test"
+
+RDEPEND="
+ luajit? ( dev-lang/luajit:2 )
+ !luajit? ( >=dev-lang/lua-5.1:0 )
+"
+
+DEPEND="
+ net-misc/curl
+ libressl? ( dev-libs/libressl:0 )
+ !libressl? ( dev-libs/openssl:0 )
+ ${RDEPEND}
+"
+
+BDEPEND="
+ virtual/pkgconfig
+ test? (
+ dev-lua/busted
+ dev-lua/busted-htest
+ ${RDEPEND}
+ )
+"
+
+src_configure() {
+ "--with-lua-interpreter=${ELUA}"
+ local myeconfargs=(
+ "--prefix=${EPRIFIX}/usr"
+ "--rocks-tree=$($(tc-getPKG_CONFIG) --variable INSTALL_LMOD $(usex luajit 'luajit' 'lua'))"
+ "--with-lua-include=$($(tc-getPKG_CONFIG) --variable $(usex luajit 'includedir' 'INSTALL_INC') $(usex luajit 'luajit' 'lua'))"
+ "--with-lua-interpreter=$(usex luajit 'luajit' 'lua')"
+ "--with-lua-lib=$($(tc-getPKG_CONFIG) --variable INSTALL_CMOD $(usex luajit 'luajit' 'lua'))"
+ )
+
+ # Since the configure script is handcrafted,
+ # and yells at unknown options, do not use 'econf'.
+ ./configure "${myeconfargs[@]}" || die
+}
+
+src_test() {
+ busted --lua=${ELUA} || die
+}
+
+src_install() {
+ default
+
+ { find "${D}" -type f -exec sed -i -e "s:${D}::g" {} \;; } || die
+}
diff --git a/dev-lua/luarocks/metadata.xml b/dev-lua/luarocks/metadata.xml
index da7ced9078f6..e3ced5af4244 100644
--- a/dev-lua/luarocks/metadata.xml
+++ b/dev-lua/luarocks/metadata.xml
@@ -2,6 +2,10 @@
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
+ <email>conikost@gentoo.org</email>
+ <name>Conrad Kostecki</name>
+ </maintainer>
+ <maintainer type="person">
<email>vpayno+gentoo@gmail.com</email>
<name>Victor Payno</name>
</maintainer>