summaryrefslogtreecommitdiff
path: root/x11-libs
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-05-29 00:07:15 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-05-29 00:07:15 +0100
commit5c4786a868bad6e3f46aecf32ad6c6dc5de98408 (patch)
tree1a1792815761a5b6f645c8d55b6b698e102dca48 /x11-libs
parent3c1648a0749c1d66b300d857e6b417c1162890da (diff)
gentoo auto-resync : 29:05:2024 - 00:07:15
Diffstat (limited to 'x11-libs')
-rw-r--r--x11-libs/Manifest.gzbin17808 -> 17818 bytes
-rw-r--r--x11-libs/pango/Manifest2
-rw-r--r--x11-libs/pango/pango-1.52.1.ebuild2
-rw-r--r--x11-libs/wxGTK/Manifest2
-rw-r--r--x11-libs/wxGTK/wxGTK-3.0.5.1-r3.ebuild199
-rw-r--r--x11-libs/wxGTK/wxGTK-3.2.2.1-r4.ebuild258
6 files changed, 461 insertions, 2 deletions
diff --git a/x11-libs/Manifest.gz b/x11-libs/Manifest.gz
index 36e16d58cfe4..7d2fa18c03ed 100644
--- a/x11-libs/Manifest.gz
+++ b/x11-libs/Manifest.gz
Binary files differ
diff --git a/x11-libs/pango/Manifest b/x11-libs/pango/Manifest
index 4166e5e01e5a..eafc30ef6b4d 100644
--- a/x11-libs/pango/Manifest
+++ b/x11-libs/pango/Manifest
@@ -2,6 +2,6 @@ DIST pango-1.51.0.tar.xz 1942044 BLAKE2B d7d343d5fb005b92dc70fc6f65c62d1d22cc818
DIST pango-1.52.1.tar.xz 1956856 BLAKE2B 0b7f58f3d74bd37df285f3fbf14d2d2d776fbcf773568d63f12f26976d2ff505c19616fcee11562933df2594762e9ca30fe96a1d02dcd174381b976d63c68ac1 SHA512 7cddbd61afc3c98ffd09ea08c5d7613e454b6705f72304cb9b3578865b6bda70ca20f98605dea73f2cbca5e264217c8d79e4539e9eb36b8775d5d2a4f769cf32
DIST pango-1.52.2.tar.xz 1963588 BLAKE2B 9367703addcc6805fc14f0c0184d9d1b4093b8947fea9d260c54eb6c86ce56a0d6cfe35c3d6340eaa5d96fb84f0a94c5979ae308bfa79f02e4ce25c4c093556e SHA512 6b3d762d133e7c900c6dfa85f43c950699930f6149cb3c90bf0e787f1b5a126a0b90220b90e649f84e4c244e44c46d4b575d5d7afeb305232c333712effc0981
EBUILD pango-1.51.0.ebuild 2363 BLAKE2B cbd19f05e6a0a7d05d2e235ec91eecd10ad22c4fa9891308c60ccd9c96898cff52a083872e6cd86e22bd2e57698115d10a5682d5b6738e5535d6fe2b8191c90a SHA512 af460059e4725f906298aa7d9db82cd083444beb4c0cbd7268c3d8092c7eb7f8b16cdb101c465edaf18718773703181f14a85e5155046e558e3e2b2c56a3256a
-EBUILD pango-1.52.1.ebuild 2364 BLAKE2B 4527685dac19b01454209a2dd1eb36efa4cee2dfabbe990dccf6ec3c6978fa9ac76068e095506ff3d31f3517c8e2e3762f332630b2518ffca3c0d25f6b6906d0 SHA512 d0cd6e58730a6671148b5c2f53eb9c64190fa17740c8a2907ee3cc09c18ee805e20c62ec3c05338626f476a38aaf4cfbff3f521dd6b65d5837ccd3af8ccbee39
+EBUILD pango-1.52.1.ebuild 2363 BLAKE2B cbd19f05e6a0a7d05d2e235ec91eecd10ad22c4fa9891308c60ccd9c96898cff52a083872e6cd86e22bd2e57698115d10a5682d5b6738e5535d6fe2b8191c90a SHA512 af460059e4725f906298aa7d9db82cd083444beb4c0cbd7268c3d8092c7eb7f8b16cdb101c465edaf18718773703181f14a85e5155046e558e3e2b2c56a3256a
EBUILD pango-1.52.2.ebuild 2367 BLAKE2B 389226c8a326a1fc706b152b38e8f1ee76e87199faeac0efb31b9a7643c460172dd4e902639bff96d9a1a8409a2a3aca6ec76a34f64952078f8a238db1e89b93 SHA512 e14dc57922162a5c3f871690843fe810ec3548f5186357e845619642bbb61f51cfc02163257d290ba15cdc4b598661b4cda8fe65a87aa1915e0a9c6ba1dfa2bd
MISC metadata.xml 604 BLAKE2B 94690ca7900ce8d6418fdbaaabf9da8a85471f575a8bf81ab73523e3910d4c8db227bf653be30fe068f9c7c2e2295aa6af52c3e8da2780aaed0947c2b76b3b2a SHA512 314a9b5ad763a0077acfe0afc46fb82e26b28cec783077765f8b42e0828a059fc18804dfa522f9cb3628bf63cce1ac27af3b244c2b2166cfc9e1e5b465dd2f06
diff --git a/x11-libs/pango/pango-1.52.1.ebuild b/x11-libs/pango/pango-1.52.1.ebuild
index c97f3c068da5..117b99451163 100644
--- a/x11-libs/pango/pango-1.52.1.ebuild
+++ b/x11-libs/pango/pango-1.52.1.ebuild
@@ -11,7 +11,7 @@ SRC_URI="http://ftp.gnome.org/pub/GNOME/sources/pango/$(ver_cut 1-2)/${P}.tar.xz
LICENSE="LGPL-2+"
SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
IUSE="debug +introspection sysprof test X"
RESTRICT="!test? ( test )"
diff --git a/x11-libs/wxGTK/Manifest b/x11-libs/wxGTK/Manifest
index 3e11f31a1b22..f969402f2985 100644
--- a/x11-libs/wxGTK/Manifest
+++ b/x11-libs/wxGTK/Manifest
@@ -21,5 +21,7 @@ DIST wxWidgets-3.2.2.1.tar.bz2 27339515 BLAKE2B e761e768dbb32bf76dbabf27aa9feb63
EBUILD wxGTK-3.0.4-r5.ebuild 3855 BLAKE2B a5767a56c2ce7ffaa0c992edb38d13af09c6c13c68f7365d4ed9403614d9dfface7570559286081aa8cca8ab1fb5a05835c5d1b9031a7e57c87eedce3868e311 SHA512 12a803bee87b1341e5948672b8d501b4199fbcf36f4392458ad527e06f8b61e83d3fce029299666b8614f9ced6a099070ffdce028e3e12f11efcc8083ca8ea09
EBUILD wxGTK-3.0.5.1-r1.ebuild 5652 BLAKE2B af627de9327d718ac25c163fee1acc37cde2038bcac5404923388095c8ef266a8b200ba611fa75f13e75dde6492d820f16659a88ad921ae26d1118960e73077a SHA512 9e5daee2d0f0646a653c6319e4327eb6f13c4e45c91259ab5ba119a1e9914aec97dd5b9e5050dc0dc85081825d60c0201e6aea3f620a9d20c1772d6399dac51a
EBUILD wxGTK-3.0.5.1-r2.ebuild 5717 BLAKE2B 128f0cbb13c6c614c9a8c429b63684bb071f77b91b294ab1bf633447d999c6c91b68f3a159c9e306a917e447a77bd4dc43640df8bd7b27b1fd16d873d2b1c7f4 SHA512 a835963df5be7019be620fc389c5c7b001a484b387ed385798b957caafa08e570e55056d5e119a9b007a8d01041e5c1eade639f7251b67ebf315cce73dc6cb6a
+EBUILD wxGTK-3.0.5.1-r3.ebuild 6183 BLAKE2B d25f3bb3cd43ec16838210c7bd8610326901f32c8ec048317135fdee7a85154635c9a58994d46d6a2dcd929dd51de5a4deb5bbe29a3b6b186d22c05465e25261 SHA512 d35fcf24275da1ed9bf2645853236cbf69d57c2a657751f8f51ae5002e39c348a92491a016931b95c08a8f2b9f0bcbf9933ce4ee05b6387d05c85dab4fd5ebcc
EBUILD wxGTK-3.2.2.1-r3.ebuild 7778 BLAKE2B 56582d7235c516fb948290ea02554f109462e097ca4c428d6bd6f274e6aed62079f83e30906e4fa5334dfb5daacaae2f3cb8661252a82231b79cdc835442924f SHA512 4531ae289f92e9b34a06373cd6fef4b12785dbf31e0955f1e736aa6f5f23bccb138bd152a21c3067885ac7ff9ca1e8c8a761aa8cbff59ee0ea8efacff311be8f
+EBUILD wxGTK-3.2.2.1-r4.ebuild 8244 BLAKE2B 4b5e09d7454294b9957b1f119ef48cfc3aacab1aa19ac0a4df3a9eacb8f9bea05ef717f6daef56f51b9f4bb0d6d96af5702598d7175766f6643803f9ea639ad0 SHA512 25b256411735e2bdfc916be37a02276190327009e5626f9310814ad580631aa9afc60300e1afac1313000fd3ca426f69aad721d950b965fd8e071db67084e8de
MISC metadata.xml 756 BLAKE2B 336ffb3375ee9092de02d0808d0a44f7f5bcbc6e4a845c12b6466af0b91f3397c2b335e5433917361a060db43d6cb836cde0f87be2059214f314fa6726199e2d SHA512 190b72992c64b43b46e28ca2f730e1897a5f740ba211b859c816b4892256284feb579fbce06cb1939b774ae989dc68754f5a57f6375cfca50d7770d0c2ed47ed
diff --git a/x11-libs/wxGTK/wxGTK-3.0.5.1-r3.ebuild b/x11-libs/wxGTK/wxGTK-3.0.5.1-r3.ebuild
new file mode 100644
index 000000000000..9489bf2fa698
--- /dev/null
+++ b/x11-libs/wxGTK/wxGTK-3.0.5.1-r3.ebuild
@@ -0,0 +1,199 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit multilib-minimal flag-o-matic
+
+WXSUBVERSION=${PV}-gtk3 # 3.0.5.1-gtk3
+WXVERSION=${WXSUBVERSION%.*} # 3.0.5
+WXRELEASE=${WXVERSION%.*}-gtk3 # 3.0-gtk3
+WXRELEASE_NODOT=${WXRELEASE//./} # 30-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
+ https://dev.gentoo.org/~leio/distfiles/wxGTK-${WXVERSION}_p20210214.tar.xz
+ doc? ( https://github.com/wxWidgets/wxWidgets/releases/download/v${WXVERSION}/wxWidgets-${WXVERSION}-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 ~loong ~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 )"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ >=app-eselect/eselect-wxwidgets-20131230
+ dev-libs/expat[${MULTILIB_USEDEP}]
+ sdl? ( media-libs/libsdl2[${MULTILIB_USEDEP}] )
+ 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/libSM[${MULTILIB_USEDEP}]
+ x11-libs/libX11[${MULTILIB_USEDEP}]
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
+ x11-libs/pango[${MULTILIB_USEDEP}]
+ gstreamer? (
+ media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
+ media-libs/gst-plugins-base:1.0[${MULTILIB_USEDEP}]
+ )
+ libnotify? ( x11-libs/libnotify[${MULTILIB_USEDEP}] )
+ opengl? ( virtual/opengl[${MULTILIB_USEDEP}] )
+ 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"
+
+PATCHES=(
+ "${WORKDIR}"/wxGTK-3.0.5_p20210214/
+ "${FILESDIR}"/wxGTK-${SLOT}-translation-domain.patch
+ "${FILESDIR}"/wxGTK-ignore-c++-abi.patch #676878
+ "${FILESDIR}"/${PN}-configure-tests.patch
+ "${FILESDIR}"/${PN}-3.0.5.1-configure-modern-c.patch
+ "${FILESDIR}"/${PN}-3.0.5.1-excise-autoptr.patch
+
+)
+
+src_prepare() {
+ default
+
+ # 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):" \
+ -e "s:wxstd.mo:wxstd${WXRELEASE_NODOT}.mo:" \
+ -e "s:wxmsw.mo:wxmsw${WXRELEASE_NODOT}.mo:" \
+ Makefile.in tests/Makefile.in || die
+
+ sed -i \
+ -e "s:\(WX_RELEASE = \).*:\1${WXRELEASE}:"\
+ utils/wxrc/Makefile.in || 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() {
+ # Workaround for bug #915154
+ append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
+
+ # X independent options
+ local myeconfargs=(
+ --with-zlib=sys
+ --with-expat=sys
+ --enable-compat28
+ $(use_with sdl)
+
+ # 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
+ --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 test tests)
+ )
+
+ # wxBase options
+ ! use X && myeconfargs+=( --disable-gui )
+
+ # wxWidgets installs a configuration file with a reference to EGREP.
+ # Autoconf discovers these programs via full paths, which is
+ # unnecessary and fails if a build happened on a merged-usr system
+ # but is being used on a split-usr system. Bug #927920.
+ export ac_cv_path_SED="sed"
+ export ac_cv_path_EGREP="grep -E"
+ export ac_cv_path_EGREP_TRADITIONAL="grep -E"
+ export ac_cv_path_FGREP="grep -F"
+ export ac_cv_path_GREP="grep"
+ export ac_cv_path_lt_DD="dd"
+
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_test() {
+ emake -C tests
+ (cd tests && ./test) || 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
+
+ # Stray windows locale file, bug #650118
+ rm -f "${ED}"/usr/share/locale/it/LC_MESSAGES/wxmsw30-gtk3.mo || die
+
+ # 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/wx30gtk3}" || 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
+}
diff --git a/x11-libs/wxGTK/wxGTK-3.2.2.1-r4.ebuild b/x11-libs/wxGTK/wxGTK-3.2.2.1-r4.ebuild
new file mode 100644
index 000000000000..a9276d1c119a
--- /dev/null
+++ b/x11-libs/wxGTK/wxGTK-3.2.2.1-r4.ebuild
@@ -0,0 +1,258 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit multilib-minimal flag-o-matic
+
+WXSUBVERSION="${PV}-gtk3" # 3.2.1-gtk3
+WXVERSION="$(ver_cut 1-3)" # 3.2.1
+# Make sure that this matches the number of components in ${PV}
+WXRELEASE="$(ver_cut 1-2)-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 ~loong ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux"
+IUSE="+X curl doc debug keyring gstreamer libnotify +lzma opengl pch sdl +spell test tiff wayland webkit"
+REQUIRED_USE="test? ( tiff ) tiff? ( X ) spell? ( X ) 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}]
+ 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}/${PN}-3.2.1-gtk3-translation-domain.patch"
+ #"${FILESDIR}"/wxGTK-ignore-c++-abi.patch #676878
+ "${FILESDIR}/${PN}-3.2.1-configure-tests.patch"
+ "${FILESDIR}/${PN}-3.2.1-wayland-control.patch"
+ "${FILESDIR}/${PN}-3.2.1-prefer-lib64-in-tests.patch"
+ "${FILESDIR}/${PN}-3.2.2.1-dont-break-flags.patch"
+ "${FILESDIR}/${PN}-3.2.2.1-backport-pr24197.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() {
+ # Workaround for bug #915154
+ append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
+
+ # X independent options
+ local myeconfargs=(
+ --with-zlib=sys
+ --with-expat=sys
+ --enable-compat30
+ --enable-xrc
+ $(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)
+ )
+
+ # By default, we now build with the GLX GLCanvas because some software like
+ # PrusaSlicer does not yet support EGL:
+ #
+ # https://github.com/prusa3d/PrusaSlicer/issues/9774 .
+ #
+ # A solution for this is being developed upstream:
+ #
+ # https://github.com/wxWidgets/wxWidgets/issues/22325 .
+ #
+ # Any software that needs to use OpenGL under Wayland can be patched like
+ # this to run under xwayland:
+ #
+ # https://github.com/visualboyadvance-m/visualboyadvance-m/commit/aca206a721265366728222d025fec30ee500de82 .
+ #
+ # Check that the macro wxUSE_GLCANVAS_EGL is set to 1.
+ #
+ myeconfargs+=( "--disable-glcanvasegl" )
+
+ # 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 keyring secretstore)
+ $(use_enable spell spellcheck)
+ $(use_enable test tests)
+ $(use_enable wayland)
+ )
+
+ # wxBase options
+ ! use X && myeconfargs+=( --disable-gui )
+
+ # wxWidgets installs a configuration file with a reference to EGREP.
+ # Autoconf discovers these programs via full paths, which is
+ # unnecessary and fails if a build happened on a merged-usr system
+ # but is being used on a split-usr system. Bug #927920.
+ export ac_cv_path_SED="sed"
+ export ac_cv_path_EGREP="grep -E"
+ export ac_cv_path_EGREP_TRADITIONAL="grep -E"
+ export ac_cv_path_FGREP="grep -F"
+ export ac_cv_path_GREP="grep"
+ export ac_cv_path_lt_DD="dd"
+
+ 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-${PV}-docs-html/. )
+ einstalldocs
+
+ # Unversioned links
+ rm "${ED}"/usr/bin/wx-config || die
+ 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
+}