summaryrefslogtreecommitdiff
path: root/x11-libs/wxGTK
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-01-20 23:41:21 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-01-20 23:41:21 +0000
commit374561aeaff53ce5a2836af934749923b4ea3763 (patch)
tree66880cb44879bf28002f361a4c862814df616b8f /x11-libs/wxGTK
parentea0515fa73da4755b498bdb18bd7fd7a13e616cf (diff)
gentoo auto-resync : 20:01:2023 - 23:41:20
Diffstat (limited to 'x11-libs/wxGTK')
-rw-r--r--x11-libs/wxGTK/Manifest9
-rw-r--r--x11-libs/wxGTK/files/wxGTK-3.2.1-configure-tests.patch19
-rw-r--r--x11-libs/wxGTK/files/wxGTK-3.2.1-gtk3-translation-domain.patch12
-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.ebuild222
7 files changed, 480 insertions, 1 deletions
diff --git a/x11-libs/wxGTK/Manifest b/x11-libs/wxGTK/Manifest
index 42ff656d8068..8f8013a35c6a 100644
--- a/x11-libs/wxGTK/Manifest
+++ b/x11-libs/wxGTK/Manifest
@@ -1,5 +1,9 @@
AUX wxGTK-3.0-gtk3-translation-domain.patch 454 BLAKE2B fd0b6d6a0c1fe7f1dfbd7692d549dfd6f78c85e25f06e2e44630ca9b3c9dda4c12af2df6e4fcc02de73e75524631b858cc21b9f63b8799b0d157a38bd5541fac SHA512 8cdf57558e8d09e3e0613c25ac7701cce0bf78da13060e2b36167b69b8ae4f265607cb5216a33054f6c0c2f21beba8cc7f8297f4de2b2db1ec9f3f5bb8177ff3
AUX wxGTK-3.0.5-collision.patch 6298 BLAKE2B 711d7b94b6a0de4bdda21caa2bfcfd799c0d57a8d1d4a820e6da397768b075f415b8e438502167446b3be6b948420d1c1a31c401bd5e7bb2b549e3a95dcccad8 SHA512 62bbf952eac4a3485a2cfa3e6908b2272cb6f47632f17e60f413ad34b64e331423189a31c4259c8283120b4b1351f915e226f5c749787a5c69737779cc9edb59
+AUX wxGTK-3.2.1-configure-tests.patch 478 BLAKE2B 1fdbb7d04c4100b39234c15181e3ea0301bf9c4f17da75fe3e52531cf877e26f1523bd7bc70192d87614f32e74dcd65509454baf97c7d0def088a797f1674c30 SHA512 95847ed7727670884b7d6570907c7a8ab6b9ba2eed81e575e8f21f957b41f630b424ed61e2cbc40c55f13669d5428daa70721bd4ffcbdd7f9f706618325c4d36
+AUX wxGTK-3.2.1-gtk3-translation-domain.patch 425 BLAKE2B c517b85a352e010e8002de6e2e282728e1f9ee47d22380072d15e35723e65d0a417c06b23f0c50e8d91036611ee0bfe54ba124c4294ec248de3a5cb64b35a448 SHA512 0e5b01958c848b81008a2296405e4de33da46445553d555deeed215928d90583a4da61de4bdceb1fb3745cce53118b7bc29be73f511f0bdb9c3c6b193f2f6c24
+AUX wxGTK-3.2.1-prefer-lib64-in-tests.patch 1016 BLAKE2B b2d7cac45af6a0e5e118c8688db5e5a60e144dc5e82f4653f4dfea53fa969c3af0ca2c4ce1d6d430bc8e6aef45c4d946e8cf65cf6c53222981fcdde005d05e09 SHA512 a5c7c81af28d637a31c93d2296e1c1b5456038c0703c3d32f136188435ab3e7f4766805dcb73dac0d976eac7cb6e4c86923cca023543b29b735d5ea87ccb2b1b
+AUX wxGTK-3.2.1-wayland-control.patch 6150 BLAKE2B 4aef8ab0fb4e2352afba139cc539f77b1c0825ee7c4a33c0f2fc41bcbadd943a90c55dced954f362f73995d2232d54b1815725a0c5d03325c64d0a00d92191aa SHA512 995eeb0409293247756eddde8bf8fcee87ded284bb0f9faac27ae511483e0131e4802bdb9d93063097273e83b55b08328dd0380639fcb265352991cf3d34fc1d
AUX wxGTK-configure-tests.patch 560 BLAKE2B 86a735c58abc8690cd943ff58a39140a636c56dcde08f47d27dbdcf99790216ebe0f4524f2f7cd67e35748c32adaee377c4e8a4b606975115c666cbc453b5173 SHA512 f02b708e5de66a4a7dce9f1adef1ebd1461ef68acee502b54d514a0ce4e5fe998eaad9a9ec7b1bec9aa4d8803a4042111ea4cddafe8e2f68d3d122faf90465df
AUX wxGTK-ignore-c++-abi.patch 1657 BLAKE2B 5d865c83174f2540b798a2930f8d5ae8336f031214691fe7d5cd8c283faf9511fff260735d9dcd293e6377be0e96a6521e84ceae4560f2fef8fc7e7ed5642cd6 SHA512 649551eeacc9915f249ece1c3ed79959f0f0129e54373bfbe84ea5fbf2b8e0ba7778d6a22ac6f165e5d4e85a3ea4320274296b1b2a8e623acb11300fe44478f8
DIST wxGTK-3.0.4_p20190713.tar.xz 53640 BLAKE2B 89eabc44660f8f9b19fc850717eb83244a746f2f8c28bcec89fa9ccd1828f103df114bce24406ff14875220de86276f9e51870d58e716f0c94d310707f7eae4c SHA512 44a4e92ccc9c143a0e70e015116e952b0529001a3a1e23193d501826720a505259ead6feaa08de75b4a7a8753f8b16f5cc14e4bff5d15585870066ccd1de53b9
@@ -8,6 +12,9 @@ DIST wxWidgets-3.0.4-docs-html.tar.bz2 24122986 BLAKE2B ffd38d50e6cb44077f346597
DIST wxWidgets-3.0.4.tar.bz2 20204622 BLAKE2B 97b9f3f44f080104cae290bc3e162b51ce27a96fb22b191d52f30db1f1dc7951defcc220afc4dcb8417cfe23490762c2a25f62164ac21809f73ccf442dd19347 SHA512 c9e6b35d541a99921c54cfdac260843f574f146b27f924a7a0fca5007344fa99865a96ded95e6802329ad9221b4880d62b92277a1b4c1ce71420acb672ad9158
DIST wxWidgets-3.0.5-docs-html.tar.bz2 23844256 BLAKE2B f5b5bef129302ae1ded7a651e652b127ad9d548a00a498f06a4d4f868dc3bc33411ded2602c04c8329e927550d032bdbe633c2c7d1a7f89265874685d3cb3d9b SHA512 f839e67660f2b08aa28d1596a3b7af2c35f7c2c0505c6e6d45888845397212b3dd71c8d34115321e9a4347b9d92a0ce767bb76defd14c172e51c2a3df96cc3ac
DIST wxWidgets-3.0.5.1.tar.bz2 19739206 BLAKE2B da270cb8e4fc22b8d892ba80fbb4cc71578f642ca07102006f914a80331a254e746de6c91e61b585c0b1ab3abadd17d80a0eaa3efd48a3d412cf7202101abc7a SHA512 0a789fc5e71d414e43f75b5c16076fe8b1bcd7671be0770e4269dcef66d830c1bc74e183f49db270b928862f13472666c283fe2aa98b9006681722e06100725d
+DIST wxWidgets-3.2.1-docs-html.tar.bz2 18213181 BLAKE2B 2df358f0dda08e2a790efed2838c3298bb14e68d778a6cf2ad5630a1f166800228887aa7f0eb3998e155f8f4329007a605f8e33597aa502f72a7b8273cb850f5 SHA512 ab5263104a93622ebc4c703ea6b91a0a2cf0f0a090fb81786f0187fdacd2374cbc6e317f579a2da343719234ddfb29ae7449a26c9d5e35650a723a2246d92c5e
+DIST wxWidgets-3.2.1.tar.bz2 27266651 BLAKE2B f1eda8795f1cba10903e9e3ed6f683520a707ea40d2bb5a0d7f53fcb38a31c67c1cf07b8e704f107627ead9a90b1efec68c5986e5420b393b70ea23d305dab64 SHA512 d0294788891014672d8eb4501ae257598972407b53f38471e4f11dd20f517d0145d510c5bce006b09c5d63113fed844bdf6124b3c80453c1d37b402abc89202b
EBUILD wxGTK-3.0.4-r5.ebuild 3752 BLAKE2B 57acf7f620095191b662e806496ddc5ed38fed912edb57d352b292be0ca65aa86ac547b06049a35ef2359cca0e6990887d133bbb1f7a1f75aa1be08b30bb3bef SHA512 cd84b28e0456e899ddf9bf84607fa9f411ca81efe064d2f7b015102186abaf175c150f26c7b61e109809f86b080d49f386927a01f41b53d0b8d05e18135561a9
EBUILD wxGTK-3.0.5.1-r1.ebuild 5495 BLAKE2B f3daf6569a27e61c3cb60eef9a29aea35305e48523ef6572639905e81757f12e5a41b9e93fecbfdcdb5bf55a29db7d47515d0e2c9c40630bc4b611fa4cc17665 SHA512 2718f47aed0f875407117f85b28f7ba385e2def712fe7be4256d94211ef0d56f7e5eee0f72cc94644500f93c6b5e75ea01c16009ea7065cf112b3d102c6c6a7b
-MISC metadata.xml 760 BLAKE2B e665c57ff50c54f0630ca7d7f78764f81d516cb93c397f6c4e90e57534d18bf54872a291c2c928b57e6b630d7a8ff7b385677de07de970490ad810983d5f61d3 SHA512 7f2e0cfc91d5622ecbe4dd94452ccb130214b68e89e400a7f9ef505f9bb28cac9bd585c1a612c45bd314a8fa0291f74cbf3c31718b1bb11cad584b80bca99d24
+EBUILD wxGTK-3.2.1.ebuild 6879 BLAKE2B edd2995e2721941feb9bb5c40c1b962b120b8376bed0616054127e7379938726f171bdb9e831cb2438f8768af20263b034a8fdece1695e8609d04285976093fa SHA512 95f977ec94bfbef99bbb23e05bb590d871dbe32c9c30716b07f30e54bbedc8056bb199a2e37e4b8304c5f689a334f338bde3b4c86b472a33a94d05300f045f09
+MISC metadata.xml 819 BLAKE2B c9052655db836a68198339b6c0e77470ee1e7170f65e3a86e8d5aa520a1aeb5975f7b834615349fda452324ba4a9e636f3750a3dd09288fab3df479c5b1a64a4 SHA512 e2680bd132ea096a1ca499e287e50b880ba038ebeb2cf39672af33fca07abc377f18943cd37de277b5b1cb26068ad2bad096233c3ff168981c9f3f513c3a2719
diff --git a/x11-libs/wxGTK/files/wxGTK-3.2.1-configure-tests.patch b/x11-libs/wxGTK/files/wxGTK-3.2.1-configure-tests.patch
new file mode 100644
index 000000000000..fe90b3aab0d9
--- /dev/null
+++ b/x11-libs/wxGTK/files/wxGTK-3.2.1-configure-tests.patch
@@ -0,0 +1,19 @@
+diff --git a/configure b/configure
+index d2acb7d..69ae083 100755
+--- a/configure
++++ b/configure
+@@ -45622,6 +45622,14 @@ $as_echo "yes" >&6; }
+ fi
+ fi
+
++# explicit override to enable or disable tests
++if test "${enable_tests+set}" = set; then
++ SUBDIRS="$SUBDIRS tests"
++fi
++if test "${disable_tests+set}" = set; then
++ SUBDIRS="${SUBDIRS% tests}"
++fi
++
+ for subdir in $SUBDIRS; do
+ if test -d ${srcdir}/${subdir} ; then
+ if test "$wxUSE_GUI" = "yes"; then
diff --git a/x11-libs/wxGTK/files/wxGTK-3.2.1-gtk3-translation-domain.patch b/x11-libs/wxGTK/files/wxGTK-3.2.1-gtk3-translation-domain.patch
new file mode 100644
index 000000000000..9fbb9d8bc064
--- /dev/null
+++ b/x11-libs/wxGTK/files/wxGTK-3.2.1-gtk3-translation-domain.patch
@@ -0,0 +1,12 @@
+Modify AddStdCatalog to use the versioned wxstd32-gtk3.mo.
+--- a/src/common/translation.cpp
++++ b/src/common/translation.cpp
+@@ -1409,7 +1409,7 @@ bool wxTranslations::AddStdCatalog()
+ if ( AddCatalog("wxstd-" wxSTRINGIZE(wxMAJOR_VERSION) "." wxSTRINGIZE(wxMINOR_VERSION)) )
+ return true;
+
+- if ( AddCatalog(wxS("wxstd")) )
++ if ( AddCatalog(wxS("wxstd32-gtk3")) )
+ return true;
+
+ return false;
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
new file mode 100644
index 000000000000..0bcdd7c96f09
--- /dev/null
+++ b/x11-libs/wxGTK/wxGTK-3.2.1.ebuild
@@ -0,0 +1,222 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit multilib-minimal
+
+WXSUBVERSION=${PV}-gtk3 # 3.2.1-gtk3
+WXVERSION=${PV} # 3.2.1
+WXRELEASE=${WXVERSION%.*}-gtk3 # 3.2-gtk3
+WXRELEASE_NODOT=${WXRELEASE//./} # 32-gtk3
+
+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
+ 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 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[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}]
+ 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}] )
+ X? ( x11-base/xorg-proto )"
+BDEPEND="
+ test? ( >=dev-util/cppunit-1.8.0 )
+ >=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):" \
+ "${versioned_makefiles[@]}" || die
+
+ sed -i \
+ -e "s:\(WX_VERSION=\).*:\1${WXVERSION}:" \
+ -e "s:\(WX_RELEASE=\).*:\1${WXRELEASE}:" \
+ -e "s:\(WX_SUBVERSION=\).*:\1${WXSUBVERSION}:" \
+ -e '/WX_VERSION_TAG=/ s:${WX_RELEASE}:3.0:' \
+ configure || die
+}
+
+multilib_src_configure() {
+ # X independent options
+ local myeconfargs=(
+ --with-zlib=sys
+ --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
+ # Commits 8c4774042b7fdfb08e525d8af4b7912f26a2fdce, fb809aeadee57ffa24591e60cfb41aecd4823090
+ $(use_enable pch precomp-headers)
+
+ # Don't hard-code libdir's prefix for wx-config
+ --libdir='${prefix}'/$(get_libdir)
+ )
+
+ # debug in >=2.9
+ # there is no longer separate debug libraries (gtk2ud)
+ # wxDEBUG_LEVEL=1 is the default and we will leave it enabled
+ # wxDEBUG_LEVEL=2 enables assertions that have expensive runtime costs.
+ # apps can disable these features by building w/ -NDEBUG or wxDEBUG_LEVEL_0.
+ # http://docs.wxwidgets.org/3.0/overview_debugging.html
+ # https://groups.google.com/group/wx-dev/browse_thread/thread/c3c7e78d63d7777f/05dee25410052d9c
+ use debug && myeconfargs+=( --enable-debug=max )
+
+ # wxGTK options
+ # --enable-graphics_ctx - needed for webkit, editra
+ # --without-gnomevfs - bug #203389
+ use X && myeconfargs+=(
+ --enable-graphics_ctx
+ --with-gtkprint
+ --enable-gui
+ --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
+ ! use X && myeconfargs+=( --disable-gui )
+
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_test() {
+ emake -C tests
+ (cd tests && ./test '~[.]~[net]') || die
+}
+
+multilib_src_install_all() {
+ cd docs || die
+ dodoc changes.txt readme.txt
+ newdoc base/readme.txt base_readme.txt
+ newdoc gtk/readme.txt gtk_readme.txt
+
+ use doc && HTML_DOCS=( "${WORKDIR}"/wxWidgets-${WXVERSION}-docs-html/. )
+ einstalldocs
+
+ # Unversioned links
+ rm "${ED}"/usr/bin/wx-config || die
+ use X && { rm "${ED}"/usr/bin/wxrc || die; }
+
+ # version bakefile presets
+ pushd "${ED}"/usr/share/bakefile/presets >/dev/null || die
+ local f
+ for f in wx*; do
+ mv "${f}" "${f/wx/wx32gtk3}" || die
+ done
+ popd >/dev/null || die
+}
+
+pkg_postinst() {
+ has_version -b app-eselect/eselect-wxwidgets \
+ && eselect wxwidgets update
+}
+
+pkg_postrm() {
+ has_version -b app-eselect/eselect-wxwidgets \
+ && eselect wxwidgets update
+}