commit:     7e82c251ae1c2d264c0283fdf879c182a7fab0ae
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat May 31 10:46:07 2025 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Jun  2 15:14:03 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7e82c251

sci-libs/libsigrok: add 0.6.0_pre20241020 snapshot

... required by subsequent Qt6-based sci-electronics/pulseview snapshot.
libsigrok-0.5.2 release is 5 years old after all.

Bug: https://bugs.gentoo.org/948044
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 sci-libs/libsigrok/Manifest                        |  1 +
 ...9.ebuild => libsigrok-0.6.0_pre20241020.ebuild} | 52 ++++++++++++++++------
 sci-libs/libsigrok/libsigrok-9999.ebuild           | 52 ++++++++++++++++------
 3 files changed, 79 insertions(+), 26 deletions(-)

diff --git a/sci-libs/libsigrok/Manifest b/sci-libs/libsigrok/Manifest
index c98a79f59391..9bd82e0e200a 100644
--- a/sci-libs/libsigrok/Manifest
+++ b/sci-libs/libsigrok/Manifest
@@ -1 +1,2 @@
 DIST libsigrok-0.5.2.tar.gz 1779465 BLAKE2B 
fc6fdde1054e9ac50bc42249c34b3dbfff1e89d77f0db5a8762e52fcf2ea5ea69b2defcf1cde4ed7b1edd1e21770002ed661a470c8d666904daa48a84a2bbfc5
 SHA512 
cf673dad6280302d69050c29490621f66c6d6a73932d019a53ec3501316d3f2e23e7667a04f866dbe6ed73f86a63de73d2173e2b6cea563631d705e06f887092
+DIST libsigrok-f06f788.zip 1881766 BLAKE2B 
9477312c9365c4b35ef5fb5d0908946be6f1a7f681c0b42fe4a02595069b87697bf50ad5c11130abc15229b977c2432ed8407207b954f52078c471695c911908
 SHA512 
bfc3390cb1f6c54f137f8f75a3eb841451ceb0376c3ba9b020cfd106a815d59179d326bd6c00a59f44a9dd5b559cf422e012761ef16c6e7ec164f1eaef5a374e

diff --git a/sci-libs/libsigrok/libsigrok-9999.ebuild 
b/sci-libs/libsigrok/libsigrok-0.6.0_pre20241020.ebuild
similarity index 87%
copy from sci-libs/libsigrok/libsigrok-9999.ebuild
copy to sci-libs/libsigrok/libsigrok-0.6.0_pre20241020.ebuild
index 8bcb0b550c19..2a5260bad733 100644
--- a/sci-libs/libsigrok/libsigrok-9999.ebuild
+++ b/sci-libs/libsigrok/libsigrok-0.6.0_pre20241020.ebuild
@@ -8,20 +8,34 @@ USE_RUBY="ruby31 ruby32"
 RUBY_OPTIONAL="yes"
 inherit python-r1 java-pkg-opt-2 ruby-ng udev xdg-utils
 
-if [[ ${PV} == *9999* ]]; then
+case ${PV} in
+*9999*)
        EGIT_REPO_URI="https://github.com/sigrokproject/${PN}.git";
        inherit git-r3 autotools
-else
+       S="${WORKDIR}"/${P}
+       ;;
+*_p*)
+       inherit autotools unpacker
+       COMMIT="f06f788118191d19fdbbb37046d3bd5cec91adb1"
+       
SRC_URI="https://sigrok.org/gitweb/?p=${PN}.git;a=snapshot;h=${COMMIT};sf=zip 
-> ${PN}-${COMMIT:0:7}.zip"
+       S="${WORKDIR}"/${PN}-${COMMIT:0:7}
+       ;;
+*)
        SRC_URI="https://sigrok.org/download/source/${PN}/${P}.tar.gz";
-       KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-fi
+       S="${WORKDIR}"/${P}
+       ;;
+esac
 
 DESCRIPTION="Basic hardware drivers for logic analyzers and input/output file 
format support"
 HOMEPAGE="https://sigrok.org/wiki/Libsigrok";
-S="${WORKDIR}"/${P}
 
 LICENSE="GPL-3"
-SLOT="0/9999"
+if [[ ${PV} == *9999* ]]; then
+       SLOT="0/9999"
+else
+       SLOT="0/4"
+       KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+fi
 IUSE="bluetooth +cxx ftdi gpib hidapi java nettle parport python ruby serial 
test +udev usb"
 REQUIRED_USE="java? ( cxx )
        python? ( cxx ${PYTHON_REQUIRED_USE} )
@@ -53,8 +67,6 @@ RDEPEND="${COMMON_DEPEND}
        java? ( >=virtual/jre-1.8:* )
 "
 DEPEND="${COMMON_DEPEND}
