diff options
Diffstat (limited to 'dev-lua/mpack')
-rw-r--r-- | dev-lua/mpack/Manifest | 7 | ||||
-rw-r--r-- | dev-lua/mpack/metadata.xml | 7 | ||||
-rw-r--r-- | dev-lua/mpack/mpack-1.0.4.ebuild | 2 | ||||
-rw-r--r-- | dev-lua/mpack/mpack-1.0.8-r1.ebuild | 71 | ||||
-rw-r--r-- | dev-lua/mpack/mpack-1.0.8-r100.ebuild | 98 |
5 files changed, 180 insertions, 5 deletions
diff --git a/dev-lua/mpack/Manifest b/dev-lua/mpack/Manifest index 89f58f003fe3..063b499e8c28 100644 --- a/dev-lua/mpack/Manifest +++ b/dev-lua/mpack/Manifest @@ -1,3 +1,6 @@ DIST mpack-1.0.4.tar.gz 46382 BLAKE2B 5092830e1a970ad96686ede4d96833a210543418cb23f218ba774bfd724267344f9e44e367490bb33dae8023e1145202ea6e457be7753a426eae990df906547d SHA512 8e40a562faf8b62137dec0733cbb9006fa7054e5a47bdd128fb4dfd676fac4e4385a23c3d908a4ce2edd65d673db25916695fa74bc08c5316b0c80e571a7442c -EBUILD mpack-1.0.4.ebuild 1058 BLAKE2B cc907ec09c79aaf12c09a39f88ad39edbb23b128ae0c0e90d83ecd862072acbb82fd5252f8188540788371d4bf231c64172dcca4a4836cb913cc4cd264cbc966 SHA512 94dff8c1f5154e50653cc58638902f716990175e2d579e4ac5aa866638f252a5b4a3f616037dc183f8592b7785d28b7b9912ded7105fabc4feeeeecb6f858d87 -MISC metadata.xml 249 BLAKE2B 2176c8add15ed2ad2e76def8911e581e40a5a8b0ced984020fa93a507a5478a3636be5b8053df59af367394611b4ab309fe966517286e43ae29963cea9726382 SHA512 1af3a96a7be80a3d2ee34216ac8b85c8965406212b1bd8bef97bb6adb8719f14c97227cfb8885e85ae0981aa93396be9049cf8640640e3669fc17be6c7c489ff +DIST mpack-1.0.8.tar.gz 15616 BLAKE2B 06593296d1d36459127bf35eaeb37c894a0c0c6ccff0969cd0a82bee1920a715801db26f0ba0bc54a56399d07efc262666ee4ce79878288a5c0221fd27febea1 SHA512 6d21cc6bbdee583a1d808742991459e4b1796f347b2f4eaa747b576f5bb1ca989123339120e43246bac859c20e6f46ac57116ce9f135157256fecbd8cf817f75 +EBUILD mpack-1.0.4.ebuild 1059 BLAKE2B 5263060e57633db082186e660d2fcdc16c0066a6a19c8ce87d7ce0db81fbb0ee20d4efd2975d955cca1ac097bff2aaf8c39555031d0d91481fa33a40243f3386 SHA512 1b94169795a9154cc152269af3aa56f5aadd4a50362284aec09524ecbeacb13298d91ff4fc716c9867cc6a590d02ad1debaac7bda042fc03a466fa5d2f1c7549 +EBUILD mpack-1.0.8-r1.ebuild 1647 BLAKE2B a6c7f72ec35b5da574823bb14129f8695170630545cf9f66bd66e714236d7f3758a260f60788524188c01dfecbbb544f924941ea84e2424aab9a9b337b8866a0 SHA512 fa5305fd83c17b7d20040a363afff06a2b58243b8cd8e4c0f299086ef594159539fb9c355f41e171446c37ae60294d56003644369be828d822d5ac300e4d6c7e +EBUILD mpack-1.0.8-r100.ebuild 1776 BLAKE2B d9d38dfc62cde85a87e7865e52ceff66762b4878e2a8e9d363d73162f4881e274652f99b86fd5ec7b2e72d6a2d6698e88a2a09268af958a607236d357f493947 SHA512 689bad3022e350a3e2de2132ead2bb2d139ae3a492cffb68353f139b855d1cdc1540b8bd684173b35ec40db8e8e1772dfbb93f6967643169fe622f6e88aa98e9 +MISC metadata.xml 336 BLAKE2B d2eb682d5c161942105aea7b4d1801cb98478b9c19876563ea921cf0cedaaf04a02cf756c8a5f595d52e710436e6f73e2dfe3acc10a4c9cd080415f4e1bb305a SHA512 a1ab89e3b9f01ff9112240a0a9ac945ed7391e98f5dfd4bd1ea518e0f228ae09109cd8f39fc29b36fe6ecc252dca7e0819693ce35be564421684de705dc8a4a1 diff --git a/dev-lua/mpack/metadata.xml b/dev-lua/mpack/metadata.xml index efac9884a41f..c3e9e12ed26b 100644 --- a/dev-lua/mpack/metadata.xml +++ b/dev-lua/mpack/metadata.xml @@ -1,8 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <!-- maintainer-needed --> + <maintainer type="person"> + <email>conikost@gentoo.org</email> + <name>Conrad Kostecki</name> + </maintainer> <upstream> - <remote-id type="github">libmpack/libmpack</remote-id> + <remote-id type="github">libmpack/libmpack-lua</remote-id> </upstream> </pkgmetadata> diff --git a/dev-lua/mpack/mpack-1.0.4.ebuild b/dev-lua/mpack/mpack-1.0.4.ebuild index 2e8a8290a194..0ad6a94afedf 100644 --- a/dev-lua/mpack/mpack-1.0.4.ebuild +++ b/dev-lua/mpack/mpack-1.0.4.ebuild @@ -17,7 +17,7 @@ IUSE="luajit test" RESTRICT="!test? ( test )" RDEPEND=" - !luajit? ( >=dev-lang/lua-5.1:= ) + !luajit? ( >=dev-lang/lua-5.1:0= ) luajit? ( dev-lang/luajit:2= )" DEPEND=" diff --git a/dev-lua/mpack/mpack-1.0.8-r1.ebuild b/dev-lua/mpack/mpack-1.0.8-r1.ebuild new file mode 100644 index 000000000000..6a4b3afa624e --- /dev/null +++ b/dev-lua/mpack/mpack-1.0.8-r1.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs + +MY_PN="lib${PN}-lua" + +DESCRIPTION="Lua bindings for libmpack" +HOMEPAGE="https://github.com/libmpack/libmpack/" +SRC_URI="https://github.com/${MY_PN/-lua/}/${MY_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/${MY_PN}-${PV}" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~x86" +IUSE="luajit test" +RESTRICT="!test? ( test )" + +RDEPEND=" + dev-libs/libmpack + luajit? ( dev-lang/luajit:2= ) + !luajit? ( >=dev-lang/lua-5.1:0= ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + virtual/pkgconfig + test? ( + dev-lua/busted + ${RDEPEND} + ) +" + +src_compile() { + local myemakeargs=( + "CC=$(tc-getCC)" + "LUA_INCLUDE=$($(tc-getPKG_CONFIG) --cflags $(usex luajit 'luajit' 'lua'))" + "LUA_LIB=$($(tc-getPKG_CONFIG) --libs $(usex luajit 'luajit' 'lua'))" + "USE_SYSTEM_MPACK=yes" + "USE_SYSTEM_LUA=yes" + ) + + emake "${myemakeargs[@]}" +} + +src_test() { + if use luajit; then + # "[ FAILED ] test.lua @ 279: mpack should not leak memory" + # It doesn't seem upstream actually support LuaJIT so were this up to me + # I would drop it from LUA_COMPAT, unfortunately there are packages in the + # tree which currently expect it to be supported. + ewarn "Not running tests under ${ELUA} because they are known to fail" + return + else + busted --lua=lua test.lua || die + fi +} + +src_install() { + local myemakeargs=( + "DESTDIR=${ED}" + "LUA_CMOD_INSTALLDIR=$($(tc-getPKG_CONFIG) --variable INSTALL_CMOD $(usex luajit 'luajit' 'lua'))" + "USE_SYSTEM_MPACK=yes" + "USE_SYSTEM_LUA=yes" + ) + + emake "${myemakeargs[@]}" install + + einstalldocs +} diff --git a/dev-lua/mpack/mpack-1.0.8-r100.ebuild b/dev-lua/mpack/mpack-1.0.8-r100.ebuild new file mode 100644 index 000000000000..d9777b4051fb --- /dev/null +++ b/dev-lua/mpack/mpack-1.0.8-r100.ebuild @@ -0,0 +1,98 @@ +# 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 toolchain-funcs + +MY_PN="lib${PN}-lua" + +DESCRIPTION="Lua bindings for libmpack" +HOMEPAGE="https://github.com/libmpack/libmpack/" +SRC_URI="https://github.com/${MY_PN/-lua/}/${MY_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/${MY_PN}-${PV}" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~x86" +IUSE="test" +RESTRICT="!test? ( test )" + +RDEPEND=" + dev-libs/libmpack + ${LUA_DEPS} +" +DEPEND="${RDEPEND}" +BDEPEND=" + virtual/pkgconfig + test? ( + dev-lua/busted[${LUA_USEDEP}] + ${RDEPEND} + ) +" + +src_prepare() { + default + + lua_copy_sources +} + +lua_src_compile() { + pushd "${BUILD_DIR}" || die + + local myemakeargs=( + "CC=$(tc-getCC)" + "LUA_INCLUDE=$(lua_get_CFLAGS)" + "LUA_LIB=" + "USE_SYSTEM_MPACK=yes" + "USE_SYSTEM_LUA=yes" + ) + + emake "${myemakeargs[@]}" + + popd +} + +src_compile() { + lua_foreach_impl lua_src_compile +} + +lua_src_test() { + # "[ FAILED ] test.lua @ 279: mpack should not leak memory" + # It doesn't seem upstream actually support LuaJIT so were this up to me + # I would drop it from LUA_COMPAT, unfortunately there are packages in the + # tree which currently expect it to be supported. + if [[ ${ELUA} == "luajit" ]]; then + ewarn "Not running tests under ${ELUA} because they are known to fail" + return + fi + + busted --lua="${ELUA}" test.lua || die +} + +src_test() { + lua_foreach_impl lua_src_test +} + +lua_src_install() { + pushd "${BUILD_DIR}" || die + + local myemakeargs=( + "DESTDIR=${ED}" + "LUA_CMOD_INSTALLDIR=$(lua_get_cmod_dir)" + "USE_SYSTEM_MPACK=yes" + "USE_SYSTEM_LUA=yes" + ) + + emake "${myemakeargs[@]}" install + + popd +} + +src_install() { + lua_foreach_impl lua_src_install + + einstalldocs +} |