From: "Robin H. Johnson" <robbat2@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lua/lgi/
Date: Sun, 29 Nov 2020 00:28:16 +0000 (UTC) [thread overview]
Message-ID: <1606609694.0e95c6e912a781a82fa7394ca5a4aa0dc92b2b8b.robbat2@gentoo> (raw)
commit: 0e95c6e912a781a82fa7394ca5a4aa0dc92b2b8b
Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 29 00:27:10 2020 +0000
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Sun Nov 29 00:28:14 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e95c6e9
dev-lua/lgi: revbump with slotted lua support
Builds & passes all src_test runs with Xvfb on lua5.1..5.3.
Not tested with luajit, but presumed to work.
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
dev-lua/lgi/lgi-0.9.2-r100.ebuild | 124 ++++++++++++++++++++++++++++++++++++++
1 file changed, 124 insertions(+)
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 00000000000..908e5804dfb
--- /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
+}
next reply other threads:[~2020-11-29 0:28 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-29 0:28 Robin H. Johnson [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-12-05 17:24 [gentoo-commits] repo/gentoo:master commit in: dev-lua/lgi/ WANG Xuerui
2022-02-15 23:38 Conrad Kostecki
2021-09-18 12:29 Marek Szuba
2021-03-26 19:46 Conrad Kostecki
2020-12-03 13:50 Marek Szuba
2020-11-16 22:53 Sergei Trofimovich
2020-09-19 16:40 Aaron Bauman
2020-09-13 21:03 Sam James
2020-08-05 13:53 Agostino Sarubbo
2020-08-04 4:21 Sam James
2020-08-02 11:48 Sergei Trofimovich
2019-11-13 2:10 Aaron Bauman
2019-11-02 4:41 Robin H. Johnson
2019-09-20 19:08 Sergei Trofimovich
2019-09-19 7:40 Sergei Trofimovich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1606609694.0e95c6e912a781a82fa7394ca5a4aa0dc92b2b8b.robbat2@gentoo \
--to=robbat2@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox