summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArsen Arsenović <arsen@gentoo.org>2023-01-20 22:21:46 +0100
committerArsen Arsenović <arsen@gentoo.org>2023-01-20 23:15:47 +0100
commitbeeee0f2ecaab6d84125cc5ab6dba954b6222dd5 (patch)
tree1d7aae16b3cbc90b874f5689b5ee975492a4a4d7 /x11-libs/wxGTK
parentx11-libs/wxGTK: Version bump to 3.2.1 (diff)
downloadgentoo-beeee0f2ecaab6d84125cc5ab6dba954b6222dd5.tar.gz
gentoo-beeee0f2ecaab6d84125cc5ab6dba954b6222dd5.tar.bz2
gentoo-beeee0f2ecaab6d84125cc5ab6dba954b6222dd5.zip
x11-libs/wxGTK: fix automagic deps, broken test, drop unused SRC_URI
Signed-off-by: Arsen Arsenović <arsen@gentoo.org>
Diffstat (limited to 'x11-libs/wxGTK')
-rw-r--r--x11-libs/wxGTK/files/wxGTK-3.2.1-prefer-lib64-in-tests.patch33
-rw-r--r--x11-libs/wxGTK/files/wxGTK-3.2.1-wayland-control.patch185
-rw-r--r--x11-libs/wxGTK/metadata.xml1
-rw-r--r--x11-libs/wxGTK/wxGTK-3.2.1.ebuild75
4 files changed, 279 insertions, 15 deletions
diff --git a/x11-libs/wxGTK/files/wxGTK-3.2.1-prefer-lib64-in-tests.patch b/x11-libs/wxGTK/files/wxGTK-3.2.1-prefer-lib64-in-tests.patch
new file mode 100644
index 000000000000..748eeb4dd328
--- /dev/null
+++ b/x11-libs/wxGTK/files/wxGTK-3.2.1-prefer-lib64-in-tests.patch
@@ -0,0 +1,33 @@
+From eafc2ad88b9164a8ef6bd2f6d79e8d7da90246e8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= <arsen@aarsen.me>
+Date: Mon, 19 Dec 2022 12:30:09 +0100
+Subject: [PATCH] tests: Prefer /lib64 to /lib in DynamicLibrary test
+
+---
+Upstream has been notified about this test failure, however, I'd prefer a
+different fix in place of this one, so I haven't sent a patch in yet.
+
+https://github.com/wxWidgets/wxWidgets/commit/512b8033feef6ba99c4dfdf6ada42a56d7425d6d
+
+ tests/misc/dynamiclib.cpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/tests/misc/dynamiclib.cpp b/tests/misc/dynamiclib.cpp
+index 020eb5b..ee41f1d 100644
+--- a/tests/misc/dynamiclib.cpp
++++ b/tests/misc/dynamiclib.cpp
+@@ -37,9 +37,10 @@ TEST_CASE("DynamicLibrary::Load", "[dynlib]")
+ #else // other Unix
+ static const char* const candidateDirs[] =
+ {
++ "/lib64",
++ "/usr/lib64",
+ "/lib/x86_64-linux-gnu",
+ "/lib",
+- "/lib64",
+ "/usr/lib",
+ };
+
+--
+2.39.0
+
diff --git a/x11-libs/wxGTK/files/wxGTK-3.2.1-wayland-control.patch b/x11-libs/wxGTK/files/wxGTK-3.2.1-wayland-control.patch
new file mode 100644
index 000000000000..568c3b760fd2
--- /dev/null
+++ b/x11-libs/wxGTK/files/wxGTK-3.2.1-wayland-control.patch
@@ -0,0 +1,185 @@
+From d886c4cada68ed5bfdca72de846182be63f2619e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= <arsen@aarsen.me>
+Date: Mon, 19 Dec 2022 11:30:58 +0100
+Subject: [PATCH] configure.in: Allow disabling Wayland support
+
+---
+This patch is not forwarded upstream since, AFAIK, the autoconf+bakefile build
+system is currently in the process of being replaced.
+
+This patch enables us to explicitly disable GDK wayland platform detection via
+an enable flag. It doesn't implement failed detection logic since that
+shouldn't happen in the scenario Portage is in. This patch also runs includes
+patches for the configure script itself, because the configuration was
+generated by a seemingly patched Autoconf 2.69.
+
+ configure | 53 +++++++++++++++++++++++++++++++++++++++++++---------
+ configure.in | 37 ++++++++++++++++++++----------------
+ 2 files changed, 65 insertions(+), 25 deletions(-)
+
+diff --git a/configure b/configure
+index 54eb7a7..b6d5e52 100755
+--- a/configure
++++ b/configure
+@@ -1218,6 +1218,7 @@ enable_textfile
+ enable_timer
+ enable_variant
+ enable_zipstream
++enable_wayland
+ enable_url
+ enable_protocol
+ enable_protocol_http
+@@ -2190,6 +2191,7 @@ Optional Features:
+ --enable-timer use wxTimer class
+ --enable-variant use wxVariant class
+ --enable-zipstream use wxZip streams
++ --enable-wayland allow using Wayland EGL backend
+ --enable-url use wxURL class
+ --enable-protocol use wxProtocol class
+ --enable-protocol-http HTTP support in wxProtocol
+@@ -8228,6 +8230,35 @@ fi
+ eval "$wx_cv_use_zipstream"
+
+
++ enablestring=
++ defaultval=$wxUSE_ALL_FEATURES
++ if test -z "$defaultval"; then
++ if test x"$enablestring" = xdisable; then
++ defaultval=yes
++ else
++ defaultval=no
++ fi
++ fi
++
++ # Check whether --enable-wayland was given.
++if test "${enable_wayland+set}" = set; then :
++ enableval=$enable_wayland;
++ if test "$enableval" = yes; then
++ wx_cv_use_wayland='wxUSE_WAYLAND=yes'
++ else
++ wx_cv_use_wayland='wxUSE_WAYLAND=no'
++ fi
++
++else
++
++ wx_cv_use_wayland='wxUSE_WAYLAND=${'DEFAULT_wxUSE_WAYLAND":-$defaultval}"
++
++fi
++
++
++ eval "$wx_cv_use_wayland"
++
++
+
+ enablestring=
+ defaultval=$wxUSE_ALL_FEATURES
+@@ -29335,26 +29366,27 @@ done
+ TOOLKIT=GTK
+ GUIDIST=GTK_DIST
+
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GDK Wayland backend" >&5
++ if test x"$wxUSE_WAYLAND" = xyes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GDK Wayland backend" >&5
+ $as_echo_n "checking for GDK Wayland backend... " >&6; }
+ if ${wx_cv_gdk_wayland+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+
+- save_CFLAGS=$CFLAGS
+- CFLAGS="$CFLAGS $TOOLKIT_INCLUDE"
+- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ save_CFLAGS=$CFLAGS
++ CFLAGS="$CFLAGS $TOOLKIT_INCLUDE"
++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+
+- #include <gdk/gdk.h>
++ #include <gdk/gdk.h>
+
+ int
+ main ()
+ {
+
+- #ifndef GDK_WINDOWING_WAYLAND
+- Not GDK Windowing Wayland
+- #endif
++ #ifndef GDK_WINDOWING_WAYLAND
++ Not GDK Windowing Wayland
++ #endif
+
+ ;
+ return 0;
+@@ -29367,11 +29399,14 @@ else
+
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+- CFLAGS=$save_CFLAGS
++ CFLAGS=$save_CFLAGS
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $wx_cv_gdk_wayland" >&5
+ $as_echo "$wx_cv_gdk_wayland" >&6; }
++ else
++ wx_cv_gdk_wayland=no
++ fi
+
+ if test "$wxUSE_GPE" = "yes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gpewidget library" >&5
+diff --git a/configure.in b/configure.in
+index c76c528..430cdff 100644
+--- a/configure.in
++++ b/configure.in
+@@ -779,6 +779,7 @@ WX_ARG_FEATURE(textfile, [ --enable-textfile use wxTextFile class],
+ WX_ARG_FEATURE(timer, [ --enable-timer use wxTimer class], wxUSE_TIMER)
+ WX_ARG_FEATURE(variant, [ --enable-variant use wxVariant class], wxUSE_VARIANT)
+ WX_ARG_FEATURE(zipstream, [ --enable-zipstream use wxZip streams], wxUSE_ZIPSTREAM)
++WX_ARG_FEATURE(wayland, [ --enable-wayland allow using Wayland EGL backend], wxUSE_WAYLAND)
+
+ dnl URL-related classes
+ WX_ARG_FEATURE(url, [ --enable-url use wxURL class], wxUSE_URL)
+@@ -3292,22 +3293,26 @@ libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config
+ TOOLKIT=GTK
+ GUIDIST=GTK_DIST
+
+- AC_CACHE_CHECK([for GDK Wayland backend], wx_cv_gdk_wayland, [
+- save_CFLAGS=$CFLAGS
+- CFLAGS="$CFLAGS $TOOLKIT_INCLUDE"
+- AC_TRY_COMPILE([
+- #include <gdk/gdk.h>
+- ],
+- [
+- #ifndef GDK_WINDOWING_WAYLAND
+- Not GDK Windowing Wayland
+- #endif
+- ],
+- wx_cv_gdk_wayland=yes,
+- wx_cv_gdk_wayland=no
+- )
+- CFLAGS=$save_CFLAGS
+- ])
++ if test x"$wxUSE_WAYLAND" = xyes; then
++ AC_CACHE_CHECK([for GDK Wayland backend], wx_cv_gdk_wayland, [
++ save_CFLAGS=$CFLAGS
++ CFLAGS="$CFLAGS $TOOLKIT_INCLUDE"
++ AC_TRY_COMPILE([
++ #include <gdk/gdk.h>
++ ],
++ [
++ #ifndef GDK_WINDOWING_WAYLAND
++ Not GDK Windowing Wayland
++ #endif
++ ],
++ wx_cv_gdk_wayland=yes,
++ wx_cv_gdk_wayland=no
++ )
++ CFLAGS=$save_CFLAGS
++ ])
++ else
++ wx_cv_gdk_wayland=no
++ fi
+
+ dnl test for external libxpm if we're configured to use it
+ if test "$wxUSE_GPE" = "yes"; then
+--
+2.39.0
+
diff --git a/x11-libs/wxGTK/metadata.xml b/x11-libs/wxGTK/metadata.xml
index 45dc9be8c61f..afaa0b148051 100644
--- a/x11-libs/wxGTK/metadata.xml
+++ b/x11-libs/wxGTK/metadata.xml
@@ -17,6 +17,7 @@
</use>
<upstream>
<remote-id type="sourceforge">wxpython</remote-id>
+ <remote-id type="github">wxWidgets/wxWidgets</remote-id>
</upstream>
<slots>
<slot name="*">Slots reflect MAJOR.MINOR versions which can
diff --git a/x11-libs/wxGTK/wxGTK-3.2.1.ebuild b/x11-libs/wxGTK/wxGTK-3.2.1.ebuild
index 479152cb5f24..0bcdd7c96f09 100644
--- a/x11-libs/wxGTK/wxGTK-3.2.1.ebuild
+++ b/x11-libs/wxGTK/wxGTK-3.2.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -14,41 +14,51 @@ DESCRIPTION="GTK version of wxWidgets, a cross-platform C++ GUI toolkit"
HOMEPAGE="https://wxwidgets.org/"
SRC_URI="
https://github.com/wxWidgets/wxWidgets/releases/download/v${PV}/wxWidgets-${PV}.tar.bz2
- https://dev.gentoo.org/~leio/distfiles/wxGTK-3.0.5_p20210214.tar.xz
doc? ( https://github.com/wxWidgets/wxWidgets/releases/download/v${PV}/wxWidgets-${PV}-docs-html.tar.bz2 )"
S="${WORKDIR}/wxWidgets-${PV}"
LICENSE="wxWinLL-3 GPL-2 doc? ( wxWinFDL-3 )"
SLOT="${WXRELEASE}"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE="+X doc debug gstreamer libnotify opengl pch sdl test tiff webkit"
-REQUIRED_USE="test? ( tiff ) tiff? ( X )"
+IUSE="+X curl doc debug gnome-keyring gstreamer libnotify +lzma opengl pch sdl +spell test tiff wayland webkit"
+REQUIRED_USE="test? ( tiff ) tiff? ( X ) spell? ( X ) gnome-keyring? ( X )"
RESTRICT="!test? ( test )"
RDEPEND="
>=app-eselect/eselect-wxwidgets-20131230
dev-libs/expat[${MULTILIB_USEDEP}]
+ dev-libs/libpcre2[pcre16,pcre32,unicode]
sdl? ( media-libs/libsdl2[${MULTILIB_USEDEP}] )
+ curl? ( net-misc/curl )
+ lzma? ( app-arch/xz-utils )
X? (
>=dev-libs/glib-2.22:2[${MULTILIB_USEDEP}]
media-libs/libjpeg-turbo:=[${MULTILIB_USEDEP}]
media-libs/libpng:0=[${MULTILIB_USEDEP}]
sys-libs/zlib[${MULTILIB_USEDEP}]
x11-libs/cairo[${MULTILIB_USEDEP}]
- x11-libs/gtk+:3[${MULTILIB_USEDEP}]
- x11-libs/gdk-pixbuf[${MULTILIB_USEDEP}]
+ x11-libs/gtk+:3[wayland?,${MULTILIB_USEDEP}]
+ x11-libs/gdk-pixbuf:2[${MULTILIB_USEDEP}]
x11-libs/libSM[${MULTILIB_USEDEP}]
x11-libs/libX11[${MULTILIB_USEDEP}]
+ x11-libs/libXtst
x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
+ media-libs/fontconfig
x11-libs/pango[${MULTILIB_USEDEP}]
+ gnome-keyring? ( app-crypt/libsecret )
gstreamer? (
media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
media-libs/gst-plugins-base:1.0[${MULTILIB_USEDEP}]
+ media-libs/gst-plugins-bad:1.0[${MULTILIB_USEDEP}]
)
libnotify? ( x11-libs/libnotify[${MULTILIB_USEDEP}] )
- opengl? ( virtual/opengl[${MULTILIB_USEDEP}] )
- tiff? ( media-libs/tiff:0[${MULTILIB_USEDEP}] )
- webkit? ( net-libs/webkit-gtk:4 )
+ opengl? (
+ virtual/opengl[${MULTILIB_USEDEP}]
+ wayland? ( dev-libs/wayland )
+ )
+ spell? ( app-text/gspell:= )
+ tiff? ( media-libs/tiff:=[${MULTILIB_USEDEP}] )
+ webkit? ( net-libs/webkit-gtk:4= )
)"
DEPEND="${RDEPEND}
opengl? ( virtual/glu[${MULTILIB_USEDEP}] )
@@ -58,27 +68,52 @@ BDEPEND="
>=app-eselect/eselect-wxwidgets-20131230
virtual/pkgconfig"
+# Note about the gst-plugin-base dep: The build system queries for it,
+# but doesn't link it for some reason? Either way - probably best to
+# depend on it anyway.
+# Note about the wayland dep: Appears to be only required for the OpenGL
+# canvas, and it seems impossible to disable the X dependency, unless
+# I'm missing something. This is an automagic header dep, though.
+
PATCHES=(
#"${WORKDIR}"/wxGTK-3.0.5_p20210214/
"${FILESDIR}"/${P}-gtk3-translation-domain.patch
#"${FILESDIR}"/wxGTK-ignore-c++-abi.patch #676878
"${FILESDIR}/${P}-configure-tests.patch"
+ "${FILESDIR}/${P}"-wayland-control.patch
+ "${FILESDIR}/${P}"-prefer-lib64-in-tests.patch
)
src_prepare() {
default
+ # find . -iname Makefile.in -not -path ./samples'/*' \
+ # | xargs grep -l WX_RELEASE
+ local versioned_makefiles=(
+ ./tests/benchmarks/Makefile.in
+ ./tests/Makefile.in
+ ./utils/emulator/src/Makefile.in
+ ./utils/execmon/Makefile.in
+ ./utils/wxrc/Makefile.in
+ ./utils/helpview/src/Makefile.in
+ ./utils/hhp2cached/Makefile.in
+ ./utils/screenshotgen/src/Makefile.in
+ ./utils/ifacecheck/src/Makefile.in
+ ./Makefile.in
+ ./demos/life/Makefile.in
+ ./demos/bombs/Makefile.in
+ ./demos/fractal/Makefile.in
+ ./demos/forty/Makefile.in
+ ./demos/poem/Makefile.in
+ )
+
# Versionating
sed -i \
-e "s:\(WX_RELEASE = \).*:\1${WXRELEASE}:"\
-e "s:\(WX_RELEASE_NODOT = \).*:\1${WXRELEASE_NODOT}:"\
-e "s:\(WX_VERSION = \).*:\1${WXVERSION}:"\
-e "s:aclocal):aclocal/wxwin${WXRELEASE_NODOT}.m4):" \
- Makefile.in tests/Makefile.in || die
-
- sed -i \
- -e "s:\(WX_RELEASE = \).*:\1${WXRELEASE}:"\
- utils/wxrc/Makefile.in || die
+ "${versioned_makefiles[@]}" || die
sed -i \
-e "s:\(WX_VERSION=\).*:\1${WXVERSION}:" \
@@ -95,6 +130,9 @@ multilib_src_configure() {
--with-expat=sys
--enable-compat30
$(use_with sdl)
+ $(use_with lzma liblzma)
+ # Currently defaults to curl, could change. Watch the VDB!
+ $(use_enable curl webrequest)
# PCHes are unstable and are disabled in-tree where possible
# See bug #504204
@@ -124,13 +162,20 @@ multilib_src_configure() {
--with-gtk=3
--with-libpng=sys
--with-libjpeg=sys
+
+ # Choosing to enable this unconditionally seems fair, pcre2 is
+ # almost certain to be installed.
+ --with-regex=sys
--without-gnomevfs
$(use_enable gstreamer mediactrl)
$(multilib_native_use_enable webkit webview)
$(use_with libnotify)
$(use_with opengl)
$(use_with tiff libtiff sys)
+ $(use_enable gnome-keyring secretstore)
+ $(use_enable spell spellcheck)
$(use_enable test tests)
+ $(use_enable wayland)
)
# wxBase options
@@ -141,7 +186,7 @@ multilib_src_configure() {
multilib_src_test() {
emake -C tests
- (cd tests && ./test) || die
+ (cd tests && ./test '~[.]~[net]') || die
}
multilib_src_install_all() {