commit: f239359ae97b5e5ce17926decb05f65aee65c9e7 Author: Nicolas PARLANT <nicolas.parlant <AT> parhuet <DOT> fr> AuthorDate: Tue Sep 30 03:21:02 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Tue Sep 30 09:55:29 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f239359a
sci-electronics/gtkwave: add 3.3.125 update HOMEPAGE update SRC_URI (redirect) update metadata with github repo uses for issues and the dev branch update license to GPL2+ (see metainfo.xml) fix VariableOrder deps: add wayland / X for GTK to avoid automagic add deps inherited by gtk+:3 add app-arch/bzip2, required add net-libs/libtirpc, forced w/ --with-tirpc (bug 676896) export PKG_CONFIG use an array for econf use gsettings (and gnome2-utils) disable struct-pack (runtime errors w/ UBSAN unconditionally install doc/examples files, not built patches to fix bashism, getopt/musl, c23 Closes: https://bugs.gentoo.org/676896 Closes: https://bugs.gentoo.org/898072 Closes: https://bugs.gentoo.org/943812 Closes: https://bugs.gentoo.org/945794 Signed-off-by: Nicolas PARLANT <nicolas.parlant <AT> parhuet.fr> Part-of: https://github.com/gentoo/gentoo/pull/43987 Closes: https://github.com/gentoo/gentoo/pull/43987 Signed-off-by: Sam James <sam <AT> gentoo.org> sci-electronics/gtkwave/Manifest | 1 + .../files/gtkwave-3.3.125-fix_bashism.patch | 32 +++++++ .../gtkwave/files/gtkwave-3.3.125-fix_c23.patch | 51 +++++++++++ .../gtkwave/files/gtkwave-3.3.125-fix_musl.patch | 18 ++++ sci-electronics/gtkwave/gtkwave-3.3.125.ebuild | 102 +++++++++++++++++++++ sci-electronics/gtkwave/metadata.xml | 4 +- 6 files changed, 207 insertions(+), 1 deletion(-) diff --git a/sci-electronics/gtkwave/Manifest b/sci-electronics/gtkwave/Manifest index e1f254eb565b..6f4dbdb26970 100644 --- a/sci-electronics/gtkwave/Manifest +++ b/sci-electronics/gtkwave/Manifest @@ -1,3 +1,4 @@ DIST gtkwave-3.3.106.tar.gz 3507185 BLAKE2B 89389c6eef2fb80b82b048fc94248cf6b30ec0d8fea1260189f2ea1f143123e0294d00f93a0c25f777b6e2c188041af16f4e26e5206e0c65fe23c1f058b19186 SHA512 4deec8dc88210ae542b8066763265450530756d34babf10c7820fe27b23d01e6d2f084ec74b7b0730a645fcb667ba3c0d2dcfb4111e702a523805041dc96768a DIST gtkwave-gtk3-3.3.111.tar.gz 3329907 BLAKE2B 523c5b3cb75581d9828d6a1e61df66a0a85ccc41415c9971affaf347948bc7a3b7850cf8abe4f3e57dab56d2f54722a121a8d3b757993d008e1598e4f2ce8843 SHA512 407c1ca87d9645940201c876846e7e6f5e4af67b919a4f63061adc017b2797be5ba10bb9bf132f1b86dff111a64b774e41b8b1630fc99997b5270622eda44c0c DIST gtkwave-gtk3-3.3.121.tar.gz 3367669 BLAKE2B 42a015de4d569bd41ac54972d1c4998abb753049e3f28d270c693f8108d5c2d56322494c899cc33121c8fcb01bdace90678fb014f039553284dc317a3dbb190c SHA512 d440a3553125490800f801d5f23461c0745e511c518e0eedd346a2fe2a087c4362488f4a018cba0b22af694e433b070fef882453b9c49e6d9fbe2e1b44966d26 +DIST gtkwave-gtk3-3.3.125.tar.gz 3513826 BLAKE2B 58a9dde2fe7dc1536dea6075bd37cce7c16a74e01c653da84dcce9048fa84ecf2aae2cc086d1ec39889ac95c5f616a7f258d20d098e3710c74663b40278b1348 SHA512 840c1f8c03cabb987633d2f7d06eefcaf9bc08a7942eef6e52faf5ac1a1ca6f5550314305593342916646a2a4a6c0609683a5c3235c7149bcb7b9f72558257e5 diff --git a/sci-electronics/gtkwave/files/gtkwave-3.3.125-fix_bashism.patch b/sci-electronics/gtkwave/files/gtkwave-3.3.125-fix_bashism.patch new file mode 100644 index 000000000000..05553d6efa0f --- /dev/null +++ b/sci-electronics/gtkwave/files/gtkwave-3.3.125-fix_bashism.patch @@ -0,0 +1,32 @@ +https://github.com/gtkwave/gtkwave/pull/455.patch +remove bashism +the dev branch uses meson +--- a/configure ++++ b/configure +@@ -7036,7 +7036,7 @@ $as_echo "$EXZ" >&6; } + + LIBXZ_LDADD= + LIBXZ_CFLAGS= +-if test "X$EXZ" == "Xyes"; then ++if test "X$EXZ" = "Xyes"; then + have_liblzma=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +@@ -7126,7 +7126,7 @@ fi + $as_echo "$FASTTREE" >&6; } + + FASTTREE_CFLAGS= +-if test "X$FASTTREE" == "Xno"; then ++if test "X$FASTTREE" = "Xno"; then + FASTTREE_CFLAGS='-DWAVE_DISABLE_FAST_TREE' + fi + +@@ -7153,7 +7153,7 @@ $as_echo "$EJUDY" >&6; } + + LIBJUDY_LDADD= + LIBJUDY_CFLAGS= +-if test "X$EJUDY" == "Xyes"; then ++if test "X$EJUDY" = "Xyes"; then + have_libjudy=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ diff --git a/sci-electronics/gtkwave/files/gtkwave-3.3.125-fix_c23.patch b/sci-electronics/gtkwave/files/gtkwave-3.3.125-fix_c23.patch new file mode 100644 index 000000000000..985babc24032 --- /dev/null +++ b/sci-electronics/gtkwave/files/gtkwave-3.3.125-fix_c23.patch @@ -0,0 +1,51 @@ +https://github.com/gtkwave/gtkwave/pull/455.patch +fix c23, remove old-style definition +the files have been removed in the dev branch +--- a/contrib/rtlbrowse/definehash.c ++++ b/contrib/rtlbrowse/definehash.c +@@ -46,9 +46,7 @@ inline + #endif + #endif + static unsigned int +-hash (str, len) +- register const char *str; +- register unsigned int len; ++hash (register const char *str, register unsigned int len) + { + static const unsigned char asso_values[] = + { +@@ -110,9 +108,7 @@ __attribute__ ((__gnu_inline__)) + #endif + #endif + const char * +-is_builtin_define (str, len) +- register const char *str; +- register unsigned int len; ++is_builtin_define (register const char *str, register unsigned int len) + { + static const char * const wordlist[] = + { +--- a/src/vcd_keywords.c ++++ b/src/vcd_keywords.c +@@ -58,9 +58,7 @@ inline + #endif + #endif + static unsigned int +-keyword_hash (str, len) +- register const char *str; +- register unsigned int len; ++keyword_hash (register const char *str, register unsigned int len) + { + static const unsigned char asso_values[] = + { +@@ -101,9 +99,7 @@ __attribute__ ((__gnu_inline__)) + #endif + #endif + const struct vcd_keyword * +-check_identifier (str, len) +- register const char *str; +- register unsigned int len; ++check_identifier (register const char *str, register unsigned int len) + { + static const struct vcd_keyword wordlist[] = + { diff --git a/sci-electronics/gtkwave/files/gtkwave-3.3.125-fix_musl.patch b/sci-electronics/gtkwave/files/gtkwave-3.3.125-fix_musl.patch new file mode 100644 index 000000000000..15af1de315af --- /dev/null +++ b/sci-electronics/gtkwave/files/gtkwave-3.3.125-fix_musl.patch @@ -0,0 +1,18 @@ +see https://bugs.gentoo.org/945794 +https://github.com/gtkwave/gtkwave/pull/455.patch +apply same ifdef as main.c +the getopt files have been deleted in the dev branch +--- a/src/globals.c ++++ b/src/globals.c +@@ -18,7 +18,11 @@ + #include "fgetdynamic.h" + #include "ghw.h" + #include "globals.h" ++#ifdef HAVE_GETOPT_LONG ++#include <getopt.h> ++#else + #include "gnu-getopt.h" ++#endif + #include "gnu_regex.h" + #include "gtk23compat.h" + #include "lx2.h" diff --git a/sci-electronics/gtkwave/gtkwave-3.3.125.ebuild b/sci-electronics/gtkwave/gtkwave-3.3.125.ebuild new file mode 100644 index 000000000000..8483ad8c97aa --- /dev/null +++ b/sci-electronics/gtkwave/gtkwave-3.3.125.ebuild @@ -0,0 +1,102 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic gnome2-utils toolchain-funcs xdg + +MY_P="${PN}-gtk3-${PV}" +DESCRIPTION="Wave viewer for LXT, LXT2, VZT, GHW and standard Verilog VCD/EVCD files" +HOMEPAGE="https://gtkwave.github.io/gtkwave/" +SRC_URI="https://downloads.sourceforge.net/project/${PN}/${MY_P}/${MY_P}.tar.gz" +S="${WORKDIR}/${MY_P}" + +LICENSE="GPL-2+ MIT" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux" +IUSE="fasttree judy lzma tcl wayland X" + +RDEPEND=" + app-arch/bzip2 + dev-libs/glib:2 + sys-libs/zlib + x11-libs/cairo + x11-libs/gdk-pixbuf:2 + x11-libs/pango + x11-libs/gtk+:3[wayland?,X?] + judy? ( dev-libs/judy ) + tcl? ( + dev-lang/tcl:0= + dev-lang/tk:0= + ) + lzma? ( app-arch/xz-utils ) +" +DEPEND=" + ${RDEPEND} + net-libs/libtirpc +" +BDEPEND=" + dev-util/gperf + virtual/pkgconfig +" + +PATCHES=( + # https://github.com/gtkwave/gtkwave/pull/455 + "${FILESDIR}"/${PN}-3.3.125-fix_bashism.patch + "${FILESDIR}"/${PN}-3.3.125-fix_c23.patch + "${FILESDIR}"/${PN}-3.3.125-fix_musl.patch +) + +src_prepare() { + default + + # doc and examples are installed manually then in the right path + sed -i -e 's/doc examples//' Makefile.in || die +} + +src_configure() { + # defang automagic dependencies + use wayland || append-cppflags -DGENTOO_GTK_HIDE_WAYLAND + use X || append-cppflags -DGENTOO_GTK_HIDE_X11 + + export ac_cv_path_PKG_CONFIG="$(tc-getPKG_CONFIG)" + local myeconfargs=( + --disable-mime-update + --disable-struct-pack # runtime error w/ UBSAN + --enable-largefile + --enable-gtk3 + --with-gsettings + --with-tirpc + $(use_enable tcl) + $(use_enable lzma xz) + $(use_enable fasttree) + $(use_enable judy) + ) + econf "${myeconfargs[@]}" +} + +src_compile() { + # AR for tcl.m4 + emake AR="$(tc-getAR)" +} + +src_install() { + default + + insinto /usr/share/metainfo + doins share/appdata/io.github.gtkwave.GTKWave.metainfo.xml + + dodoc doc/${PN}.odt + dodoc -r examples + docompress -x /usr/share/doc/${PF}/examples /usr/share/doc/${PF}/${PN}.odt +} + +pkg_postinst() { + xdg_pkg_postinst + gnome2_schemas_update +} + +pkg_postrm() { + xdg_pkg_postrm + gnome2_schemas_update +} diff --git a/sci-electronics/gtkwave/metadata.xml b/sci-electronics/gtkwave/metadata.xml index 9fdfe8809658..0edb52769549 100644 --- a/sci-electronics/gtkwave/metadata.xml +++ b/sci-electronics/gtkwave/metadata.xml @@ -17,6 +17,8 @@ <flag name="packed">Enables '#pragma pack' for data arrays (saves memory, costs time).</flag> </use> <upstream> - <remote-id type="sourceforge">gtkwave</remote-id> + <bugs-to>https://github.com/gtkwave/gtkwave/issues</bugs-to> + <remote-id type="sourceforge">gtkwave</remote-id><!-- lts --> + <remote-id type="github">gtkwave/gtkwave</remote-id><!-- dev --> </upstream> </pkgmetadata>
