* [gentoo-commits] repo/gentoo:master commit in: sci-libs/libsigrok/, sci-libs/libsigrok/files/
@ 2020-07-06 18:16 Andreas Sturmlechner
0 siblings, 0 replies; 4+ messages in thread
From: Andreas Sturmlechner @ 2020-07-06 18:16 UTC (permalink / raw
To: gentoo-commits
commit: d444c133186ee28d7b6ef65d27c692378c93a372
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 5 22:20:04 2020 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Jul 6 18:15:24 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d444c133
sci-libs/libsigrok: Fix build with IUSE=ruby
Closes: https://bugs.gentoo.org/705074
Package-Manager: Portage-2.3.103, Repoman-2.3.23
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
.../files/libsigrok-0.5.2-ruby-swig-docs.patch | 63 ++++++++++++++++++++++
sci-libs/libsigrok/libsigrok-0.5.2.ebuild | 8 ++-
2 files changed, 69 insertions(+), 2 deletions(-)
diff --git a/sci-libs/libsigrok/files/libsigrok-0.5.2-ruby-swig-docs.patch b/sci-libs/libsigrok/files/libsigrok-0.5.2-ruby-swig-docs.patch
new file mode 100644
index 00000000000..808227a2fff
--- /dev/null
+++ b/sci-libs/libsigrok/files/libsigrok-0.5.2-ruby-swig-docs.patch
@@ -0,0 +1,63 @@
+From bae9308ec157378bd22ce4f4a0226f1e7ef23594 Mon Sep 17 00:00:00 2001
+From: Anatol Pomozov <anatol.pomozov@gmail.com>
+Date: Mon, 8 Jun 2020 20:46:44 -0700
+Subject: [PATCH] Fix ruby SWIG bindings generation
+
+bindings/swig/doc.py generates a swig interface file for ruby bindings
+that includes docstrings with comments braces ( /* and */ ) like this:
+
+ %feature("docstring") sigrok::Channel::type "/* Type of this channel. */\n";
+ %feature("docstring") sigrok::Channel::enabled "/* Enabled status of this channel. */\n";
+
+SWIG generates *.cxx and adds its own braces to the docstring:
+
+/*/* Document-class: Sigrok::Error
+Exception thrown when an error code is returned by any libsigrok call. */
+*/
+
+this causes compilation error for Ruby bindings.
+
+To fix the error we should not add extra braces to the docstring.
+With this patch libsigrok compiles fine with with ruby 2.7 and swig 4.0.2.
+
+Fixes bug #1526
+
+Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
+---
+ bindings/swig/doc.py | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/bindings/swig/doc.py b/bindings/swig/doc.py
+index e8767af8..182f5477 100644
+--- a/bindings/swig/doc.py
++++ b/bindings/swig/doc.py
+@@ -46,7 +46,7 @@ for compound in index.findall('compound'):
+ if language == 'python':
+ print('%%feature("docstring") %s "%s";' % (class_name, brief))
+ elif language == 'ruby':
+- print('%%feature("docstring") %s "/* Document-class: %s\\n%s */\\n";' % (class_name, class_name.replace("sigrok", "Sigrok", 1), brief))
++ print('%%feature("docstring") %s "Document-class: %s\\n%s\\n";' % (class_name, class_name.replace("sigrok", "Sigrok", 1), brief))
+ elif language == 'java':
+ print('%%typemap(javaclassmodifiers) %s "/** %s */\npublic class"' % (
+ class_name, brief))
+@@ -77,10 +77,10 @@ for compound in index.findall('compound'):
+ for name, desc in parameters.items()]) + '";')
+ if language == 'ruby' and kind == 'public-func':
+ print(str.join('\n', [
+- '%%feature("docstring") %s::%s "/* %s' % (
++ '%%feature("docstring") %s::%s "%s' % (
+ class_name, member_name, brief)] + [
+ '@param %s %s' % (name, desc)
+- for name, desc in parameters.items()]) + ' */\\n";')
++ for name, desc in parameters.items()]) + '\\n";')
+ elif language == 'java' and kind == 'public-func':
+ print(str.join('\n', [
+ '%%javamethodmodifiers %s::%s "/** %s' % (
+@@ -111,4 +111,4 @@ for compound in index.findall('compound'):
+ print('%}')
+ elif language == 'ruby' and constants:
+ for member_name, brief in constants:
+- print('%%feature("docstring") %s::%s "/* %s */\\n";' % (class_name, member_name, brief))
++ print('%%feature("docstring") %s::%s "%s\\n";' % (class_name, member_name, brief))
+--
+2.27.0
diff --git a/sci-libs/libsigrok/libsigrok-0.5.2.ebuild b/sci-libs/libsigrok/libsigrok-0.5.2.ebuild
index 03ae49481ed..7e3111fc54d 100644
--- a/sci-libs/libsigrok/libsigrok-0.5.2.ebuild
+++ b/sci-libs/libsigrok/libsigrok-0.5.2.ebuild
@@ -67,8 +67,12 @@ DEPEND="${LIB_DEPEND//\[static-libs(+)]}
S="${WORKDIR}"/${P}
-# https://sigrok.org/bugzilla/show_bug.cgi?id=1527
-PATCHES=( "${FILESDIR}/${P}-swig-4.patch" )
+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}-ruby-swig-docs.patch" # bug 705074
+)
pkg_setup() {
use python && python_setup
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-libs/libsigrok/, sci-libs/libsigrok/files/
@ 2020-09-06 16:46 Andreas Sturmlechner
0 siblings, 0 replies; 4+ messages in thread
From: Andreas Sturmlechner @ 2020-09-06 16:46 UTC (permalink / raw
To: gentoo-commits
commit: 030daa8375b9719fbbcfe9e5e3a5205208deff19
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 6 16:35:56 2020 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Sep 6 16:45:41 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=030daa83
sci-libs/libsigrok: Drop 0.3.0
Closes: https://bugs.gentoo.org/730490
Package-Manager: Portage-3.0.5, Repoman-3.0.1
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
sci-libs/libsigrok/Manifest | 1 -
.../files/libsigrok-0.3.0-configure-flags.patch | 169 ---------------------
.../files/libsigrok-0.3.0-no-check-linkage.patch | 30 ----
sci-libs/libsigrok/libsigrok-0.3.0.ebuild | 65 --------
4 files changed, 265 deletions(-)
diff --git a/sci-libs/libsigrok/Manifest b/sci-libs/libsigrok/Manifest
index a25f3c7b87d..c98a79f5939 100644
--- a/sci-libs/libsigrok/Manifest
+++ b/sci-libs/libsigrok/Manifest
@@ -1,2 +1 @@
-DIST libsigrok-0.3.0.tar.gz 924503 BLAKE2B 132cc952b7314e11034100973f1086d17515fb7b1eb3792506569211fe05e9f35b113fceaff7c0468ad9be0bbcac0251ae63ae856f1393c51e743983e60886df SHA512 b94e8a8da1346f9ab267fd693975411243f2cb016e48ec05f4ad88a8a1dfe5ed6f5ad4ac4bf0e94dc551dc92cd70d2719983e21abaa4811693fb28a27bf74550
DIST libsigrok-0.5.2.tar.gz 1779465 BLAKE2B fc6fdde1054e9ac50bc42249c34b3dbfff1e89d77f0db5a8762e52fcf2ea5ea69b2defcf1cde4ed7b1edd1e21770002ed661a470c8d666904daa48a84a2bbfc5 SHA512 cf673dad6280302d69050c29490621f66c6d6a73932d019a53ec3501316d3f2e23e7667a04f866dbe6ed73f86a63de73d2173e2b6cea563631d705e06f887092
diff --git a/sci-libs/libsigrok/files/libsigrok-0.3.0-configure-flags.patch b/sci-libs/libsigrok/files/libsigrok-0.3.0-configure-flags.patch
deleted file mode 100644
index 16e13349360..00000000000
--- a/sci-libs/libsigrok/files/libsigrok-0.3.0-configure-flags.patch
+++ /dev/null
@@ -1,169 +0,0 @@
-https://sourceforge.net/p/sigrok/mailman/message/32459490/
-
-From de8690fe8aad81f963f14cf1bd7d6e7013d9d747 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Fri, 13 Jun 2014 19:09:35 -0400
-Subject: [PATCH] add explicit configure flags for ftdi/serial/usb libraries
-
-This makes it a lot easier for distros to control this functionality.
----
- configure.ac | 118 +++++++++++++++++++++++++++++++++++++++--------------------
- 1 file changed, 79 insertions(+), 39 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 496bc7a..f23e630 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -261,6 +261,18 @@ AC_ARG_ENABLE(zeroplus-logic-cube,
- [HW_ZEROPLUS_LOGIC_CUBE="$enableval"],
- [HW_ZEROPLUS_LOGIC_CUBE=$HW_ENABLED_DEFAULT])
-
-+AC_ARG_ENABLE(libserialport,
-+ AC_HELP_STRING([--disable-libserialport],
-+ [disable libserialport support [default=detect]]))
-+
-+AC_ARG_ENABLE(libftdi,
-+ AC_HELP_STRING([--disable-libftdi],
-+ [disable libftdi support [default=detect]]))
-+
-+AC_ARG_ENABLE(libusb,
-+ AC_HELP_STRING([--disable-libusb],
-+ [disable libusb support [default=detect]]))
-+
- # Checks for libraries.
-
- case "$host" in
-@@ -302,19 +314,28 @@ PKG_CHECK_MODULES([libzip], [libzip >= 0.10],
-
- # libserialport is only needed for some hardware drivers. Disable the
- # respective drivers if it is not found.
--PKG_CHECK_MODULES([libserialport], [libserialport >= 0.1.0],
-- [have_libserialport="yes"; LIB_CFLAGS="$LIB_CFLAGS $libserialport_CFLAGS";
-- LIBS="$LIBS $libserialport_LIBS";
-- SR_PKGLIBS="$SR_PKGLIBS libserialport"],
-- [have_libserialport="no"; HW_AGILENT_DMM="no"; HW_APPA_55II="no";
-+if test "x$enable_libserialport" != "xno"; then
-+ PKG_CHECK_MODULES([libserialport], [libserialport >= 0.1.0],
-+ [have_libserialport="yes"; LIB_CFLAGS="$LIB_CFLAGS $libserialport_CFLAGS";
-+ LIBS="$LIBS $libserialport_LIBS";
-+ SR_PKGLIBS="$SR_PKGLIBS libserialport"],
-+ [have_libserialport="no"])
-+ if test "x$enable_libserialport$have_libserialport" = "xyesno"; then
-+ AC_MSG_ERROR([libserialport support requested, but it was not found])
-+ fi
-+else
-+ have_libserialport="no"
-+fi
-+
-+# Define HAVE_LIBSERIALPORT in config.h if we found libserialport.
-+if test "x$have_libserialport" = "xno"; then
-+ HW_AGILENT_DMM="no"; HW_APPA_55II="no";
- HW_ATTEN_PPS3XXX="no"; HW_BRYMEN_DMM="no"; HW_CEM_DT_885X="no";
- HW_CENTER_3XX="no"; HW_COLEAD_SLM="no"; HW_CONRAD_DIGI_35_CPU="no";
- HW_FLUKE_DMM="no"; HW_GMC_MH_1X_2X="no"; HW_HAMEG_HMO="no";
- HW_MIC_985XX="no"; HW_NORMA_DMM="no"; HW_OLS="no";
-- HW_SERIAL_DMM="no"; HW_TELEINFO="no"; HW_TONDAJ_SL_814="no"])
--
--# Define HAVE_LIBSERIALPORT in config.h if we found libserialport.
--if test "x$have_libserialport" != "xno"; then
-+ HW_SERIAL_DMM="no"; HW_TELEINFO="no"; HW_TONDAJ_SL_814="no";
-+else
- AC_DEFINE_UNQUOTED(HAVE_LIBSERIALPORT, [1],
- [Specifies whether we have libserialport.])
- fi
-@@ -340,43 +361,62 @@ fi
-
- # libusb-1.0 is only needed for some hardware drivers. Disable the respective
- # drivers if it is not found.
--case "$host" in
--*freebsd*)
-- # FreeBSD comes with an "integrated" libusb-1.0-style USB API.
-- # This means libusb-1.0 is always available, no need to check for it,
-- # and no need to (potentially) disable any drivers if it's not found.
-+if test "x$enable_libusb" != "xno"; then
-+ case "$host" in
-+ *freebsd*)
-+ # FreeBSD comes with an "integrated" libusb-1.0-style USB API.
-+ # This means libusb-1.0 is always available, no need to check for it,
-+ # and no need to (potentially) disable any drivers if it's not found.
-+ have_libusb1_0="yes"
-+ ;;
-+ *)
-+ PKG_CHECK_MODULES([libusb], [libusb-1.0 >= 1.0.16],
-+ [have_libusb1_0="yes"; LIB_CFLAGS="$LIB_CFLAGS $libusb_CFLAGS";
-+ LIBS="$LIBS $libusb_LIBS";
-+ SR_PKGLIBS="$SR_PKGLIBS libusb-1.0"],
-+ [have_libusb1_0="no"])
-+ if test "x$enable_libusb$have_libusb1_0" = "xyesno"; then
-+ AC_MSG_ERROR([libusb support requested, but it was not found])
-+ fi
-+ ;;
-+ esac
-+else
-+ have_libusb1_0="no"
-+fi
-+
-+# Define HAVE_LIBUSB_1_0 in config.h if we found libusb-1.0.
-+if test "x$have_libusb1_0" = "xno"; then
-+ HW_BRYMEN_BM86X="no"; HW_FX2LAFW="no";
-+ HW_HANTEK_DSO="no"; HW_IKALOGIC_SCANALOGIC2="no";
-+ HW_KECHENG_KC_330B="no"; HW_LASCAR_EL_USB="no";
-+ HW_SYSCLK_LWLA="no"; HW_UNI_T_DMM="no";
-+ HW_UNI_T_UT32X="no"; HW_VICTOR_DMM="no";
-+ HW_ZEROPLUS_LOGIC_CUBE="no"; HW_SALEAE_LOGIC16="no";
-+else
- AC_DEFINE_UNQUOTED(HAVE_LIBUSB_1_0, [1],
- [Specifies whether we have a libusb.h header.])
-- ;;
--*)
-- PKG_CHECK_MODULES([libusb], [libusb-1.0 >= 1.0.16],
-- [have_libusb1_0="yes"; LIB_CFLAGS="$LIB_CFLAGS $libusb_CFLAGS";
-- LIBS="$LIBS $libusb_LIBS";
-- SR_PKGLIBS="$SR_PKGLIBS libusb-1.0"],
-- [have_libusb1_0="no"; HW_BRYMEN_BM86X="no"; HW_FX2LAFW="no";
-- HW_HANTEK_DSO="no"; HW_IKALOGIC_SCANALOGIC2="no";
-- HW_KECHENG_KC_330B="no"; HW_LASCAR_EL_USB="no";
-- HW_SYSCLK_LWLA="no"; HW_UNI_T_DMM="no";
-- HW_UNI_T_UT32X="no"; HW_VICTOR_DMM="no";
-- HW_ZEROPLUS_LOGIC_CUBE="no"; HW_SALEAE_LOGIC16="no"])
--
-- # Define HAVE_LIBUSB_1_0 in config.h if we found libusb-1.0.
-- if test "x$have_libusb1_0" != "xno"; then
-- AC_DEFINE_UNQUOTED(HAVE_LIBUSB_1_0, [1],
-- [Specifies whether we have a libusb.h header.])
-- fi
-- ;;
--esac
-+fi
-
- # USB + FX2 firmware helper code is only compiled in if libusb-1.0 was found.
- AM_CONDITIONAL(NEED_USB, test "x$have_libusb1_0" != xno)
-
- # libftdi is only needed for some hardware drivers. Disable them if not found.
--PKG_CHECK_MODULES([libftdi], [libftdi >= 0.16],
-- [LIB_CFLAGS="$LIB_CFLAGS $libftdi_CFLAGS";
-- LIBS="$LIBS $libftdi_LIBS";
-- SR_PKGLIBS="$SR_PKGLIBS libftdi"],
-- [HW_ASIX_SIGMA="no"; HW_CHRONOVU_LA="no"; HW_IKALOGIC_SCANAPLUS="no"])
-+if test "x$enable_libftdi" != "xno"; then
-+ PKG_CHECK_MODULES([libftdi], [libftdi >= 0.16],
-+ [have_libftdi="yes"; LIB_CFLAGS="$LIB_CFLAGS $libftdi_CFLAGS";
-+ LIBS="$LIBS $libftdi_LIBS";
-+ SR_PKGLIBS="$SR_PKGLIBS libftdi"],
-+ [have_libftdi="no"])
-+ if test "x$enable_libftdi$have_libftdi" = "xyesno"; then
-+ AC_MSG_ERROR([libftdi support requested, but it was not found])
-+ fi
-+else
-+ have_libftdi="no"
-+fi
-+
-+if test "x$have_libftdi" = "xno"; then
-+ HW_ASIX_SIGMA="no"; HW_CHRONOVU_LA="no"; HW_IKALOGIC_SCANAPLUS="no";
-+fi
-
- # The Check unit testing framework is optional. Disable if not found.
- PKG_CHECK_MODULES([check], [check >= 0.9.4],
---
-2.0.0
-
diff --git a/sci-libs/libsigrok/files/libsigrok-0.3.0-no-check-linkage.patch b/sci-libs/libsigrok/files/libsigrok-0.3.0-no-check-linkage.patch
deleted file mode 100644
index f638c47b196..00000000000
--- a/sci-libs/libsigrok/files/libsigrok-0.3.0-no-check-linkage.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-https://sourceforge.net/p/sigrok/mailman/message/32459488/
-
-From 5326833697a73826babb6a43c74112da7368d2d6 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Fri, 13 Jun 2014 21:17:23 -0400
-Subject: [PATCH] do not add check to common cflags/libs
-
-Only the unittests use these flags, so don't go linking them in for
-the main library too.
----
- configure.ac | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index f23e630..d0654f1 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -420,8 +420,7 @@ fi
-
- # The Check unit testing framework is optional. Disable if not found.
- PKG_CHECK_MODULES([check], [check >= 0.9.4],
-- [have_check="yes"; LIB_CFLAGS="$LIB_CFLAGS $check_CFLAGS";
-- LIBS="$LIBS $check_LIBS"], [have_check="no"])
-+ [have_check="yes"], [have_check="no"])
- AM_CONDITIONAL(HAVE_CHECK, test x"$have_check" = "xyes")
-
- # The OLS driver uses serial port file descriptors directly, and therefore
---
-2.0.0
-
diff --git a/sci-libs/libsigrok/libsigrok-0.3.0.ebuild b/sci-libs/libsigrok/libsigrok-0.3.0.ebuild
deleted file mode 100644
index 3c1c6c14e61..00000000000
--- a/sci-libs/libsigrok/libsigrok-0.3.0.ebuild
+++ /dev/null
@@ -1,65 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-inherit eutils autotools ltprune
-
-if [[ ${PV} == "9999" ]]; then
- EGIT_REPO_URI="git://sigrok.org/${PN}"
- inherit git-r3 autotools
-else
- SRC_URI="https://sigrok.org/download/source/${PN}/${P}.tar.gz"
- KEYWORDS="amd64 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/2"
-IUSE="ftdi serial static-libs test usb"
-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(+)]
- ftdi? ( >=dev-embedded/libftdi-0.16:=[static-libs(+)] )
- serial? ( >=dev-libs/libserialport-0.1.0[static-libs(+)] )
- usb? ( virtual/libusb:1[static-libs(+)] )"
-RDEPEND="!static-libs? ( ${LIB_DEPEND//\[static-libs(+)]} )
- static-libs? ( ${LIB_DEPEND} )"
-DEPEND="${LIB_DEPEND//\[static-libs(+)]}
- test? ( >=dev-libs/check-0.9.4 )
- virtual/pkgconfig"
-
-src_prepare() {
- epatch "${FILESDIR}"/${PN}-0.3.0-configure-flags.patch
- epatch "${FILESDIR}"/${PN}-0.3.0-no-check-linkage.patch
- eautoreconf
-
- # Deal with libftdi-0.x & libftdi-1.x changes.
- if has_version dev-embedded/libftdi:1 ; then
- sed -i 's:libftdi >= 0.16:libftdi1 >= 0.16:g' configure || die
- fi
-
- # Fix implicit decl w/usleep.
- sed -i '1i#include <unistd.h>' hardware/asix-sigma/asix-sigma.c || die
-}
-
-src_configure() {
- econf \
- $(use_enable ftdi libftdi) \
- $(use_enable serial libserialport) \
- $(use_enable usb libusb) \
- $(use_enable static-libs static)
-}
-
-src_test() {
- emake check
-}
-
-src_install() {
- default
- prune_libtool_files
-}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-libs/libsigrok/, sci-libs/libsigrok/files/
@ 2024-06-11 17:58 Sam James
0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2024-06-11 17:58 UTC (permalink / raw
To: gentoo-commits
commit: 0c2c5e8a704527b0d86548796f074b26bf339cda
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 11 17:55:14 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jun 11 17:55:20 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0c2c5e8a
sci-libs/libsigrok: enable py3.13
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../libsigrok/files/libsigrok-0.5.2-py313.patch | 46 ++++++++++++++++++++++
...igrok-9999.ebuild => libsigrok-0.5.2-r5.ebuild} | 27 ++++++++-----
sci-libs/libsigrok/libsigrok-9999.ebuild | 25 +++++++-----
3 files changed, 80 insertions(+), 18 deletions(-)
diff --git a/sci-libs/libsigrok/files/libsigrok-0.5.2-py313.patch b/sci-libs/libsigrok/files/libsigrok-0.5.2-py313.patch
new file mode 100644
index 000000000000..a4c1be8de96a
--- /dev/null
+++ b/sci-libs/libsigrok/files/libsigrok-0.5.2-py313.patch
@@ -0,0 +1,46 @@
+http://sigrok.org/gitweb/?p=libsigrok.git;a=commit;h=5bc8174531df86991ba8aa6d12942923925d9e72
+
+From: Gerhard Sittig <redacted>
+Date: Mon, 2 Oct 2023 16:33:08 +0000 (+0200)
+Subject: bindings/python: rephrase for Python 3.9 deprecation (call API)
+X-Git-Url: http://sigrok.org/gitweb/?p=libsigrok.git;a=commitdiff_plain;h=5bc8174531df86991ba8aa6d12942923925d9e72;hp=1711287ee9e5e4d37cab1cf9fcda5c98f732a137
+
+bindings/python: rephrase for Python 3.9 deprecation (call API)
+
+The PyEval_CallObject() routine was deprecated in Python 3.9, use
+PyObject_CallObject() instead which has existed since at least 3.0.
+
+There are also PyEval_InitThreads() deprecation warnings, but these
+originate from SWIG generated code and are outside of our control.
+Requires SWIG version 4.1 to silence these.
+
+Tested-By: Sascha Silbe <redacted>
+--- a/bindings/python/sigrok/core/classes.i
++++ b/bindings/python/sigrok/core/classes.i
+@@ -134,7 +134,7 @@ typedef guint pyg_flags_type;
+
+ auto arglist = Py_BuildValue("(OO)", log_obj, string_obj);
+
+- auto result = PyEval_CallObject($input, arglist);
++ auto result = PyObject_CallObject($input, arglist);
+
+ Py_XDECREF(arglist);
+ Py_XDECREF(log_obj);
+@@ -177,7 +177,7 @@ typedef guint pyg_flags_type;
+ $1 = [=] () {
+ const auto gstate = PyGILState_Ensure();
+
+- const auto result = PyEval_CallObject($input, nullptr);
++ const auto result = PyObject_CallObject($input, nullptr);
+ const bool completed = !PyErr_Occurred();
+ const bool valid_result = (completed && result == Py_None);
+
+@@ -221,7 +221,7 @@ typedef guint pyg_flags_type;
+
+ auto arglist = Py_BuildValue("(OO)", device_obj, packet_obj);
+
+- auto result = PyEval_CallObject($input, arglist);
++ auto result = PyObject_CallObject($input, arglist);
+
+ Py_XDECREF(arglist);
+ Py_XDECREF(device_obj);
diff --git a/sci-libs/libsigrok/libsigrok-9999.ebuild b/sci-libs/libsigrok/libsigrok-0.5.2-r5.ebuild
similarity index 84%
copy from sci-libs/libsigrok/libsigrok-9999.ebuild
copy to sci-libs/libsigrok/libsigrok-0.5.2-r5.ebuild
index b0fe1e16dc1d..ea6a56fc8bb3 100644
--- a/sci-libs/libsigrok/libsigrok-9999.ebuild
+++ b/sci-libs/libsigrok/libsigrok-0.5.2-r5.ebuild
@@ -3,24 +3,24 @@
EAPI="8"
-PYTHON_COMPAT=( python3_{10..12} )
+PYTHON_COMPAT=( python3_{10..13} )
-inherit python-r1 java-pkg-opt-2 udev xdg-utils
+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 autotools
+ inherit git-r3
else
SRC_URI="https://sigrok.org/download/source/${PN}/${P}.tar.gz"
- KEYWORDS="~amd64 ~x86"
+ 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/9999"
-IUSE="bluetooth +cxx ftdi hidapi java nettle parport python serial static-libs test +udev usb"
+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} )"
@@ -34,7 +34,6 @@ LIB_DEPEND="
cxx? ( dev-cpp/glibmm:2[static-libs(+)] )
ftdi? ( dev-embedded/libftdi:1[static-libs(+)] )
hidapi? ( >=dev-libs/hidapi-0.8.0 )
- nettle? ( dev-libs/nettle:=[static-libs(+)] )
parport? ( sys-libs/libieee1284[static-libs(+)] )
python? (
${PYTHON_DEPS}
@@ -65,6 +64,17 @@ DEPEND="${LIB_DEPEND//\[static-libs(+)]}
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"
+
+ "${FILESDIR}/${P}-py313.patch"
+)
+
pkg_setup() {
use python && python_setup
java-pkg-opt-2_pkg_setup
@@ -75,7 +85,7 @@ src_unpack() {
}
sigrok_src_prepare() {
- [[ ${PV} == *9999* ]] && eautoreconf
+ eautoreconf
}
src_prepare() {
@@ -89,7 +99,6 @@ sigrok_src_configure() {
$(use_with bluetooth libbluez) \
$(use_with ftdi libftdi) \
$(use_with hidapi libhidapi) \
- $(use_with nettle libnettle) \
$(use_with parport libieee1284) \
$(use_with serial libserialport) \
$(use_with usb libusb) \
diff --git a/sci-libs/libsigrok/libsigrok-9999.ebuild b/sci-libs/libsigrok/libsigrok-9999.ebuild
index b0fe1e16dc1d..589e3d9a56dd 100644
--- a/sci-libs/libsigrok/libsigrok-9999.ebuild
+++ b/sci-libs/libsigrok/libsigrok-9999.ebuild
@@ -3,24 +3,24 @@
EAPI="8"
-PYTHON_COMPAT=( python3_{10..12} )
+PYTHON_COMPAT=( python3_{10..13} )
-inherit python-r1 java-pkg-opt-2 udev xdg-utils
+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 autotools
+ inherit git-r3
else
SRC_URI="https://sigrok.org/download/source/${PN}/${P}.tar.gz"
- KEYWORDS="~amd64 ~x86"
+ 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/9999"
-IUSE="bluetooth +cxx ftdi hidapi java nettle parport python serial static-libs test +udev usb"
+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} )"
@@ -34,7 +34,6 @@ LIB_DEPEND="
cxx? ( dev-cpp/glibmm:2[static-libs(+)] )
ftdi? ( dev-embedded/libftdi:1[static-libs(+)] )
hidapi? ( >=dev-libs/hidapi-0.8.0 )
- nettle? ( dev-libs/nettle:=[static-libs(+)] )
parport? ( sys-libs/libieee1284[static-libs(+)] )
python? (
${PYTHON_DEPS}
@@ -65,6 +64,15 @@ DEPEND="${LIB_DEPEND//\[static-libs(+)]}
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
@@ -75,7 +83,7 @@ src_unpack() {
}
sigrok_src_prepare() {
- [[ ${PV} == *9999* ]] && eautoreconf
+ eautoreconf
}
src_prepare() {
@@ -89,7 +97,6 @@ sigrok_src_configure() {
$(use_with bluetooth libbluez) \
$(use_with ftdi libftdi) \
$(use_with hidapi libhidapi) \
- $(use_with nettle libnettle) \
$(use_with parport libieee1284) \
$(use_with serial libserialport) \
$(use_with usb libusb) \
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-libs/libsigrok/, sci-libs/libsigrok/files/
@ 2024-08-31 19:27 Sven Wegener
0 siblings, 0 replies; 4+ messages in thread
From: Sven Wegener @ 2024-08-31 19:27 UTC (permalink / raw
To: gentoo-commits
commit: a294ac7a6ae93b338b4a5a9a2feeb6bdc335dc3b
Author: Sven Wegener <swegener <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 31 16:01:52 2024 +0000
Commit: Sven Wegener <swegener <AT> gentoo <DOT> org>
CommitDate: Sat Aug 31 19:27:16 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a294ac7a
sci-libs/libsigrok: re-add ruby support
Signed-off-by: Sven Wegener <swegener <AT> gentoo.org>
.../files/libsigrok-0.5.2-ruby-swig-docs.patch | 63 ++++++++++++++++++++++
sci-libs/libsigrok/libsigrok-0.5.2-r5.ebuild | 39 ++++++++++++--
sci-libs/libsigrok/libsigrok-9999.ebuild | 38 +++++++++++--
3 files changed, 134 insertions(+), 6 deletions(-)
diff --git a/sci-libs/libsigrok/files/libsigrok-0.5.2-ruby-swig-docs.patch b/sci-libs/libsigrok/files/libsigrok-0.5.2-ruby-swig-docs.patch
new file mode 100644
index 000000000000..808227a2fffb
--- /dev/null
+++ b/sci-libs/libsigrok/files/libsigrok-0.5.2-ruby-swig-docs.patch
@@ -0,0 +1,63 @@
+From bae9308ec157378bd22ce4f4a0226f1e7ef23594 Mon Sep 17 00:00:00 2001
+From: Anatol Pomozov <anatol.pomozov@gmail.com>
+Date: Mon, 8 Jun 2020 20:46:44 -0700
+Subject: [PATCH] Fix ruby SWIG bindings generation
+
+bindings/swig/doc.py generates a swig interface file for ruby bindings
+that includes docstrings with comments braces ( /* and */ ) like this:
+
+ %feature("docstring") sigrok::Channel::type "/* Type of this channel. */\n";
+ %feature("docstring") sigrok::Channel::enabled "/* Enabled status of this channel. */\n";
+
+SWIG generates *.cxx and adds its own braces to the docstring:
+
+/*/* Document-class: Sigrok::Error
+Exception thrown when an error code is returned by any libsigrok call. */
+*/
+
+this causes compilation error for Ruby bindings.
+
+To fix the error we should not add extra braces to the docstring.
+With this patch libsigrok compiles fine with with ruby 2.7 and swig 4.0.2.
+
+Fixes bug #1526
+
+Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
+---
+ bindings/swig/doc.py | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/bindings/swig/doc.py b/bindings/swig/doc.py
+index e8767af8..182f5477 100644
+--- a/bindings/swig/doc.py
++++ b/bindings/swig/doc.py
+@@ -46,7 +46,7 @@ for compound in index.findall('compound'):
+ if language == 'python':
+ print('%%feature("docstring") %s "%s";' % (class_name, brief))
+ elif language == 'ruby':
+- print('%%feature("docstring") %s "/* Document-class: %s\\n%s */\\n";' % (class_name, class_name.replace("sigrok", "Sigrok", 1), brief))
++ print('%%feature("docstring") %s "Document-class: %s\\n%s\\n";' % (class_name, class_name.replace("sigrok", "Sigrok", 1), brief))
+ elif language == 'java':
+ print('%%typemap(javaclassmodifiers) %s "/** %s */\npublic class"' % (
+ class_name, brief))
+@@ -77,10 +77,10 @@ for compound in index.findall('compound'):
+ for name, desc in parameters.items()]) + '";')
+ if language == 'ruby' and kind == 'public-func':
+ print(str.join('\n', [
+- '%%feature("docstring") %s::%s "/* %s' % (
++ '%%feature("docstring") %s::%s "%s' % (
+ class_name, member_name, brief)] + [
+ '@param %s %s' % (name, desc)
+- for name, desc in parameters.items()]) + ' */\\n";')
++ for name, desc in parameters.items()]) + '\\n";')
+ elif language == 'java' and kind == 'public-func':
+ print(str.join('\n', [
+ '%%javamethodmodifiers %s::%s "/** %s' % (
+@@ -111,4 +111,4 @@ for compound in index.findall('compound'):
+ print('%}')
+ elif language == 'ruby' and constants:
+ for member_name, brief in constants:
+- print('%%feature("docstring") %s::%s "/* %s */\\n";' % (class_name, member_name, brief))
++ print('%%feature("docstring") %s::%s "%s\\n";' % (class_name, member_name, brief))
+--
+2.27.0
diff --git a/sci-libs/libsigrok/libsigrok-0.5.2-r5.ebuild b/sci-libs/libsigrok/libsigrok-0.5.2-r5.ebuild
index b5b8f1dea964..29150532d1a4 100644
--- a/sci-libs/libsigrok/libsigrok-0.5.2-r5.ebuild
+++ b/sci-libs/libsigrok/libsigrok-0.5.2-r5.ebuild
@@ -5,7 +5,10 @@ EAPI="8"
PYTHON_COMPAT=( python3_{10..13} )
-inherit autotools python-r1 java-pkg-opt-2 udev xdg-utils
+USE_RUBY="ruby31 ruby32"
+RUBY_OPTIONAL="yes"
+
+inherit autotools python-r1 java-pkg-opt-2 ruby-ng udev xdg-utils
if [[ ${PV} == *9999* ]]; then
EGIT_REPO_URI="https://github.com/sigrokproject/${PN}.git"
@@ -20,9 +23,10 @@ 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"
+IUSE="bluetooth +cxx ftdi hidapi java parport python ruby serial static-libs test +udev usb"
REQUIRED_USE="java? ( cxx )
- python? ( cxx ${PYTHON_REQUIRED_USE} )"
+ python? ( cxx ${PYTHON_REQUIRED_USE} )
+ ruby? ( cxx || ( $(ruby_get_use_targets) ) )"
RESTRICT="!test? ( test )"
@@ -39,6 +43,7 @@ LIB_DEPEND="
${PYTHON_DEPS}
>=dev-python/pygobject-3.0.0[${PYTHON_USEDEP}]
)
+ ruby? ( $(ruby_implementations_depend) )
serial? ( >=dev-libs/libserialport-0.1.1[static-libs(+)] )
usb? ( virtual/libusb:1[static-libs(+)] )
"
@@ -58,6 +63,7 @@ DEPEND="${LIB_DEPEND//\[static-libs(+)]}
dev-python/numpy[${PYTHON_USEDEP}]
dev-python/setuptools[${PYTHON_USEDEP}]
)
+ ruby? ( >=dev-lang/swig-3.0.8 )
test? ( >=dev-libs/check-0.9.4 )
virtual/pkgconfig
"
@@ -68,6 +74,7 @@ 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}-ruby-swig-docs.patch"
"${FILESDIR}/${P}-check-0.15.patch"
# https://bugs.gentoo.org/878395
"${FILESDIR}/${PN}-0.5.2-swig-4.1.patch"
@@ -77,6 +84,7 @@ PATCHES=(
pkg_setup() {
use python && python_setup
+ use ruby && ruby-ng_pkg_setup
java-pkg-opt-2_pkg_setup
}
@@ -88,7 +96,17 @@ sigrok_src_prepare() {
eautoreconf
}
+each_ruby_prepare() {
+ sigrok_src_prepare
+}
+
src_prepare() {
+ if use ruby; then
+ # copy source to where ruby-ng_src_unpack puts it
+ cp -rl "${S}" "${WORKDIR}"/all || die
+ # ruby-ng_src_prepare calls default by itself
+ ruby-ng_src_prepare
+ fi
default
sigrok_src_prepare
use python && python_copy_sources
@@ -115,9 +133,14 @@ each_python_configure() {
sigrok_src_configure --enable-python
}
+each_ruby_configure() {
+ RUBY="${RUBY}" sigrok_src_configure --enable-ruby
+}
+
src_configure() {
sigrok_src_configure
use python && python_foreach_impl each_python_configure
+ use ruby && ruby-ng_src_configure
}
each_python_compile() {
@@ -125,9 +148,14 @@ each_python_compile() {
emake python-build
}
+each_ruby_compile() {
+ emake ruby-build
+}
+
src_compile() {
default
use python && python_foreach_impl each_python_compile
+ use ruby && ruby-ng_src_compile
}
src_test() {
@@ -140,9 +168,14 @@ each_python_install() {
python_optimize
}
+each_ruby_install() {
+ emake ruby-install DESTDIR="${D}"
+}
+
src_install() {
default
use python && python_foreach_impl each_python_install
+ use ruby && ruby-ng_src_install
use udev && udev_dorules contrib/*.rules
find "${D}" -name '*.la' -type f -delete || die
}
diff --git a/sci-libs/libsigrok/libsigrok-9999.ebuild b/sci-libs/libsigrok/libsigrok-9999.ebuild
index 191f1750e535..908f3fbda84e 100644
--- a/sci-libs/libsigrok/libsigrok-9999.ebuild
+++ b/sci-libs/libsigrok/libsigrok-9999.ebuild
@@ -5,7 +5,10 @@ EAPI="8"
PYTHON_COMPAT=( python3_{10..13} )
-inherit python-r1 java-pkg-opt-2 udev xdg-utils
+USE_RUBY="ruby31 ruby32"
+RUBY_OPTIONAL="yes"
+
+inherit python-r1 java-pkg-opt-2 ruby-ng udev xdg-utils
if [[ ${PV} == *9999* ]]; then
EGIT_REPO_URI="https://github.com/sigrokproject/${PN}.git"
@@ -20,9 +23,10 @@ HOMEPAGE="https://sigrok.org/wiki/Libsigrok"
LICENSE="GPL-3"
SLOT="0/9999"
-IUSE="bluetooth +cxx ftdi hidapi java nettle parport python serial static-libs test +udev usb"
+IUSE="bluetooth +cxx ftdi hidapi java nettle parport python ruby serial static-libs test +udev usb"
REQUIRED_USE="java? ( cxx )
- python? ( cxx ${PYTHON_REQUIRED_USE} )"
+ python? ( cxx ${PYTHON_REQUIRED_USE} )
+ ruby? ( cxx || ( $(ruby_get_use_targets) ) )"
RESTRICT="!test? ( test )"
@@ -40,6 +44,7 @@ LIB_DEPEND="
${PYTHON_DEPS}
>=dev-python/pygobject-3.0.0[${PYTHON_USEDEP}]
)
+ ruby? ( $(ruby_implementations_depend) )
serial? ( >=dev-libs/libserialport-0.1.1[static-libs(+)] )
usb? ( virtual/libusb:1[static-libs(+)] )
"
@@ -59,6 +64,7 @@ DEPEND="${LIB_DEPEND//\[static-libs(+)]}
dev-python/numpy[${PYTHON_USEDEP}]
dev-python/setuptools[${PYTHON_USEDEP}]
)
+ ruby? ( >=dev-lang/swig-3.0.8 )
test? ( >=dev-libs/check-0.9.4 )
virtual/pkgconfig
"
@@ -67,6 +73,7 @@ S="${WORKDIR}"/${P}
pkg_setup() {
use python && python_setup
+ use ruby && ruby-ng_pkg_setup
java-pkg-opt-2_pkg_setup
}
@@ -78,7 +85,17 @@ sigrok_src_prepare() {
[[ ${PV} == *9999* ]] && eautoreconf
}
+each_ruby_prepare() {
+ sigrok_src_prepare
+}
+
src_prepare() {
+ if use ruby; then
+ # copy source to where ruby-ng_src_unpack puts it
+ cp -rl "${S}" "${WORKDIR}"/all || die
+ # ruby-ng_src_prepare calls default by itself
+ ruby-ng_src_prepare
+ fi
default
sigrok_src_prepare
use python && python_copy_sources
@@ -106,9 +123,14 @@ each_python_configure() {
sigrok_src_configure --enable-python
}
+each_ruby_configure() {
+ RUBY="${RUBY}" sigrok_src_configure --enable-ruby
+}
+
src_configure() {
sigrok_src_configure
use python && python_foreach_impl each_python_configure
+ use ruby && ruby-ng_src_configure
}
each_python_compile() {
@@ -116,9 +138,14 @@ each_python_compile() {
emake python-build
}
+each_ruby_compile() {
+ emake ruby-build
+}
+
src_compile() {
default
use python && python_foreach_impl each_python_compile
+ use ruby && ruby-ng_src_compile
}
src_test() {
@@ -131,9 +158,14 @@ each_python_install() {
python_optimize
}
+each_ruby_install() {
+ emake ruby-install DESTDIR="${D}"
+}
+
src_install() {
default
use python && python_foreach_impl each_python_install
+ use ruby && ruby-ng_src_install
use udev && udev_dorules contrib/*.rules
find "${D}" -name '*.la' -type f -delete || die
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-08-31 19:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-06 16:46 [gentoo-commits] repo/gentoo:master commit in: sci-libs/libsigrok/, sci-libs/libsigrok/files/ Andreas Sturmlechner
-- strict thread matches above, loose matches on Subject: below --
2024-08-31 19:27 Sven Wegener
2024-06-11 17:58 Sam James
2020-07-06 18:16 Andreas Sturmlechner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox