From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 0E3A3158094 for ; Tue, 28 Jun 2022 09:05:26 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1FFC6E0AB5; Tue, 28 Jun 2022 09:05:25 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id EDCA3E0AB5 for ; Tue, 28 Jun 2022 09:05:24 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1C5E0340E30 for ; Tue, 28 Jun 2022 09:05:24 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6B960514 for ; Tue, 28 Jun 2022 09:05:22 +0000 (UTC) From: "Miroslav Šulc" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Miroslav Šulc" Message-ID: <1656407112.8da2a0947bca1b02d41d35e020c3289083eb255e.fordfrog@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/redland-bindings/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-libs/redland-bindings/redland-bindings-1.0.17.1-r101.ebuild X-VCS-Directories: dev-libs/redland-bindings/ X-VCS-Committer: fordfrog X-VCS-Committer-Name: Miroslav Šulc X-VCS-Revision: 8da2a0947bca1b02d41d35e020c3289083eb255e X-VCS-Branch: master Date: Tue, 28 Jun 2022 09:05:22 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: c0b5ae5c-27c7-472e-95ed-5638c393430a X-Archives-Hash: fff715127d72706b3b04ee6fe921e30e commit: 8da2a0947bca1b02d41d35e020c3289083eb255e Author: Miroslav Šulc gentoo org> AuthorDate: Tue Jun 28 09:05:12 2022 +0000 Commit: Miroslav Šulc gentoo org> CommitDate: Tue Jun 28 09:05:12 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8da2a094 dev-libs/redland-bindings: eapi8, added python 3.10 & 3.11, deps versions cleanup Bug: https://bugs.gentoo.org/845669 Signed-off-by: Miroslav Šulc gentoo.org> .../redland-bindings-1.0.17.1-r101.ebuild | 188 +++++++++++++++++++++ 1 file changed, 188 insertions(+) diff --git a/dev-libs/redland-bindings/redland-bindings-1.0.17.1-r101.ebuild b/dev-libs/redland-bindings/redland-bindings-1.0.17.1-r101.ebuild new file mode 100644 index 000000000000..169122ec6cd4 --- /dev/null +++ b/dev-libs/redland-bindings/redland-bindings-1.0.17.1-r101.ebuild @@ -0,0 +1,188 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LUA_COMPAT=( lua5-{1..4} luajit ) +PYTHON_COMPAT=( python3_{8..11} ) + +USE_PHP="php7-4" +PHP_EXT_ECONF_ARGS="--with-php=yes --without-lua --without-perl --without-python --without-ruby" +PHP_EXT_NAME="redland" +PHP_EXT_OPTIONAL_USE="php" +PHP_EXT_SKIP_PATCHES="yes" +PHP_EXT_SKIP_PHPIZE="yes" + +inherit lua php-ext-source-r3 python-single-r1 autotools + +DESCRIPTION="Language bindings for Redland" +HOMEPAGE="http://librdf.org/bindings/" +SRC_URI="http://download.librdf.org/source/${P}.tar.gz" + +LICENSE="Apache-2.0 GPL-2 LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-linux" +IUSE="lua perl python php ruby test" +REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} ) + python? ( ${PYTHON_REQUIRED_USE} )" +RESTRICT="!test? ( test )" + +BDEPEND="sys-apps/sed + virtual/pkgconfig" + +RDEPEND="dev-libs/redland + lua? ( ${LUA_DEPS} ) + perl? ( dev-lang/perl:= ) + python? ( ${PYTHON_DEPS} ) + ruby? ( dev-lang/ruby:* dev-ruby/log4r ) + php? ( + php_targets_php7-4? ( dev-lang/php:7.4[-threads] ) + )" + +DEPEND="${RDEPEND} + dev-lang/swig + test? ( + dev-libs/redland[berkdb] + )" + +PATCHES=( + "${FILESDIR}"/${P}-bool.patch + "${FILESDIR}"/${PN}-1.0.17.1-php-config-r1.patch + "${FILESDIR}"/${PN}-1.0.17.1-add-PHP7-support.patch +) + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +src_prepare() { + default + + eautoreconf + + # As of version 1.0.17.1, out-of-tree builds fail with: + # "error: redland_wrap.c: No such file or directory", + # have to copy the sources. + use lua && lua_copy_sources + + use php && php-ext-source-r3_src_prepare +} + +lua_src_configure() { + pushd "${BUILD_DIR}" > /dev/null || die + + econf \ + --with-lua="${ELUA}" \ + --without-perl \ + --without-php \ + --without-python \ + --without-ruby + + popd > /dev/null || die +} + +src_configure() { + if use perl || use python || use ruby ; then + econf \ + $(use_with lua) \ + $(use_with perl) \ + $(use_with python) \ + --without-php \ + $(use_with ruby) + fi + + if use lua; then + lua_foreach_impl lua_src_configure + fi + + use php && php-ext-source-r3_src_configure +} + +lua_src_compile() { + pushd "${BUILD_DIR}" > /dev/null || die + + default_src_compile + + popd > /dev/null || die +} + +src_compile() { + if use perl || use python || use ruby ; then + default + fi + + if use lua; then + lua_foreach_impl lua_src_compile + fi + + use php && php-ext-source-r3_src_compile +} + +lua_src_test() { + pushd "${BUILD_DIR}" > /dev/null || die + + default_src_test + + popd > /dev/null || die +} + +src_test() { + if use perl || use python || use ruby ; then + default + fi + + if use lua; then + lua_foreach_impl lua_src_test + fi + + if use php ; then + local slot + for slot in $(php_get_slots) ; do + php_init_slot_env "${slot}" + cd php || die + ${PHPCLI} -v + ${PHPCLI} -d "extension=./${PHP_EXT_NAME}.so" -f test.php || die "PHP tests for ${slot} failed!" + cd "${S}" || die + done + fi +} + +lua_src_install() { + pushd "${BUILD_DIR}" > /dev/null || die + + emake DESTDIR="${D}" INSTALLDIRS=vendor luadir="$(lua_get_cmod_dir)" install + + popd > /dev/null || die +} + +src_install() { + if use perl || use python || use ruby ; then + emake DESTDIR="${D}" INSTALLDIRS=vendor install + fi + + if use lua; then + lua_foreach_impl lua_src_install + fi + + if use perl; then + find "${ED}" -type f -name perllocal.pod -delete + find "${ED}" -depth -mindepth 1 -type d -empty -delete + fi + + use python && python_optimize + + if use php; then + local slot + for slot in $(php_get_slots); do + php_init_slot_env "${slot}" + exeinto "${EXT_DIR#$EPREFIX}" + doexe "php/${PHP_EXT_NAME}.so" + done + + php-ext-source-r3_createinifiles + fi + + local DOCS=( AUTHORS ChangeLog NEWS README TODO ) + local HTML_DOCS=( {NEWS,README,RELEASE,TODO}.html ) + einstalldocs +}