summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2022-08-16 10:12:20 -0400
committerAnthony G. Basile <blueness@gentoo.org>2022-08-16 10:12:20 -0400
commit71322ac179aa1c261ce14331972c51b18cda7ab0 (patch)
treed8cd4b2c943d09dcbd4691dcfa3236666c384b3b
parentsys-fs/f2fs-tools: add live ebuild (diff)
downloadgentoo-71322ac179aa1c261ce14331972c51b18cda7ab0.tar.gz
gentoo-71322ac179aa1c261ce14331972c51b18cda7ab0.tar.bz2
gentoo-71322ac179aa1c261ce14331972c51b18cda7ab0.zip
dev-libs/libgpiod: switch to more forgiving linux-info
Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
-rw-r--r--dev-libs/libgpiod/libgpiod-1.6.3-r2.ebuild53
1 files changed, 53 insertions, 0 deletions
diff --git a/dev-libs/libgpiod/libgpiod-1.6.3-r2.ebuild b/dev-libs/libgpiod/libgpiod-1.6.3-r2.ebuild
new file mode 100644
index 00000000000..ef44116bea4
--- /dev/null
+++ b/dev-libs/libgpiod/libgpiod-1.6.3-r2.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit linux-info multilib-minimal
+
+DESCRIPTION="C library and tools for interacting with the linux GPIO character device"
+HOMEPAGE="https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/"
+SRC_URI="https://mirrors.edge.kernel.org/pub/software/libs/libgpiod/${P}.tar.xz"
+
+LICENSE="LGPL-2.1"
+# Reflects the ABI of libgpiod.so
+SLOT="0/2"
+KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86"
+IUSE="static-libs +tools cxx python test"
+RESTRICT="!test? ( test )"
+
+# --enable-tests enable libgpiod tests [default=no]
+# --enable-bindings-cxx enable C++ bindings [default=no]
+# --enable-bindings-python
+
+pkg_setup() {
+ CONFIG_CHECK="GPIO_CDEV_V1"
+ linux-info_pkg_setup
+}
+
+multilib_src_configure() {
+ local myconf=(
+ $(use_enable tools)
+ $(use_enable cxx bindings-cxx)
+ $(use_enable test tests)
+ $(multilib_native_use_enable python bindings-python)
+ )
+
+ if ! multilib_is_native_abi; then
+ myconf+=(
+ --disable-tools
+ )
+ fi
+
+ ECONF_SOURCE="${S}" econf "${myconf[@]}"
+}
+
+multilib_src_install() {
+ default
+
+ find "${D}" -name '*.la' -type f -delete || die
+
+ if ! use static-libs; then
+ find "${D}" -name "*.a" -delete || die
+ fi
+}