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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 18432138359 for ; Mon, 6 Jul 2020 18:16:07 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5DC71E0936; Mon, 6 Jul 2020 18:16:06 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 43629E0936 for ; Mon, 6 Jul 2020 18:16:06 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4F7B134F080 for ; Mon, 6 Jul 2020 18:16:05 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5C75D2D3 for ; Mon, 6 Jul 2020 18:16:02 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1594059324.2d67ebbf58c156b92a1ef37bec35e3d780a5f746.asturm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/libsigrok/files/, sci-libs/libsigrok/ X-VCS-Repository: repo/gentoo X-VCS-Files: sci-libs/libsigrok/files/libsigrok-0.5.2-swig-4.patch sci-libs/libsigrok/libsigrok-0.5.2.ebuild X-VCS-Directories: sci-libs/libsigrok/files/ sci-libs/libsigrok/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: 2d67ebbf58c156b92a1ef37bec35e3d780a5f746 X-VCS-Branch: master Date: Mon, 6 Jul 2020 18:16:02 +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: 6940457d-29e2-4d3a-8828-5bfe81753244 X-Archives-Hash: 837551be3b30fb72095936feb1a7c332 commit: 2d67ebbf58c156b92a1ef37bec35e3d780a5f746 Author: Andreas Sturmlechner gentoo org> AuthorDate: Sun Jul 5 22:06:48 2020 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Mon Jul 6 18:15:24 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d67ebbf sci-libs/libsigrok: Fix build with IUSE=java and >=dev-lang/swig-4 See also: https://sigrok.org/bugzilla/show_bug.cgi?id=1527 Package-Manager: Portage-2.3.103, Repoman-2.3.23 Signed-off-by: Andreas Sturmlechner gentoo.org> .../libsigrok/files/libsigrok-0.5.2-swig-4.patch | 37 ++++++++++++++++++++++ sci-libs/libsigrok/libsigrok-0.5.2.ebuild | 3 ++ 2 files changed, 40 insertions(+) diff --git a/sci-libs/libsigrok/files/libsigrok-0.5.2-swig-4.patch b/sci-libs/libsigrok/files/libsigrok-0.5.2-swig-4.patch new file mode 100644 index 00000000000..3c5dd85a510 --- /dev/null +++ b/sci-libs/libsigrok/files/libsigrok-0.5.2-swig-4.patch @@ -0,0 +1,37 @@ +From e803574173bdac8a7f33085a648c29eaf248a394 Mon Sep 17 00:00:00 2001 +From: Uwe Hermann +Date: Sat, 4 Apr 2020 21:54:13 +0200 +Subject: [PATCH 1/1] bindings/java: Fix build issue with SWIG 4.x. + +Tested with SWIG 3.x and SWIG 4.x. + +This fixes bug #1527. +--- + bindings/java/org/sigrok/core/classes/classes.i | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/bindings/java/org/sigrok/core/classes/classes.i b/bindings/java/org/sigrok/core/classes/classes.i +index 75793b25..e953fe5d 100644 +--- a/bindings/java/org/sigrok/core/classes/classes.i ++++ b/bindings/java/org/sigrok/core/classes/classes.i +@@ -94,10 +94,18 @@ VECTOR(std::shared_ptr, HardwareDevice) + "java.util.Map" + + %typemap(javain, ++/* SWIG 4.0.0 changed the std::map wrappers in an incompatible way. */ ++#if SWIG_VERSION >= 0x040000 ++ pre=" $javaclassname temp$javainput = new $javaclassname(); ++ for (java.util.Map.Entry entry : $javainput.entrySet()) ++ temp$javainput.put(entry.getKey(), entry.getValue());", ++ pgcppname="temp$javainput") ++#else + pre=" $javaclassname temp$javainput = new $javaclassname(); + for (java.util.Map.Entry entry : $javainput.entrySet()) + temp$javainput.set(entry.getKey(), entry.getValue());", + pgcppname="temp$javainput") ++#endif + std::map< CKey, CValue > "$javaclassname.getCPtr(temp$javainput)" + + %typemap(javaout) std::map< CKey, CValue > { +-- +2.24.0.rc2 diff --git a/sci-libs/libsigrok/libsigrok-0.5.2.ebuild b/sci-libs/libsigrok/libsigrok-0.5.2.ebuild index ba30bc5fe2d..03ae49481ed 100644 --- a/sci-libs/libsigrok/libsigrok-0.5.2.ebuild +++ b/sci-libs/libsigrok/libsigrok-0.5.2.ebuild @@ -67,6 +67,9 @@ DEPEND="${LIB_DEPEND//\[static-libs(+)]} S="${WORKDIR}"/${P} +# https://sigrok.org/bugzilla/show_bug.cgi?id=1527 +PATCHES=( "${FILESDIR}/${P}-swig-4.patch" ) + pkg_setup() { use python && python_setup use ruby && ruby-ng_pkg_setup