summaryrefslogtreecommitdiff
path: root/sci-libs/libsigrok
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-06-11 14:17:10 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-06-11 14:17:10 +0100
commit5adfd733728a4f14df5665f4c2a604a7356e5f19 (patch)
treef2938c4a08576b45508b02481edfec55eac3ac8b /sci-libs/libsigrok
parentfbba40085f5d1591a67b49f5aa48b4071b7560f1 (diff)
gentoo auto-resync : 11:06:2023 - 14:17:09
Diffstat (limited to 'sci-libs/libsigrok')
-rw-r--r--sci-libs/libsigrok/Manifest2
-rw-r--r--sci-libs/libsigrok/files/libsigrok-0.5.2-swig-4.1.patch11
-rw-r--r--sci-libs/libsigrok/libsigrok-0.5.2-r4.ebuild156
3 files changed, 169 insertions, 0 deletions
diff --git a/sci-libs/libsigrok/Manifest b/sci-libs/libsigrok/Manifest
index 93821420f842..bca68a6a7105 100644
--- a/sci-libs/libsigrok/Manifest
+++ b/sci-libs/libsigrok/Manifest
@@ -1,6 +1,8 @@
AUX libsigrok-0.5.2-check-0.15.patch 917 BLAKE2B 39d042e99dc5a71fa79def033f7a30621967294ed8198b00ca9e7a21caf7ee77f07e3f6d1e27c3a4d2629539835ec1b4e7bc3fdfe2ce1e98d7e97b4a897131ce SHA512 1729653f153ebdec08c0b987a0cf15a50ed6ce8948805b2a9ddf122ba591426e830329bfb47527ef253c19f9b8e98693ab0258e9ac19906473d3605d61c8983d
+AUX libsigrok-0.5.2-swig-4.1.patch 377 BLAKE2B f795f46bce213e9444ea3d8b362a4d82d3e34676a9aae49f45764679effa388afcc15bc04e14fdc89cb25fbd700ca3bf80234b291c3607b0454ecf997d20997d SHA512 0334cbb95fbba961d9f16b18978dd15dbf68b80b897af54d25660dd0bcb049d21ea681f39bae3884c4869ecce4efd2601bce7825fbd41160ddddbe92ad678740
AUX libsigrok-0.5.2-swig-4.patch 1484 BLAKE2B 94c9bbde14f3175252677dedd50a7f3ff17bcc734382d93fbe3c65c71989dc72d0568535343bcb7764053075a2bac9c9f2d4e480d582a5371ac0d4a12bcab4a2 SHA512 34e568351624aeada4c3894be8a60cc0111be7c20ebe8e5395a1f81b2fc453a6a8228f575b95faad5140162a9d4fc5fc570546f42673f7275cb3910c73ffc8de
DIST libsigrok-0.5.2.tar.gz 1779465 BLAKE2B fc6fdde1054e9ac50bc42249c34b3dbfff1e89d77f0db5a8762e52fcf2ea5ea69b2defcf1cde4ed7b1edd1e21770002ed661a470c8d666904daa48a84a2bbfc5 SHA512 cf673dad6280302d69050c29490621f66c6d6a73932d019a53ec3501316d3f2e23e7667a04f866dbe6ed73f86a63de73d2173e2b6cea563631d705e06f887092
EBUILD libsigrok-0.5.2-r3.ebuild 3398 BLAKE2B b5b98b69ebaed5cfd798b817da5d707d91133c802a0b2689d5cb72b487a7438e779e8157c5ce7862b410fe0a93d79e684367111f30b5d0f93950eab45e540e37 SHA512 c7490bef89a1474f539d9e243f90370edad1e8e8b1519a1110290ed3ad83b03b42cb2e83949ea3e3fade5d8ad1cb3c2f5c8831a01046a23ad9838560d45a637c
+EBUILD libsigrok-0.5.2-r4.ebuild 3475 BLAKE2B 78cd382cafb7664cd8b7f2eaa636cadbdd977c849d21937328f6ffa25e3e7f1fe7277e778e0f0d9f3b1080f2a438f6728ba58633bc0245be4b1fda38cd99079f SHA512 864b4c3e3c8fa0f486af3de2a38feabef8bfe6321964718a5e758261153d7ab9c3a7c6b2239bc50d8a4642b6341687d590a4a9467303958565a85894709ebca6
EBUILD libsigrok-9999.ebuild 3315 BLAKE2B 9545f2fe112cf738746ca97ac6ff2d7d6fcf3607cf1fb700173230e9e0ff23a0c78b510c67063cbbcf30e0699fb8f4d0f4a3b2c26aeb7ae734f6be9251f88d02 SHA512 ef0d1c82b5e108ee023d2acb5f10399161989d5be18bacddaee753c505c9769c11958fc45f2db967ad8b1453adc7f9941a739e207b614624571e805558f79bf3
MISC metadata.xml 886 BLAKE2B cb7cece1f79a4affb612e55f147eb93895a805e43aed6bbabfed2e3b925b0714d64651c00294da2742f8c09ce9984a58888b89025d73712400c8bd026296b2cb SHA512 79c9697b3fe6954108cb60ae79c06cee280ef6d73bcd9e35ab148750a4fa55c8e5118c21cdb4e3ae009d4c160a26c98132448476ef90ac6d7a19a79138c3b2f6
diff --git a/sci-libs/libsigrok/files/libsigrok-0.5.2-swig-4.1.patch b/sci-libs/libsigrok/files/libsigrok-0.5.2-swig-4.1.patch
new file mode 100644
index 000000000000..6513491270cf
--- /dev/null
+++ b/sci-libs/libsigrok/files/libsigrok-0.5.2-swig-4.1.patch
@@ -0,0 +1,11 @@
+https://bugs.gentoo.org/878395
+--- a/bindings/cxx/enums.py
++++ b/bindings/cxx/enums.py
+@@ -73,6 +73,8 @@
+ code = open(os.path.join(outdirname, 'cxx/enums.cpp'), 'w')
+ swig = open(os.path.join(outdirname, 'swig/enums.i'), 'w')
+
++print('%include "attribute.i" \n', file=swig)
++
+ for file in (header, code):
+ print("/* Generated file - edit enums.py instead! */", file=file)
diff --git a/sci-libs/libsigrok/libsigrok-0.5.2-r4.ebuild b/sci-libs/libsigrok/libsigrok-0.5.2-r4.ebuild
new file mode 100644
index 000000000000..8da4999fe538
--- /dev/null
+++ b/sci-libs/libsigrok/libsigrok-0.5.2-r4.ebuild
@@ -0,0 +1,156 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="8"
+
+PYTHON_COMPAT=( python3_{9..11} )
+
+inherit autotools python-r1 java-pkg-opt-2 udev xdg-utils
+
+if [[ ${PV} == *9999* ]]; then
+ EGIT_REPO_URI="git://sigrok.org/${PN}"
+ inherit git-r3
+else
+ SRC_URI="https://sigrok.org/download/source/${PN}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+fi
+
+DESCRIPTION="Basic hardware drivers for logic analyzers and input/output file format support"
+HOMEPAGE="https://sigrok.org/wiki/Libsigrok"
+
+LICENSE="GPL-3"
+SLOT="0/4"
+IUSE="bluetooth +cxx ftdi hidapi java parport python serial static-libs test +udev usb"
+REQUIRED_USE="java? ( cxx )
+ python? ( cxx ${PYTHON_REQUIRED_USE} )"
+
+RESTRICT="!test? ( test )"
+
+# We also support librevisa, but that isn't in the tree ...
+LIB_DEPEND="
+ >=dev-libs/glib-2.32.0[static-libs(+)]
+ >=dev-libs/libzip-0.8:=[static-libs(+)]
+ bluetooth? ( >=net-wireless/bluez-4.0:= )
+ cxx? ( dev-cpp/glibmm:2[static-libs(+)] )
+ ftdi? ( dev-embedded/libftdi:1[static-libs(+)] )
+ hidapi? ( >=dev-libs/hidapi-0.8.0 )
+ parport? ( sys-libs/libieee1284[static-libs(+)] )
+ python? (
+ ${PYTHON_DEPS}
+ >=dev-python/pygobject-3.0.0[${PYTHON_USEDEP}]
+ )
+ serial? ( >=dev-libs/libserialport-0.1.1[static-libs(+)] )
+ usb? ( virtual/libusb:1[static-libs(+)] )
+"
+RDEPEND="
+ java? ( >=virtual/jre-1.8:* )
+ !static-libs? ( ${LIB_DEPEND//\[static-libs(+)]} )
+ static-libs? ( ${LIB_DEPEND} )
+"
+DEPEND="${LIB_DEPEND//\[static-libs(+)]}
+ cxx? ( app-doc/doxygen )
+ java? (
+ >=dev-lang/swig-3.0.6
+ >=virtual/jdk-1.8:*
+ )
+ python? (
+ >=dev-lang/swig-3.0.6
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ )
+ test? ( >=dev-libs/check-0.9.4 )
+ virtual/pkgconfig
+"
+
+S="${WORKDIR}"/${P}
+
+PATCHES=(
+ # https://sigrok.org/bugzilla/show_bug.cgi?id=1527
+ "${FILESDIR}/${P}-swig-4.patch"
+ # https://sigrok.org/bugzilla/show_bug.cgi?id=1526
+ "${FILESDIR}/${P}-check-0.15.patch"
+ # https://bugs.gentoo.org/878395
+ "${FILESDIR}/${PN}-0.5.2-swig-4.1.patch"
+)
+
+pkg_setup() {
+ use python && python_setup
+ java-pkg-opt-2_pkg_setup
+}
+
+src_unpack() {
+ [[ ${PV} == *9999* ]] && git-r3_src_unpack || default
+}
+
+sigrok_src_prepare() {
+ eautoreconf
+}
+
+src_prepare() {
+ default
+ sigrok_src_prepare
+ use python && python_copy_sources
+}
+
+sigrok_src_configure() {
+ econf \
+ $(use_with bluetooth libbluez) \
+ $(use_with ftdi libftdi) \
+ $(use_with hidapi libhidapi) \
+ $(use_with parport libieee1284) \
+ $(use_with serial libserialport) \
+ $(use_with usb libusb) \
+ $(use_enable cxx) \
+ $(use_enable java) \
+ $(use_enable static-libs static) \
+ "${@}"
+}
+
+each_python_configure() {
+ cd "${BUILD_DIR}"
+ sigrok_src_configure --disable-ruby --enable-python
+}
+
+src_configure() {
+ sigrok_src_configure --disable-ruby --disable-python
+ use python && python_foreach_impl each_python_configure
+}
+
+each_python_compile() {
+ cd "${BUILD_DIR}"
+ emake python-build
+}
+
+src_compile() {
+ default
+ use python && python_foreach_impl each_python_compile
+}
+
+src_test() {
+ emake check
+}
+
+each_python_install() {
+ cd "${BUILD_DIR}"
+ emake python-install DESTDIR="${D}"
+ python_optimize
+}
+
+src_install() {
+ default
+ use python && python_foreach_impl each_python_install
+ use udev && udev_dorules contrib/*.rules
+ find "${D}" -name '*.la' -type f -delete || die
+}
+
+pkg_postinst() {
+ xdg_icon_cache_update
+ xdg_mimeinfo_database_update
+ udev_reload
+}
+
+pkg_postrm() {
+ xdg_icon_cache_update
+ xdg_mimeinfo_database_update
+ udev_reload
+}