-       virtual/pkgconfig
-       cxx? ( app-text/doxygen )
        java? (
                >=dev-lang/swig-3.0.6
                >=virtual/jdk-1.8:*
@@ -67,6 +79,11 @@ DEPEND="${COMMON_DEPEND}
        ruby? ( >=dev-lang/swig-3.0.8 )
        test? ( >=dev-libs/check-0.9.4 )
 "
+BDEPEND="
+       virtual/pkgconfig
+       cxx? ( app-text/doxygen )
+"
+[[ ${PV} == *_p* ]] && BDEPEND+=" app-arch/unzip"
 
 pkg_setup() {
        use python && python_setup
@@ -74,8 +91,18 @@ pkg_setup() {
        java-pkg-opt-2_pkg_setup
 }
 
+src_unpack() {
+       case ${PV} in
+       *9999*)
+               git-r3_src_unpack ;;
+       *_p*)
+               unpack_zip ${A} ;;
+       esac
+       default
+}
+
 sigrok_src_prepare() {
-       [[ ${PV} == *9999* ]] && eautoreconf
+       [[ ${PV} == *9999* || ${PV} == *_p* ]] && eautoreconf
 }
 
 each_ruby_prepare() {
@@ -83,31 +110,30 @@ each_ruby_prepare() {
 }
 
 src_prepare() {
-       default
        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
 }
 
 sigrok_src_configure() {
        local myeconfargs=(
-               --enable-all-drivers
                --disable-python
                --disable-ruby
                $(use_with bluetooth libbluez)
+               $(use_enable cxx)
                $(use_with ftdi libftdi)
                $(use_with hidapi libhidapi)
+               $(use_enable java)
                $(use_with nettle libnettle)
                $(use_with parport libieee1284)
                $(use_with serial libserialport)
                $(use_with usb libusb)
-               $(use_enable cxx)
-               $(use_enable java)
        )
        econf "${myeconfargs[@]}" "${@}"
 }

diff --git a/sci-libs/libsigrok/libsigrok-9999.ebuild 
b/sci-libs/libsigrok/libsigrok-9999.ebuild
index 8bcb0b550c19..2a5260bad733 100644
--- a/sci-libs/libsigrok/libsigrok-9999.ebuild
+++ b/sci-libs/libsigrok/libsigrok-9999.ebuild
@@ -8,20 +8,34 @@ USE_RUBY="ruby31 ruby32"
 RUBY_OPTIONAL="yes"
 inherit python-r1 java-pkg-opt-2 ruby-ng udev xdg-utils
 
-if [[ ${PV} == *9999* ]]; then
+case ${PV} in
+*9999*)
        EGIT_REPO_URI="https://github.com/sigrokproject/${PN}.git";
        inherit git-r3 autotools
-else
+       S="${WORKDIR}"/${P}
+       ;;
+*_p*)
+       inherit autotools unpacker
+       COMMIT="f06f788118191d19fdbbb37046d3bd5cec91adb1"
+       
SRC_URI="https://sigrok.org/gitweb/?p=${PN}.git;a=snapshot;h=${COMMIT};sf=zip 
-> ${PN}-${COMMIT:0:7}.zip"
+       S="${WORKDIR}"/${PN}-${COMMIT:0:7}
+       ;;
+*)
        SRC_URI="https://sigrok.org/download/source/${PN}/${P}.tar.gz";
-       KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-fi
+       S="${WORKDIR}"/${P}
+       ;;
+esac
 
 DESCRIPTION="Basic hardware drivers for logic analyzers and input/output file 
format support"
 HOMEPAGE="https://sigrok.org/wiki/Libsigrok";
-S="${WORKDIR}"/${P}
 
 LICENSE="GPL-3"
-SLOT="0/9999"
+if [[ ${PV} == *9999* ]]; then
+       SLOT="0/9999"
+else
+       SLOT="0/4"
+       KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+fi
 IUSE="bluetooth +cxx ftdi gpib hidapi java nettle parport python ruby serial 
test +udev usb"
 REQUIRED_USE="java? ( cxx )
        python? ( cxx ${PYTHON_REQUIRED_USE} )
@@ -53,8 +67,6 @@ RDEPEND="${COMMON_DEPEND}
        java? ( >=virtual/jre-1.8:* )
 "
 DEPEND="${COMMON_DEPEND}
-       virtual/pkgconfig
-       cxx? ( app-text/doxygen )
        java? (
                >=dev-lang/swig-3.0.6
                >=virtual/jdk-1.8:*
@@ -67,6 +79,11 @@ DEPEND="${COMMON_DEPEND}
        ruby? ( >=dev-lang/swig-3.0.8 )
        test? ( >=dev-libs/check-0.9.4 )
 "
+BDEPEND="
+       virtual/pkgconfig
+       cxx? ( app-text/doxygen )
+"
+[[ ${PV} == *_p* ]] && BDEPEND+=" app-arch/unzip"
 
 pkg_setup() {
        use python && python_setup
@@ -74,8 +91,18 @@ pkg_setup() {
        java-pkg-opt-2_pkg_setup
 }
 
+src_unpack() {
+       case ${PV} in
+       *9999*)
+               git-r3_src_unpack ;;
+       *_p*)
+               unpack_zip ${A} ;;
+       esac
+       default
+}
+
 sigrok_src_prepare() {
-       [[ ${PV} == *9999* ]] && eautoreconf
+       [[ ${PV} == *9999* || ${PV} == *_p* ]] && eautoreconf
 }
 
 each_ruby_prepare() {
@@ -83,31 +110,30 @@ each_ruby_prepare() {
 }
 
 src_prepare() {
-       default
        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
 }
 
 sigrok_src_configure() {
        local myeconfargs=(
-               --enable-all-drivers
                --disable-python
                --disable-ruby
                $(use_with bluetooth libbluez)
+               $(use_enable cxx)
                $(use_with ftdi libftdi)
                $(use_with hidapi libhidapi)
+               $(use_enable java)
                $(use_with nettle libnettle)
                $(use_with parport libieee1284)
                $(use_with serial libserialport)
                $(use_with usb libusb)
-               $(use_enable cxx)
-               $(use_enable java)
        )
        econf "${myeconfargs[@]}" "${@}"
 }

Reply via email to