diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-12-14 13:26:14 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-12-14 13:26:14 +0000 |
commit | 6abbf81ef2f298e3221ff5e67a1f3c5f23958212 (patch) | |
tree | 25413d1cb3a0cbfe36029db32398c0f333609215 /dev-lua/lgi | |
parent | 9c417bacd51da6d8b57fa9f37425161d30d4b95b (diff) |
gentoo resync : 14.12.2020
Diffstat (limited to 'dev-lua/lgi')
-rw-r--r-- | dev-lua/lgi/Manifest | 3 | ||||
-rw-r--r-- | dev-lua/lgi/lgi-0.9.2-r100.ebuild | 124 | ||||
-rw-r--r-- | dev-lua/lgi/lgi-0.9.2.ebuild | 2 |
3 files changed, 127 insertions, 2 deletions
diff --git a/dev-lua/lgi/Manifest b/dev-lua/lgi/Manifest index eade3afaa91d..a6ec2e4f3c69 100644 --- a/dev-lua/lgi/Manifest +++ b/dev-lua/lgi/Manifest @@ -1,3 +1,4 @@ DIST lgi-0.9.2.tar.gz 291463 BLAKE2B d89752e7c56f9a695f97f90680515fd9acab57991121ec3455fcd88aa0b64828f060d9bf222fb1ab14bdfc956ec3ad296af848168532d09694a0cacbb55dac71 SHA512 755a96b78530f42da6d4e2664f8e37cb07a356419e7e6448003c3f841c9d98ad18b851715d9eb203ea7eb27b13ec46223fa8a1c90a99fd12960ce85b0a695335 -EBUILD lgi-0.9.2.ebuild 1373 BLAKE2B 4bde8c79ed73ec22ce73d2c4fe0f4cafb468e077e84d8f01ab5b02941e938241cd3608971bc936ffa17681fe0de5eb08c0db17a4d09a9c687f51bb05b59f4309 SHA512 d4227622ea9f1b858d38bf1301e12235718468b8fd4e62ecdf4b76840b82845b41d463e0894e5c02eda044fee2365579f1aa0fc26b0ee31c3766d27507792ecd +EBUILD lgi-0.9.2-r100.ebuild 2551 BLAKE2B 8ac666e9640fe20642da7e0abff1ccd9279e6789db1d70fdedd8fe8941afc785ee60734398aeedee8051154947b1879ba2441cb9c1d34af850487c810c83e1a7 SHA512 fc2ba268ce95582ba7d81c917d3723cf3d097a6d2aa5ca5094b877916746592267a8a52670cb793e3ca3cac366b9e0d89635fe275effaae26dd3292862484a55 +EBUILD lgi-0.9.2.ebuild 1374 BLAKE2B f5133eb162c385d7c00e5bc037219781329449abeaa09bec7ddd9990f6f18f4f72df7d98f8b62cf30019f947ff81f165bdbb21c4030d285afb1b57179907b5af SHA512 f7ceabdf5190a744af5e5325e04d205f3782756493849d234b7ede4cda5af8019fa816cf780d1125137404b8b91fe8f8a3e508716e6bf5217f215a18a847cc85 MISC metadata.xml 301 BLAKE2B 972432d1e9e34193df27c31d01aa620d72350b1bbcf383894e65aa0fdf207bc5ad4064f289c4feb7cbe7522aefa157b5cf2d25d00df09fd62c1ffa45db9ce377 SHA512 295eba832f4a3e1c9bd1ff7349fadff65a0d887ec4df25fcd7ce975504ddaf7efe5789492bdd54f3c6e077e8612dab3f3b8abba710bbabeb2ead89d60f0370f3 diff --git a/dev-lua/lgi/lgi-0.9.2-r100.ebuild b/dev-lua/lgi/lgi-0.9.2-r100.ebuild new file mode 100644 index 000000000000..908e5804dfbd --- /dev/null +++ b/dev-lua/lgi/lgi-0.9.2-r100.ebuild @@ -0,0 +1,124 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +VIRTUALX_REQUIRED="manual" +LUA_COMPAT=( lua5-{1..3} luajit ) + +inherit lua eutils toolchain-funcs flag-o-matic virtualx + +DESCRIPTION="Lua bindings using gobject-introspection" +HOMEPAGE="https://github.com/pavouk/lgi" +SRC_URI="https://github.com/pavouk/lgi/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86" +IUSE="examples test" +RESTRICT="!test? ( test )" +REQUIRED_USE="${LUA_REQUIRED_USE}" + +BDEPEND="${LUA_DEPS}" +RDEPEND="${LUA_DEPS} + dev-libs/gobject-introspection + dev-libs/glib + dev-libs/libffi:0=" +DEPEND="${RDEPEND} + test? ( + x11-libs/cairo[glib] + x11-libs/gtk+[introspection] + ${VIRTUALX_DEPEND} + )" + +lua_src_prepare() { + pushd "${BUILD_DIR}" || die + # The Makefile & several source files use the LUA version as part of the + # direct filename, dynamically created, and we respect that. + _slug=${ELUA} + _slug=${_slug/.} + _slug=${_slug/-} + _slug=${_slug/_} + + # Makefile: CORE = corelgilua51.so (and similar lines) + sed -r -i \ + -e "/^CORE\>/s,lua5.,${_slug},g" \ + lgi/Makefile \ + || die "sed failed" + + # ./lgi/core.lua:local core = require 'lgi.corelgilua51' + # ./lgi/core.c:luaopen_lgi_corelgilua51 (lua_State* L) + sed -r -i \ + -e "/lgi.corelgilua5./s,lua5.,${_slug},g" \ + lgi/core.lua \ + lgi/core.c \ + || die "sed failed" + + # Verify the change as it's important! + for f in lgi/core.lua lgi/core.c lgi/Makefile ; do + grep -sq "corelgi${_slug}" "${f}" || die "Failed to sed .lua & .c for corelgi${_slug}: ${f}" + done + + # Cleanup + unset _slug + popd +} + +src_prepare() { + default + lua_copy_sources + lua_foreach_impl lua_src_prepare +} + +lgi_emake_wrapper() { + emake \ + CC="$(tc-getCC)" \ + COPTFLAGS="-Wall -Wextra ${CFLAGS}" \ + LIBFLAG="-shared ${LDFLAGS}" \ + LUA_CFLAGS="$(lua_get_CFLAGS)" \ + LUA="${LUA}" \ + LUA_VERSION="${ELUA#lua}" \ + LUA_LIBDIR="$(lua_get_cmod_dir)" \ + LUA_SHAREDIR="$(lua_get_lmod_dir)" \ + "$@" +} + +lua_src_compile() { + pushd "${BUILD_DIR}" || die + lgi_emake_wrapper all + popd +} + +src_compile() { + lua_foreach_impl lua_src_compile +} + +lua_src_test() { + pushd "${BUILD_DIR}" || die + virtx \ + lgi_emake_wrapper \ + check + popd +} + +src_test() { + lua_foreach_impl lua_src_test +} + +lua_src_install() { + pushd "${BUILD_DIR}" || die + lgi_emake_wrapper \ + DESTDIR="${D}" \ + install + popd +} + +src_install() { + lua_foreach_impl lua_src_install + docompress -x /usr/share/doc/${PF} + dodoc README.md + dodoc -r docs/* + if use examples; then + dodoc -r samples + fi +} diff --git a/dev-lua/lgi/lgi-0.9.2.ebuild b/dev-lua/lgi/lgi-0.9.2.ebuild index 6c84cc232046..aa535b2deae0 100644 --- a/dev-lua/lgi/lgi-0.9.2.ebuild +++ b/dev-lua/lgi/lgi-0.9.2.ebuild @@ -18,7 +18,7 @@ IUSE="examples test" RESTRICT="!test? ( test )" BDEPEND="virtual/pkgconfig" -RDEPEND=">=dev-lang/lua-5.1:= +RDEPEND=">=dev-lang/lua-5.1:0= dev-libs/gobject-introspection dev-libs/glib dev-libs/libffi:0=" |