public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: x11-libs/wxGTK/files/, x11-libs/wxGTK/
@ 2016-06-17  1:03 Ryan Hill
  0 siblings, 0 replies; 8+ messages in thread
From: Ryan Hill @ 2016-06-17  1:03 UTC (permalink / raw
  To: gentoo-commits

commit:     e3facab61eadbc1b46c4b09b2006e9f48a43b3f5
Author:     Ryan Hill <rhill <AT> gentoo <DOT> org>
AuthorDate: Mon May 16 20:03:02 2016 +0000
Commit:     Ryan Hill <rhill <AT> gentoo <DOT> org>
CommitDate: Fri Jun 17 01:00:57 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e3facab6

x11-libs/wxGTK: Backport various webkit-related build fixes.

a309157a Don't include "webview" in "standard" libraries
d24f711f Only link webview library with libwebkitgtk in wxGTK
bde287ba Rebake webview sample makefile after EXTRALIBS_WEBVIEW addition
037f6977 Report libraries in EXTRALIBS_WEBVIEW in wx-config output

Package-Manager: portage-2.3.0_rc1
Signed-off-by: Ryan Hill <rhill <AT> gentoo.org>

 .../wxGTK/files/wxGTK-3.0.2.0-webview-fixes.patch  | 140 +++++++++++++++++++++
 ...3.0.2.0-r301.ebuild => wxGTK-3.0.2.0-r3.ebuild} |  74 ++++-------
 x11-libs/wxGTK/wxGTK-3.0.2.0-r301.ebuild           |  14 ++-
 3 files changed, 178 insertions(+), 50 deletions(-)

diff --git a/x11-libs/wxGTK/files/wxGTK-3.0.2.0-webview-fixes.patch b/x11-libs/wxGTK/files/wxGTK-3.0.2.0-webview-fixes.patch
new file mode 100644
index 0000000..727fda1
--- /dev/null
+++ b/x11-libs/wxGTK/files/wxGTK-3.0.2.0-webview-fixes.patch
@@ -0,0 +1,140 @@
+Backport various webkit-related build fixes:
+
+a309157a	Don't include "webview" in "standard" libraries.
+d24f711f	Only link webview library with libwebkitgtk in wxGTK, not the core one.
+bde287ba	Rebake webview sample makefile after EXTRALIBS_WEBVIEW addition	
+037f6977	Report libraries in EXTRALIBS_WEBVIEW in wx-config output
+
+
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -65,6 +65,7 @@ EXTRALIBS_MEDIA = @EXTRALIBS_MEDIA@
+ EXTRALIBS_GUI = @EXTRALIBS_GUI@
+ EXTRALIBS_OPENGL = @EXTRALIBS_OPENGL@
+ EXTRALIBS_SDL = @EXTRALIBS_SDL@
++EXTRALIBS_WEBVIEW = @EXTRALIBS_WEBVIEW@
+ CXXWARNINGS = @CXXWARNINGS@
+ HOST_SUFFIX = @HOST_SUFFIX@
+ DYLIB_RPATH_INSTALL = @DYLIB_RPATH_INSTALL@
+@@ -15493,7 +15494,7 @@ distclean: clean
+ @COND_SHARED_0_USE_STC_1@	rm -f $(DESTDIR)$(libdir)/$(LIBPREFIX)wxscintilla$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)$(LIBEXT)
+ 
+ @COND_MONOLITHIC_1_SHARED_1@$(LIBDIRNAME)/$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(dll___targetsuf3): $(MONODLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla___depname) $(__wxexpat___depname) $(__wxzlib___depname) $(__wxregex___depname) $(__monodll___win32rc) $(__wxscintilla_library_link_DEP)
+-@COND_MONOLITHIC_1_SHARED_1@	$(SHARED_LD_CXX) $@ $(MONODLL_OBJECTS) $(__wxscintilla_library_link_LIBR)    -L$(LIBDIRNAME) $(__monodll___macinstnamecmd) $(__monodll___importlib) $(__monodll___soname_flags) $(WXMACVERSION_CMD) $(LDFLAGS)  $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p)  $(EXTRALIBS_FOR_GUI) $(__LIB_ZLIB_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE) $(EXTRALIBS_XML) $(EXTRALIBS_HTML) $(EXTRALIBS_MEDIA) $(PLUGIN_ADV_EXTRALIBS) $(__wxscintilla_library_link_LIBR_1) $(LIBS)
++@COND_MONOLITHIC_1_SHARED_1@	$(SHARED_LD_CXX) $@ $(MONODLL_OBJECTS) $(__wxscintilla_library_link_LIBR)    -L$(LIBDIRNAME) $(__monodll___macinstnamecmd) $(__monodll___importlib) $(__monodll___soname_flags) $(WXMACVERSION_CMD) $(LDFLAGS)  $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p)  $(EXTRALIBS_FOR_GUI) $(__LIB_ZLIB_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE) $(EXTRALIBS_XML) $(EXTRALIBS_HTML) $(EXTRALIBS_MEDIA) $(PLUGIN_ADV_EXTRALIBS) $(EXTRALIBS_WEBVIEW) $(__wxscintilla_library_link_LIBR_1) $(LIBS)
+ @COND_MONOLITHIC_1_SHARED_1@	$(DYLIB_RPATH_POSTLINK)
+ @COND_MONOLITHIC_1_SHARED_1@	
+ @COND_MONOLITHIC_1_SHARED_1@	$(__monodll___so_symlinks_cmd)
+@@ -15750,7 +15751,7 @@ distclean: clean
+ @COND_MONOLITHIC_0_USE_HTML_1@wxhtml: $(____wxhtml_namedll_DEP) $(____wxhtml_namelib_DEP)
+ 
+ @COND_MONOLITHIC_0_SHARED_1_USE_GUI_1_USE_WEBVIEW_1@$(LIBDIRNAME)/$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(dll___targetsuf3): $(WEBVIEWDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla___depname) $(__wxexpat___depname) $(__wxzlib___depname) $(__wxregex___depname) $(__webviewdll___win32rc) $(__coredll___depname) $(__basedll___depname)
+-@COND_MONOLITHIC_0_SHARED_1_USE_GUI_1_USE_WEBVIEW_1@	$(SHARED_LD_CXX) $@ $(WEBVIEWDLL_OBJECTS) -L$(LIBDIRNAME) -L$(LIBDIRNAME)    -L$(LIBDIRNAME) $(__webviewdll___macinstnamecmd) $(__webviewdll___importlib) $(__webviewdll___soname_flags) $(WXMACVERSION_CMD) $(LDFLAGS)  $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p)  $(EXTRALIBS_FOR_GUI) $(__LIB_ZLIB_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE) -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core-$(WX_RELEASE)$(HOST_SUFFIX) -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX) $(LIBS)
++@COND_MONOLITHIC_0_SHARED_1_USE_GUI_1_USE_WEBVIEW_1@	$(SHARED_LD_CXX) $@ $(WEBVIEWDLL_OBJECTS) -L$(LIBDIRNAME) -L$(LIBDIRNAME)    -L$(LIBDIRNAME) $(__webviewdll___macinstnamecmd) $(__webviewdll___importlib) $(__webviewdll___soname_flags) $(WXMACVERSION_CMD) $(LDFLAGS)  $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p)  $(EXTRALIBS_FOR_GUI) $(__LIB_ZLIB_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE) -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core-$(WX_RELEASE)$(HOST_SUFFIX) -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX) $(EXTRALIBS_WEBVIEW) $(LIBS)
+ @COND_MONOLITHIC_0_SHARED_1_USE_GUI_1_USE_WEBVIEW_1@	$(DYLIB_RPATH_POSTLINK)
+ @COND_MONOLITHIC_0_SHARED_1_USE_GUI_1_USE_WEBVIEW_1@	
+ @COND_MONOLITHIC_0_SHARED_1_USE_GUI_1_USE_WEBVIEW_1@	$(__webviewdll___so_symlinks_cmd)
+--- a/build/bakefiles/config.bkl
++++ b/build/bakefiles/config.bkl
+@@ -423,6 +423,7 @@ to run the tests, include CppUnit library here.
+         <option name="EXTRALIBS_GUI"/>
+         <option name="EXTRALIBS_OPENGL"/>
+         <option name="EXTRALIBS_SDL"/>
++        <option name="EXTRALIBS_WEBVIEW"/>
+         <option name="CXXWARNINGS"/>
+         <option name="HOST_SUFFIX"/>
+         <option name="DYLIB_RPATH_INSTALL"/>
+@@ -506,6 +507,7 @@ it if SHARED=1 unless you know what you are doing.
+             <if cond="COMPILER=='gcc'">-lopengl32 -lglu32</if>
+         </set>
+         <set var="EXTRALIBS_SDL"/>
++        <set var="EXTRALIBS_WEBVIEW"/>
+ 
+         <set var="WITH_PLUGIN_SDL">0</set>
+ 
+--- a/build/bakefiles/monolithic.bkl
++++ b/build/bakefiles/monolithic.bkl
+@@ -26,6 +26,7 @@
+         <ldlibs>$(EXTRALIBS_HTML)</ldlibs>
+         <ldlibs>$(EXTRALIBS_MEDIA)</ldlibs>
+         <ldlibs>$(PLUGIN_MONOLIB_EXTRALIBS)</ldlibs>
++        <ldlibs>$(EXTRALIBS_WEBVIEW)</ldlibs>
+         <library>$(wxscintilla_library_link)</library>
+     </dll>
+ 
+--- a/build/bakefiles/multilib.bkl
++++ b/build/bakefiles/multilib.bkl
+@@ -183,6 +183,7 @@
+         <sources>$(WEBVIEW_SRC)</sources>
+         <library>coredll</library>
+         <library>basedll</library>
++        <ldlibs>$(EXTRALIBS_WEBVIEW)</ldlibs>
+         <msvc-headers>$(WEBVIEW_HDR)</msvc-headers>
+     </dll>
+ 
+--- a/build/bakefiles/wxwin.py
++++ b/build/bakefiles/wxwin.py
+@@ -51,6 +51,7 @@ EXTRALIBS = {
+     'html' : '$(EXTRALIBS_HTML)',
+     'adv' : '$(PLUGIN_ADV_EXTRALIBS)',
+     'media' : '$(EXTRALIBS_MEDIA)',
++    'webview' : '$(EXTRALIBS_WEBVIEW)',
+ }
+ 
+ def mkLibName(wxid):
+--- a/configure.in
++++ b/configure.in
+@@ -7249,7 +7249,7 @@ if test "$wxUSE_WEBVIEW" = "yes"; then
+                               [
+                                 USE_WEBVIEW_WEBKIT=1
+                                 CPPFLAGS="$CPPFLAGS $WEBKIT_CFLAGS"
+-                                GUI_TK_LIBRARY="$GUI_TK_LIBRARY $WEBKIT_LIBS"
++                                EXTRALIBS_WEBVIEW="$WEBKIT_LIBS"
+                               ],
+                               [
+                                 AC_MSG_WARN([webkitgtk not found.])
+@@ -7689,7 +7689,6 @@ if test "$wxUSE_GUI" = "yes"; then
+         BUILT_WX_LIBS="stc $BUILT_WX_LIBS"
+     fi
+     if test "$wxUSE_WEBVIEW" = "yes" ; then
+-        STD_GUI_LIBS="webview $STD_GUI_LIBS"
+         BUILT_WX_LIBS="webview $BUILT_WX_LIBS"
+     fi
+     if test "$wxUSE_XRC" = "yes" ; then
+@@ -8002,6 +8001,7 @@ AC_SUBST(EXTRALIBS_GUI)
+ AC_SUBST(EXTRALIBS_OPENGL)
+ AC_SUBST(EXTRALIBS_SDL)
+ AC_SUBST(EXTRALIBS_STC)
++AC_SUBST(EXTRALIBS_WEBVIEW)
+ AC_SUBST(WITH_PLUGIN_SDL)
+ AC_SUBST(UNICODE)
+ AC_SUBST(DEBUG_INFO)
+--- a/samples/webview/Makefile.in
++++ b/samples/webview/Makefile.in
+@@ -33,6 +33,7 @@ EXTRALIBS = @EXTRALIBS@
+ EXTRALIBS_XML = @EXTRALIBS_XML@
+ EXTRALIBS_GUI = @EXTRALIBS_GUI@
+ EXTRALIBS_SDL = @EXTRALIBS_SDL@
++EXTRALIBS_WEBVIEW = @EXTRALIBS_WEBVIEW@
+ CXXWARNINGS = @CXXWARNINGS@
+ HOST_SUFFIX = @HOST_SUFFIX@
+ SAMPLES_RPATH_FLAG = @SAMPLES_RPATH_FLAG@
+@@ -163,7 +164,7 @@ distclean: clean
+ 	rm -f config.cache config.log config.status bk-deps bk-make-pch shared-ld-sh Makefile
+ 
+ webview$(EXEEXT): $(WEBVIEW_OBJECTS) $(__webview___win32rc)
+-	$(CXX) -o $@ $(WEBVIEW_OBJECTS)    -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(LDFLAGS)  $(__WXLIB_WEBVIEW_p)  $(__WXLIB_STC_p)  $(__WXLIB_ADV_p) $(PLUGIN_ADV_EXTRALIBS) $(__WXLIB_CORE_p)  $(__WXLIB_BASE_p)  -lwxscintilla$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p)  $(EXTRALIBS_FOR_GUI) $(__LIB_ZLIB_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE) $(LIBS)
++	$(CXX) -o $@ $(WEBVIEW_OBJECTS)    -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(LDFLAGS)  $(__WXLIB_WEBVIEW_p) $(EXTRALIBS_WEBVIEW) $(__WXLIB_STC_p)  $(__WXLIB_ADV_p) $(PLUGIN_ADV_EXTRALIBS) $(__WXLIB_CORE_p)  $(__WXLIB_BASE_p)  -lwxscintilla$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p)  $(EXTRALIBS_FOR_GUI) $(__LIB_ZLIB_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE) $(LIBS)
+ 	
+ 	$(__webview___mac_setfilecmd)
+ 	$(__webview___os2_emxbindcmd)
+--- a/wx-config.in
++++ b/wx-config.in
+@@ -1032,6 +1032,7 @@ ldlibs_html="@EXTRALIBS_HTML@"
+ ldlibs_xml="@EXTRALIBS_XML@"
+ ldlibs_adv="@EXTRALIBS_SDL@"
+ ldlibs_stc="@EXTRALIBS_STC@"
++ldlibs_webview="@EXTRALIBS_WEBVIEW@"
+ 
+ 
+ # Order the libraries passed to us correctly for static linking.

diff --git a/x11-libs/wxGTK/wxGTK-3.0.2.0-r301.ebuild b/x11-libs/wxGTK/wxGTK-3.0.2.0-r3.ebuild
similarity index 73%
copy from x11-libs/wxGTK/wxGTK-3.0.2.0-r301.ebuild
copy to x11-libs/wxGTK/wxGTK-3.0.2.0-r3.ebuild
index 14e66db..54d5743 100644
--- a/x11-libs/wxGTK/wxGTK-3.0.2.0-r301.ebuild
+++ b/x11-libs/wxGTK/wxGTK-3.0.2.0-r3.ebuild
@@ -2,9 +2,9 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
-EAPI="6"
+EAPI="5"
 
-inherit multilib-minimal
+inherit autotools eutils multilib-minimal
 
 DESCRIPTION="GTK+ version of wxWidgets, a cross-platform C++ GUI toolkit"
 HOMEPAGE="http://wxwidgets.org/"
@@ -17,12 +17,7 @@ SRC_URI="mirror://sourceforge/wxpython/wxPython-src-${PV}.tar.bz2
 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
 IUSE="+X aqua doc debug gstreamer libnotify opengl sdl tiff webkit"
 
-WXSUBVERSION=${PV}-gtk3					# 3.0.2.0-gtk3
-WXVERSION=${WXSUBVERSION%.*}			# 3.0.2
-WXRELEASE=${WXVERSION%.*}-gtk3			# 3.0-gtk3
-WXRELEASE_NODOT=${WXRELEASE//./}		# 30-gtk3
-
-SLOT="${WXRELEASE}"
+SLOT="3.0"
 
 RDEPEND="
 	dev-libs/expat[${MULTILIB_USEDEP}]
@@ -31,12 +26,10 @@ RDEPEND="
 		>=dev-libs/glib-2.22:2[${MULTILIB_USEDEP}]
 		media-libs/libpng:0=[${MULTILIB_USEDEP}]
 		sys-libs/zlib[${MULTILIB_USEDEP}]
-		virtual/jpeg:0[${MULTILIB_USEDEP}]
-		x11-libs/cairo[${MULTILIB_USEDEP}]
-		x11-libs/gtk+:3[${MULTILIB_USEDEP}]
+		virtual/jpeg:=[${MULTILIB_USEDEP}]
+		>=x11-libs/gtk+-2.18:2[${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[X,${MULTILIB_USEDEP}]
 		gstreamer? (
@@ -45,11 +38,11 @@ RDEPEND="
 		libnotify? ( x11-libs/libnotify[${MULTILIB_USEDEP}] )
 		opengl? ( virtual/opengl[${MULTILIB_USEDEP}] )
 		tiff?   ( media-libs/tiff:0[${MULTILIB_USEDEP}] )
-		webkit? ( net-libs/webkit-gtk:3 )
+		webkit? ( net-libs/webkit-gtk:2 )
 		)
 	aqua? (
-		x11-libs/gtk+:3[aqua=,${MULTILIB_USEDEP}]
-		virtual/jpeg:0[${MULTILIB_USEDEP}]
+		>=x11-libs/gtk+-2.4:2[aqua=,${MULTILIB_USEDEP}]
+		virtual/jpeg:=[${MULTILIB_USEDEP}]
 		tiff?   ( media-libs/tiff:0[${MULTILIB_USEDEP}] )
 		)"
 
@@ -71,28 +64,21 @@ LICENSE="wxWinLL-3
 S="${WORKDIR}/wxPython-src-${PV}"
 
 src_prepare() {
-	# 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}:" \
-		-e "s:wxmsw.mo:wxmsw${WXRELEASE_NODOT}:" \
-		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
-
-	default
+	epatch "${FILESDIR}"/${PN}-3.0.0.0-collision.patch
+	epatch "${FILESDIR}"/${P}-webview-fixes.patch
+	epatch_user
+
+	for f in $(find "${S}" -name configure.in); do
+		mv "${f}" "${f/in/ac}" || die
+	done
+	AT_M4DIR="${S}/build/aclocal" eautoreconf
+
+	# https://bugs.gentoo.org/536004
+	sed \
+		-e 's:3\.0\.1:3.0.2:g' \
+		-e 's:^wx_release_number=1$:wx_release_number=2:' \
+		-i "${S}"/configure || die
+
 }
 
 multilib_src_configure() {
@@ -123,8 +109,8 @@ multilib_src_configure() {
 			--enable-graphics_ctx
 			--with-gtkprint
 			--enable-gui
-			--with-gtk=3
 			--with-libpng=sys
+			--with-libxpm=sys
 			--with-libjpeg=sys
 			--without-gnomevfs
 			$(use_enable gstreamer mediactrl)
@@ -163,15 +149,9 @@ multilib_src_install_all() {
 		dodoc -r "${S}"/docs/doxygen/out/html
 	fi
 
-	# Unversioned links
-	rm "${D}"/usr/bin/wx{-config,rc}
-
-	# version bakefile presets
-	pushd "${D}"usr/share/bakefile/presets/ > /dev/null
-	for f in wx*; do
-		mv "${f}" "${f/wx/wx30gtk3}"
-	done
-	popd > /dev/null
+	# Stray windows locale file, causes collisions
+	local wxmsw="${ED}usr/share/locale/it/LC_MESSAGES/wxmsw.mo"
+	[[ -e ${wxmsw} ]] && rm "${wxmsw}"
 }
 
 pkg_postinst() {

diff --git a/x11-libs/wxGTK/wxGTK-3.0.2.0-r301.ebuild b/x11-libs/wxGTK/wxGTK-3.0.2.0-r301.ebuild
index 14e66db..57f6f4b 100644
--- a/x11-libs/wxGTK/wxGTK-3.0.2.0-r301.ebuild
+++ b/x11-libs/wxGTK/wxGTK-3.0.2.0-r301.ebuild
@@ -4,7 +4,7 @@
 
 EAPI="6"
 
-inherit multilib-minimal
+inherit autotools multilib-minimal
 
 DESCRIPTION="GTK+ version of wxWidgets, a cross-platform C++ GUI toolkit"
 HOMEPAGE="http://wxwidgets.org/"
@@ -71,6 +71,16 @@ LICENSE="wxWinLL-3
 S="${WORKDIR}/wxPython-src-${PV}"
 
 src_prepare() {
+	PATCHES=( "${FILESDIR}"/${P}-webview-fixes.patch )
+
+	eapply "${PATCHES[@]}"
+	eapply_user
+
+	for f in $(find "${S}" -name configure.in); do
+		mv "${f}" "${f/in/ac}" || die
+	done
+	AT_M4DIR="${S}/build/aclocal" eautoreconf
+
 	# Versionating
 	sed -i \
 		-e "s:\(WX_RELEASE = \).*:\1${WXRELEASE}:"\
@@ -91,8 +101,6 @@ src_prepare() {
 		-e "s:\(WX_SUBVERSION=\).*:\1${WXSUBVERSION}:" \
 		-e '/WX_VERSION_TAG=/ s:${WX_RELEASE}:3.0:' \
 		configure || die
-
-	default
 }
 
 multilib_src_configure() {


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: x11-libs/wxGTK/files/, x11-libs/wxGTK/
@ 2018-01-04 17:18 Mart Raudsepp
  0 siblings, 0 replies; 8+ messages in thread
From: Mart Raudsepp @ 2018-01-04 17:18 UTC (permalink / raw
  To: gentoo-commits

commit:     ca64147aee7b81492dcf304a919938630672b0d5
Author:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
AuthorDate: Thu Jan  4 03:07:57 2018 +0000
Commit:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
CommitDate: Thu Jan  4 17:18:10 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ca64147a

x11-libs/wxGTK: fix translation installation and usage for SLOT=3.0-gtk3

Properly sed the .mo versioning and patch wxTranslations::AddStdCatalog
to use the slotted translation domain.

Closes: https://bugs.gentoo.org/618624
Package-Manager: Portage-2.3.19, Repoman-2.3.6

 .../wxGTK/files/wxGTK-3.0-gtk3-translation-domain.patch     | 13 +++++++++++++
 x11-libs/wxGTK/wxGTK-3.0.3-r300.ebuild                      |  8 ++++++--
 2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/x11-libs/wxGTK/files/wxGTK-3.0-gtk3-translation-domain.patch b/x11-libs/wxGTK/files/wxGTK-3.0-gtk3-translation-domain.patch
new file mode 100644
index 00000000000..3b449baedb4
--- /dev/null
+++ b/x11-libs/wxGTK/files/wxGTK-3.0-gtk3-translation-domain.patch
@@ -0,0 +1,13 @@
+Modify AddStdCatalog to use the versioned wxstd30-gtk3.mo.
+
+--- a/src/common/translation.cpp
++++ b/src/common/translation.cpp
+@@ -1458,7 +1458,7 @@ wxArrayString wxTranslations::GetAvailableTranslations(const wxString& domain) c
+ 
+ bool wxTranslations::AddStdCatalog()
+ {
+-    if ( !AddCatalog(wxS("wxstd")) )
++    if ( !AddCatalog(wxS("wxstd30-gtk3")) )
+         return false;
+ 
+     // there may be a catalog with toolkit specific overrides, it is not

diff --git a/x11-libs/wxGTK/wxGTK-3.0.3-r300.ebuild b/x11-libs/wxGTK/wxGTK-3.0.3-r300.ebuild
index 6605d6d4ac8..0c69eb6d8c1 100644
--- a/x11-libs/wxGTK/wxGTK-3.0.3-r300.ebuild
+++ b/x11-libs/wxGTK/wxGTK-3.0.3-r300.ebuild
@@ -64,6 +64,10 @@ LICENSE="wxWinLL-3 GPL-2 doc? ( wxWinFDL-3 )"
 
 S="${WORKDIR}/wxWidgets-${PV}"
 
+PATCHES=(
+	"${FILESDIR}"/wxGTK-${SLOT}-translation-domain.patch
+)
+
 src_prepare() {
 	default
 
@@ -73,8 +77,8 @@ src_prepare() {
 		-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}:" \
-		-e "s:wxmsw.mo:wxmsw${WXRELEASE_NODOT}:" \
+		-e "s:wxstd.mo:wxstd${WXRELEASE_NODOT}.mo:" \
+		-e "s:wxmsw.mo:wxmsw${WXRELEASE_NODOT}.mo:" \
 		Makefile.in || die
 
 	sed -i \


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: x11-libs/wxGTK/files/, x11-libs/wxGTK/
@ 2018-11-07 15:00 Mart Raudsepp
  0 siblings, 0 replies; 8+ messages in thread
From: Mart Raudsepp @ 2018-11-07 15:00 UTC (permalink / raw
  To: gentoo-commits

commit:     0f15d3f9db609851eef3a20c5af432409f41c3c7
Author:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
AuthorDate: Wed Nov  7 14:13:40 2018 +0000
Commit:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
CommitDate: Wed Nov  7 14:57:30 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0f15d3f9

x11-libs/wxGTK: update patchset and fix USE=sdl dep

configure checks for sdl2 first, and unconditionally picks that
if found, instead of libsdl. So as we are in 2018, just force
libsdl2 for USE=sdl to guarantee that what is depended on is
also picked.

Update patchset to early November state for a number of wxGTK
bug fixes found on upstream WX_3_0_BRANCH.

Closes: https://bugs.gentoo.org/669414
Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org>
Package-Manager: Portage-2.3.49, Repoman-2.3.11

 x11-libs/wxGTK/Manifest                          |   1 +
 x11-libs/wxGTK/files/wxGTK-3.0.5-collision.patch |  75 +++++++++
 x11-libs/wxGTK/wxGTK-3.0.4-r1.ebuild             | 140 +++++++++++++++++
 x11-libs/wxGTK/wxGTK-3.0.4-r301.ebuild           | 184 +++++++++++++++++++++++
 4 files changed, 400 insertions(+)

diff --git a/x11-libs/wxGTK/Manifest b/x11-libs/wxGTK/Manifest
index ecf85f5bc5f..2ba51aec12d 100644
--- a/x11-libs/wxGTK/Manifest
+++ b/x11-libs/wxGTK/Manifest
@@ -1,5 +1,6 @@
 DIST wxGTK-3.0.3_p20180104.tar.xz 84260 BLAKE2B 3840a4a202778b3e7df0c3470945dd8f083b1b18aa69013ae59975b368cec4f5e9fea3bdd8a05a200fcd146c8616d2258f0b2ee389a6457a638201a8534f9a18 SHA512 840c8248d5a689a462d1dcb9d9962dd453473597d10289802728218a881808f594ff799d2002ceb319d2e79b1b7063d59b181d4a0efff7920a2dee9653b40a72
 DIST wxGTK-3.0.4_p20180507.tar.xz 2972 BLAKE2B 431855d43aefac6227925195c107b21f7539ca2709c98f6d6beb7d25dbdf8633c61bb160fb4e5c993e97dbddc37cdf90dc7b09753a312c25b16f79f0207cfe98 SHA512 9caa7ca3b6f15fd70014ccd4008c4fa76f12cb07d3fc58a8f0d2b9a591cf8be3f0eb40497dc757b9d0a04d26f54296aaa8fe693aa601bb1c058365529bb4bc8b
+DIST wxGTK-3.0.4_p20181106.tar.xz 28448 BLAKE2B dbbaaa49cbf03b42089c04d3c6045734f045e5bddc66b72f367f2ba1deed0531280c3bf3db873bf78dd33cee9873e20839ab38b94f90830b48bc1a8122164d02 SHA512 d1bde53b4eac1f8e6785379f99d585c926fd132c709ca134d7c8c3d62a2bcf77059b90f25333aa692932888318dadf464620b0a136341217cae7a2cd2c93ab50
 DIST wxWidgets-3.0.3-docs-html.tar.bz2 23803675 BLAKE2B 181305a2b8935adee8d50873665bc094f46a061fe1bcf8521f8a4d5613013d6ad58ce172e56118f3833ce3489ab2e919bbd5482445ce55455e696252bb747d3c SHA512 655efde42e467d1d48d8adb95e2394d90cedca8eb6a54a7d53771d3d2d4d5f72637aea6ea12a4c1f570c3905a458aebea067cd74e184c4c85ca73e49e04282cb
 DIST wxWidgets-3.0.3.tar.bz2 20054446 BLAKE2B ebbe977a59f215fb2e35300aec91ad6d042d099586c4f6624d817c689feae090ff6df5718baa94a79e8e46120a6b4a154a7e9a584e14363e832602841502f0f6 SHA512 dfe53682d7cda1d460f336a890603c4e823078be4b05e7cf43ab36cb49247f702808aa939d9311705bdf5f96eaa076e7a8f77f4415bc07c5bfdc19e5deff1dd1
 DIST wxWidgets-3.0.4-docs-html.tar.bz2 24122986 BLAKE2B ffd38d50e6cb44077f346597863a8dfb1cb5172b9380995082acb23b5b5dae060bc1e3d14307a1146ccd93b5ae9c4fd8fb206346c8d5aced5a535cd3d7f8961a SHA512 2b4cefc98f5f034a8c36237c4979bd02e8b0ed60aaeb31946d8661fb8e5297172cec807e45c96fe2939b012f093950721cda8bf9f750697b50e3741711011ccd

diff --git a/x11-libs/wxGTK/files/wxGTK-3.0.5-collision.patch b/x11-libs/wxGTK/files/wxGTK-3.0.5-collision.patch
new file mode 100644
index 00000000000..69531cc33aa
--- /dev/null
+++ b/x11-libs/wxGTK/files/wxGTK-3.0.5-collision.patch
@@ -0,0 +1,75 @@
+Prevent file collisions between multiple installed SLOTs.
+
+  - Don't install wxwin.m4.  It is installed with app-eselect/eselect-wxwidgets.
+  - Version the bakefile preset filenames.  Unversioned symlinks to these files
+    are handled by eselect.
+  - Version wx-config and wxrc.  The unversioned forms are wrapper scripts
+    installed with eselect-wxwidgets.
+  - Version wxstd.mo and modify AddStdCatalog to use it.
+
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -15213,10 +15213,10 @@ COND_wxUSE_REGEX_builtin___LIB_REGEX_p = \
+ all: $(__wxregex___depname) $(__wxzlib___depname) $(__wxpng___depname) $(__wxjpeg___depname) $(__wxtiff___depname) $(__wxexpat___depname) $(__wxscintilla___depname) $(__monodll___depname) $(__monolib___depname) $(__basedll___depname) $(__baselib___depname) $(__netdll___depname) $(__netlib___depname) $(__coredll___depname) $(__corelib___depname) $(__advdll___depname) $(__advlib___depname) $(__mediadll___depname) $(__medialib___depname) $(__htmldll___depname) $(__htmllib___depname) $(__webviewdll___depname) $(__webviewlib___depname) $(__qadll___depname) $(__qalib___depname) $(__xmldll___depname) $(__xmllib___depname) $(__xrcdll___depname) $(__xrclib___depname) $(__auidll___depname) $(__auilib___depname) $(__ribbondll___depname) $(__ribbonlib___depname) $(__propgriddll___depname) $(__propgridlib___depname) $(__richtextdll___depname) $(__richtextlib___depname) $(__stcdll___depname) $(__stclib___depname) $(__gldll___depname) $(__gllib___depname) $(__sound_sdl___depname) $(__webkit2_ext_
 __depname) $(__wxrc___depname) $(__cocoa_res___depname)
+ 
+ install: $(__install_wxregex___depname) $(__install_wxzlib___depname) $(__install_wxpng___depname) $(__install_wxjpeg___depname) $(__install_wxtiff___depname) $(__install_wxexpat___depname) $(__install_wxscintilla___depname) $(__install_monodll___depname) $(__install_monolib___depname) $(__install_basedll___depname) $(__install_baselib___depname) $(__install_netdll___depname) $(__install_netlib___depname) $(__install_coredll___depname) $(__install_corelib___depname) $(__install_advdll___depname) $(__install_advlib___depname) $(__install_mediadll___depname) $(__install_medialib___depname) $(__install_htmldll___depname) $(__install_htmllib___depname) $(__install_webviewdll___depname) $(__install_webviewlib___depname) $(__install_qadll___depname) $(__install_qalib___depname) $(__install_xmldll___depname) $(__install_xmllib___depname) $(__install_xrcdll___depname) $(__install_xrclib___depname) $(__install_auidll___depname) $(__install_auilib___depname) $(__install_ribbondll___depname) 
 $(__install_ribbonlib___depname) $(__install_propgriddll___depname) $(__install_propgridlib___depname) $(__install_richtextdll___depname) $(__install_richtextlib___depname) $(__install_stcdll___depname) $(__install_stclib___depname) $(__install_gldll___depname) $(__install_gllib___depname) $(__install_sound_sdl___depname) $(__install_webkit2_ext___depname) $(__install_wxrc___depname) install-wxconfig locale_install locale_msw_install $(__cocoa_res_install___depname)
+-	$(INSTALL_DIR) $(DESTDIR)$(datadir)/aclocal
+-	(cd $(srcdir) ; $(INSTALL_DATA)  wxwin.m4 $(DESTDIR)$(datadir)/aclocal)
+ 	$(INSTALL_DIR) $(DESTDIR)$(datadir)/bakefile/presets
+-	(cd $(srcdir)/build/bakefiles/wxpresets/presets ; $(INSTALL_DATA)  wx.bkl wx_unix.bkl wx_win32.bkl wx_xrc.bkl wx_presets.py $(DESTDIR)$(datadir)/bakefile/presets)
++	(cd $(srcdir)/build/bakefiles/wxpresets/presets ; \
++	for i in wx.bkl wx_unix.bkl wx_win32.bkl wx_xrc.bkl wx_presets.py ; do \
++	$(INSTALL_DATA) $$i $(DESTDIR)$(datadir)/bakefile/presets/wx$(WX_RELEASE_NODOT)$${i##wx} ; done)
+ 	$(DYLIB_RPATH_INSTALL)
+ 	$(INSTALL_DIR) $(DESTDIR)$(libdir)/wx/include/$(TOOLCHAIN_FULLNAME)/wx
+ 	for f in setup.h $(RCDEFS_H); do \
+@@ -16101,7 +16101,7 @@ install-wxconfig:
+ 	$(INSTALL_DIR) $(DESTDIR)$(bindir)
+ 	$(INSTALL_DIR) $(DESTDIR)$(libdir)/wx/config
+ 	$(INSTALL_SCRIPT) lib/wx/config/$(TOOLCHAIN_FULLNAME) $(DESTDIR)$(libdir)/wx/config
+-	(cd $(DESTDIR)$(bindir) && rm -f wx-config && $(LN_S) $(libdir)/wx/config/$(TOOLCHAIN_FULLNAME) wx-config || cp -p $(DESTDIR)$(libdir)/wx/config/$(TOOLCHAIN_FULLNAME) wx-config)
++	(cd $(DESTDIR)$(bindir) && rm -f wx-config-$(WX_RELEASE) && $(LN_S) $(libdir)/wx/config/$(TOOLCHAIN_FULLNAME) wx-config-$(WX_RELEASE) || cp -p $(DESTDIR)$(libdir)/wx/config/$(TOOLCHAIN_FULLNAME) wx-config-$(WX_RELEASE))
+ 
+ locale_install: 
+ 	$(INSTALL_DIR) $(DESTDIR)$(datadir)/locale
+@@ -16109,7 +16109,7 @@ locale_install:
+ 	$(INSTALL_DIR) $(DESTDIR)$(datadir)/locale/$$l ; \
+ 	$(INSTALL_DIR) $(DESTDIR)$(datadir)/locale/$$l/LC_MESSAGES ; \
+ 	if test -f $(srcdir)/locale/$$l.mo ; then \
+-	$(INSTALL_DATA) $(srcdir)/locale/$$l.mo $(DESTDIR)$(datadir)/locale/$$l/LC_MESSAGES/wxstd.mo ; \
++	$(INSTALL_DATA) $(srcdir)/locale/$$l.mo $(DESTDIR)$(datadir)/locale/$$l/LC_MESSAGES/wxstd$(WX_RELEASE_NODOT).mo ; \
+ 	fi ; \
+ 	done
+ 
+--- a/build/bakefiles/wx.bkl
++++ b/build/bakefiles/wx.bkl
+@@ -137,7 +137,7 @@
+         <using module="gettext"/>
+         <gettext-catalogs id="locale">
+             <srcdir>$(SRCDIR)/locale</srcdir>
+-            <catalog-name>wxstd</catalog-name>
++            <catalog-name>wxstd$(WX_RELEASE_NODOT)</catalog-name>
+             <linguas>
+                 ca cs da de el es fi fr hu id it ja nl pl ru sl sv tr uk
+                 zh zh_CN zh_TW
+--- a/src/common/translation.cpp
++++ b/src/common/translation.cpp
+@@ -1458,7 +1458,7 @@ wxArrayString wxTranslations::GetAvailableTranslations(const wxString& domain) c
+ 
+ bool wxTranslations::AddStdCatalog()
+ {
+-    if ( !AddCatalog(wxS("wxstd")) )
++    if ( !AddCatalog(wxS("wxstd" wxSTRINGIZE(wxMAJOR_VERSION) wxSTRINGIZE(wxMINOR_VERSION))) )
+         return false;
+ 
+     // there may be a catalog with toolkit specific overrides, it is not
+--- a/utils/wxrc/Makefile.in
++++ b/utils/wxrc/Makefile.in
+@@ -125,7 +125,6 @@ distclean: clean
+ @COND_USE_XRC_1@	rm -f $(DESTDIR)$(bindir)/wxrc$(EXEEXT) $(DESTDIR)$(bindir)/wxrc-$(WX_RELEASE)
+ @COND_USE_XRC_1@	$(INSTALL_PROGRAM) wxrc$(EXEEXT) $(DESTDIR)$(bindir)
+ @COND_USE_XRC_1@	mv -f $(DESTDIR)$(bindir)/wxrc$(EXEEXT) $(DESTDIR)$(bindir)/wxrc-$(WX_RELEASE)
+-@COND_USE_XRC_1@	(cd $(DESTDIR)$(bindir) && $(LN_S) wxrc-$(WX_RELEASE) wxrc$(EXEEXT))
+ 
+ @COND_USE_XRC_1@uninstall_wxrc: 
+ @COND_USE_XRC_1@	rm -f $(DESTDIR)$(bindir)/wxrc$(EXEEXT)

diff --git a/x11-libs/wxGTK/wxGTK-3.0.4-r1.ebuild b/x11-libs/wxGTK/wxGTK-3.0.4-r1.ebuild
new file mode 100644
index 00000000000..56faa601ce2
--- /dev/null
+++ b/x11-libs/wxGTK/wxGTK-3.0.4-r1.ebuild
@@ -0,0 +1,140 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit multilib-minimal
+
+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.4_p20181106.tar.xz
+	doc? ( https://github.com/wxWidgets/wxWidgets/releases/download/v${PV}/wxWidgets-${PV}-docs-html.tar.bz2 )"
+
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="+X aqua doc debug gstreamer libnotify opengl sdl tiff"
+
+SLOT="3.0"
+
+RDEPEND="
+	dev-libs/expat[${MULTILIB_USEDEP}]
+	sdl? ( media-libs/libsdl2[${MULTILIB_USEDEP}] )
+	X? (
+		>=dev-libs/glib-2.22:2[${MULTILIB_USEDEP}]
+		media-libs/libpng:0=[${MULTILIB_USEDEP}]
+		sys-libs/zlib[${MULTILIB_USEDEP}]
+		virtual/jpeg:0=[${MULTILIB_USEDEP}]
+		>=x11-libs/gtk+-2.18:2[${MULTILIB_USEDEP}]
+		x11-libs/gdk-pixbuf[${MULTILIB_USEDEP}]
+		x11-libs/libSM[${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:0[${MULTILIB_USEDEP}] )
+		)
+	aqua? (
+		x11-libs/gtk+:2[aqua=,${MULTILIB_USEDEP}]
+		virtual/jpeg:0=[${MULTILIB_USEDEP}]
+		tiff?   ( media-libs/tiff:0[${MULTILIB_USEDEP}] )
+		)"
+
+DEPEND="${RDEPEND}
+	virtual/pkgconfig[${MULTILIB_USEDEP}]
+	opengl? ( virtual/glu[${MULTILIB_USEDEP}] )
+	X? ( x11-base/xorg-proto )"
+
+PDEPEND=">=app-eselect/eselect-wxwidgets-20131230"
+
+LICENSE="wxWinLL-3 GPL-2 doc? ( wxWinFDL-3 )"
+
+S="${WORKDIR}/wxWidgets-${PV}"
+PATCHES=(
+	"${WORKDIR}"/wxGTK-3.0.4_p20181106/
+	"${FILESDIR}"/${PN}-3.0.5-collision.patch
+)
+
+multilib_src_configure() {
+	local myconf
+
+	# X independent options
+	myconf="
+			--with-zlib=sys
+			--with-expat=sys
+			--enable-compat28
+			$(use_with sdl)"
+
+	# 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 \
+		&& myconf="${myconf} --enable-debug=max"
+
+	# wxGTK options
+	#   --enable-graphics_ctx - needed for webkit, editra
+	#   --without-gnomevfs - bug #203389
+	use X && \
+		myconf="${myconf}
+			--enable-graphics_ctx
+			--with-gtkprint
+			--enable-gui
+			--with-libpng=sys
+			--with-libxpm=sys
+			--with-libjpeg=sys
+			--without-gnomevfs
+			--disable-webview
+			$(use_enable gstreamer mediactrl)
+			$(use_with libnotify)
+			$(use_with opengl)
+			$(use_with tiff libtiff sys)"
+
+	use aqua && \
+		myconf="${myconf}
+			--enable-graphics_ctx
+			--enable-gui
+			--with-libpng=sys
+			--with-libxpm=sys
+			--with-libjpeg=sys
+			--with-mac
+			--with-opengl"
+			# cocoa toolkit seems to be broken
+
+	# wxBase options
+	if use !X && use !aqua ; then
+		myconf="${myconf}
+			--disable-gui"
+	fi
+
+	ECONF_SOURCE="${S}" econf ${myconf}
+}
+
+multilib_src_install_all() {
+	cd "${S}"/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
+
+	# Stray windows locale file, causes collisions
+	local wxmsw="${ED}usr/share/locale/it/LC_MESSAGES/wxmsw.mo"
+	[[ -e ${wxmsw} ]] && rm "${wxmsw}"
+}
+
+pkg_postinst() {
+	has_version app-eselect/eselect-wxwidgets \
+		&& eselect wxwidgets update
+}
+
+pkg_postrm() {
+	has_version app-eselect/eselect-wxwidgets \
+		&& eselect wxwidgets update
+}

diff --git a/x11-libs/wxGTK/wxGTK-3.0.4-r301.ebuild b/x11-libs/wxGTK/wxGTK-3.0.4-r301.ebuild
new file mode 100644
index 00000000000..a4027d4e263
--- /dev/null
+++ b/x11-libs/wxGTK/wxGTK-3.0.4-r301.ebuild
@@ -0,0 +1,184 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit multilib-minimal
+
+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.4_p20181106.tar.xz
+	doc? ( https://github.com/wxWidgets/wxWidgets/releases/download/v${PV}/wxWidgets-${PV}-docs-html.tar.bz2 )"
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="+X aqua doc debug gstreamer libnotify opengl sdl tiff webkit"
+
+WXSUBVERSION=${PV}.0-gtk3			# 3.0.3.0-gtk3
+WXVERSION=${WXSUBVERSION%.*}			# 3.0.3
+WXRELEASE=${WXVERSION%.*}-gtk3			# 3.0-gtk3
+WXRELEASE_NODOT=${WXRELEASE//./}		# 30-gtk3
+
+SLOT="${WXRELEASE}"
+
+RDEPEND="
+	dev-libs/expat[${MULTILIB_USEDEP}]
+	sdl? ( media-libs/libsdl2[${MULTILIB_USEDEP}] )
+	X? (
+		>=dev-libs/glib-2.22:2[${MULTILIB_USEDEP}]
+		media-libs/libpng:0=[${MULTILIB_USEDEP}]
+		sys-libs/zlib[${MULTILIB_USEDEP}]
+		virtual/jpeg:0=[${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:0[${MULTILIB_USEDEP}] )
+		webkit? ( net-libs/webkit-gtk:4 )
+		)
+	aqua? (
+		x11-libs/gtk+:3[aqua=,${MULTILIB_USEDEP}]
+		virtual/jpeg:0=[${MULTILIB_USEDEP}]
+		tiff?   ( media-libs/tiff:0[${MULTILIB_USEDEP}] )
+		)"
+
+DEPEND="${RDEPEND}
+	virtual/pkgconfig[${MULTILIB_USEDEP}]
+	opengl? ( virtual/glu[${MULTILIB_USEDEP}] )
+	X? ( x11-base/xorg-proto )"
+
+PDEPEND=">=app-eselect/eselect-wxwidgets-20131230"
+
+LICENSE="wxWinLL-3 GPL-2 doc? ( wxWinFDL-3 )"
+
+S="${WORKDIR}/wxWidgets-${PV}"
+
+PATCHES=(
+	"${WORKDIR}"/wxGTK-3.0.4_p20181106/
+	"${FILESDIR}"/wxGTK-${SLOT}-translation-domain.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 || 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() {
+	local myconf
+
+	# X independent options
+	myconf="
+			--with-zlib=sys
+			--with-expat=sys
+			--enable-compat28
+			$(use_with sdl)"
+
+	# 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 \
+		&& myconf="${myconf} --enable-debug=max"
+
+	# wxGTK options
+	#   --enable-graphics_ctx - needed for webkit, editra
+	#   --without-gnomevfs - bug #203389
+	use X && \
+		myconf="${myconf}
+			--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 aqua && \
+		myconf="${myconf}
+			--enable-graphics_ctx
+			--enable-gui
+			--with-libpng=sys
+			--with-libxpm=sys
+			--with-libjpeg=sys
+			--with-mac
+			--with-opengl"
+			# cocoa toolkit seems to be broken
+
+	# wxBase options
+	if use !X && use !aqua ; then
+		myconf="${myconf}
+			--disable-gui"
+	fi
+
+	ECONF_SOURCE="${S}" econf ${myconf}
+}
+
+multilib_src_install_all() {
+	cd "${S}"/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
+
+	# Stray windows locale file, bug #650118
+	local wxmsw="${ED}usr/share/locale/it/LC_MESSAGES/wxmsw30-gtk3.mo"
+	[[ -e ${wxmsw} ]] && rm "${wxmsw}"
+
+	# Unversioned links
+	rm "${D}"/usr/bin/wx{-config,rc}
+
+	# version bakefile presets
+	pushd "${D}"usr/share/bakefile/presets/ > /dev/null
+	for f in wx*; do
+		mv "${f}" "${f/wx/wx30gtk3}"
+	done
+	popd > /dev/null
+}
+
+pkg_postinst() {
+	has_version app-eselect/eselect-wxwidgets \
+		&& eselect wxwidgets update
+}
+
+pkg_postrm() {
+	has_version app-eselect/eselect-wxwidgets \
+		&& eselect wxwidgets update
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: x11-libs/wxGTK/files/, x11-libs/wxGTK/
@ 2023-01-20 22:18 Arsen Arsenović
  0 siblings, 0 replies; 8+ messages in thread
From: Arsen Arsenović @ 2023-01-20 22:18 UTC (permalink / raw
  To: gentoo-commits

commit:     beeee0f2ecaab6d84125cc5ab6dba954b6222dd5
Author:     Arsen Arsenović <arsen <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 20 21:21:46 2023 +0000
Commit:     Arsen Arsenović <arsen <AT> gentoo <DOT> org>
CommitDate: Fri Jan 20 22:15:47 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=beeee0f2

x11-libs/wxGTK: fix automagic deps, broken test, drop unused SRC_URI

Signed-off-by: Arsen Arsenović <arsen <AT> gentoo.org>

 .../files/wxGTK-3.2.1-prefer-lib64-in-tests.patch  |  33 ++++
 .../wxGTK/files/wxGTK-3.2.1-wayland-control.patch  | 185 +++++++++++++++++++++
 x11-libs/wxGTK/metadata.xml                        |   1 +
 x11-libs/wxGTK/wxGTK-3.2.1.ebuild                  |  75 +++++++--
 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() {


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: x11-libs/wxGTK/files/, x11-libs/wxGTK/
@ 2023-01-20 22:18 Arsen Arsenović
  0 siblings, 0 replies; 8+ messages in thread
From: Arsen Arsenović @ 2023-01-20 22:18 UTC (permalink / raw
  To: gentoo-commits

commit:     b5fa6a7f4de2426217956f0a893c480b9fe873c2
Author:     brahmajit das <listout <AT> protonmail <DOT> com>
AuthorDate: Mon Nov 21 08:47:43 2022 +0000
Commit:     Arsen Arsenović <arsen <AT> gentoo <DOT> org>
CommitDate: Fri Jan 20 22:15:47 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b5fa6a7f

x11-libs/wxGTK: Version bump to 3.2.1

Closes: https://bugs.gentoo.org/577030
Closes: https://bugs.gentoo.org/873124
Signed-off-by: brahmajit das <listout <AT> protonmail.com>
Signed-off-by: Arsen Arsenović <arsen <AT> gentoo.org>

 x11-libs/wxGTK/Manifest                            |   2 +
 .../wxGTK/files/wxGTK-3.2.1-configure-tests.patch  |  19 +++
 .../wxGTK-3.2.1-gtk3-translation-domain.patch      |  12 ++
 x11-libs/wxGTK/wxGTK-3.2.1.ebuild                  | 177 +++++++++++++++++++++
 4 files changed, 210 insertions(+)

diff --git a/x11-libs/wxGTK/Manifest b/x11-libs/wxGTK/Manifest
index 4bb5a247f623..9786d1999568 100644
--- a/x11-libs/wxGTK/Manifest
+++ b/x11-libs/wxGTK/Manifest
@@ -4,3 +4,5 @@ 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

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/wxGTK-3.2.1.ebuild b/x11-libs/wxGTK/wxGTK-3.2.1.ebuild
new file mode 100644
index 000000000000..479152cb5f24
--- /dev/null
+++ b/x11-libs/wxGTK/wxGTK-3.2.1.ebuild
@@ -0,0 +1,177 @@
+# Copyright 1999-2022 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
+	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 )"
+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:0[${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}"/${P}-gtk3-translation-domain.patch
+	#"${FILESDIR}"/wxGTK-ignore-c++-abi.patch #676878
+	"${FILESDIR}/${P}-configure-tests.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):" \
+		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() {
+	# X independent options
+	local myeconfargs=(
+		--with-zlib=sys
+		--with-expat=sys
+		--enable-compat30
+		$(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 )
+
+	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
+
+	# 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
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: x11-libs/wxGTK/files/, x11-libs/wxGTK/
@ 2023-06-26 14:11 Sam James
  0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2023-06-26 14:11 UTC (permalink / raw
  To: gentoo-commits

commit:     ad105d9d002da5a860de683cf6bf4b229091afbd
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 26 14:02:55 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jun 26 14:03:11 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ad105d9d

x11-libs/wxGTK: fix modern C issue in configure

Closes: https://bugs.gentoo.org/874441
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/wxGTK-3.0.5.1-configure-modern-c.patch   | 54 ++++++++++++++++++++++
 x11-libs/wxGTK/wxGTK-3.0.5.1-r1.ebuild             |  5 +-
 2 files changed, 57 insertions(+), 2 deletions(-)

diff --git a/x11-libs/wxGTK/files/wxGTK-3.0.5.1-configure-modern-c.patch b/x11-libs/wxGTK/files/wxGTK-3.0.5.1-configure-modern-c.patch
new file mode 100644
index 000000000000..6512c6329efb
--- /dev/null
+++ b/x11-libs/wxGTK/files/wxGTK-3.0.5.1-configure-modern-c.patch
@@ -0,0 +1,54 @@
+https://github.com/wxWidgets/wxWidgets/commit/da4b42688a6cd5444eefb91bf40183d88203ffca
+https://bugs.gentoo.org/874441
+--- a/configure
++++ b/configure
+@@ -19586,6 +19586,7 @@ else
+ /* end confdefs.h.  */
+ 
+                   #include <stdio.h>
++                  #include <stdlib.h>
+ 
+                   int main()
+                   {
+@@ -22300,6 +22301,7 @@ else
+ 
+                         #include <zlib.h>
+                         #include <stdio.h>
++                        #include <stdlib.h>
+ 
+                         int main()
+                         {
+@@ -22422,6 +22424,7 @@ else
+ 
+                     #include <png.h>
+                     #include <stdio.h>
++                    #include <stdlib.h>
+ 
+                     int main()
+                     {
+--- a/configure.in
++++ b/configure.in
+@@ -1482,6 +1482,7 @@ case "${host}" in
+               dnl Check the gcc version macro.
+               [
+                   #include <stdio.h>
++                  #include <stdlib.h>
+ 
+                   int main()
+                   {
+@@ -2439,6 +2440,7 @@ if test "$wxUSE_ZLIB" != "no" ; then
+                     [
+                         #include <zlib.h>
+                         #include <stdio.h>
++                        #include <stdlib.h>
+ 
+                         int main()
+                         {
+@@ -2507,6 +2509,7 @@ if test "$wxUSE_LIBPNG" != "no" ; then
+                 [
+                     #include <png.h>
+                     #include <stdio.h>
++                    #include <stdlib.h>
+ 
+                     int main()
+                     {

diff --git a/x11-libs/wxGTK/wxGTK-3.0.5.1-r1.ebuild b/x11-libs/wxGTK/wxGTK-3.0.5.1-r1.ebuild
index 6b9d506ba157..d679c0cb319d 100644
--- a/x11-libs/wxGTK/wxGTK-3.0.5.1-r1.ebuild
+++ b/x11-libs/wxGTK/wxGTK-3.0.5.1-r1.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=7
@@ -62,7 +62,8 @@ 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}-configure-tests.patch
+	"${FILESDIR}"/${PN}-3.0.5.1-configure-modern-c.patch
 )
 
 src_prepare() {


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: x11-libs/wxGTK/files/, x11-libs/wxGTK/
@ 2024-03-08 20:02 Sam James
  0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2024-03-08 20:02 UTC (permalink / raw
  To: gentoo-commits

commit:     1ee5d8e55affd61562ce219e17d5543af0a72215
Author:     Matoro Mahri <matoro_gentoo <AT> matoro <DOT> tk>
AuthorDate: Fri Feb  2 20:27:14 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Mar  8 20:00:43 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ee5d8e5

x11-libs/wxGTK: backport test fix for systems with CONFIG_PM=n

Tests currently fail on systems with CONFIG_PM=n set.  Since this is
impossible to enable on some platforms, backport the upstream fix to
conditionally skip this test.

See: https://github.com/wxWidgets/wxWidgets/pull/24197
Bug: https://bugs.gentoo.org/916884
Signed-off-by: Matoro Mahri <matoro_gentoo <AT> matoro.tk>
Closes: https://github.com/gentoo/gentoo/pull/35156
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/wxGTK-3.2.2.1-backport-pr24197.patch     | 88 ++++++++++++++++++++++
 x11-libs/wxGTK/wxGTK-3.2.2.1-r3.ebuild             |  1 +
 2 files changed, 89 insertions(+)

diff --git a/x11-libs/wxGTK/files/wxGTK-3.2.2.1-backport-pr24197.patch b/x11-libs/wxGTK/files/wxGTK-3.2.2.1-backport-pr24197.patch
new file mode 100644
index 000000000000..2adf03aef45b
--- /dev/null
+++ b/x11-libs/wxGTK/files/wxGTK-3.2.2.1-backport-pr24197.patch
@@ -0,0 +1,88 @@
+https://bugs.gentoo.org/916884
+https://github.com/wxWidgets/wxWidgets/pull/24197
+
+From 891bfff867b7dc92ed6330ea46ee2dcfa5424ee0 Mon Sep 17 00:00:00 2001
+From: Cliff Zhao <qzhao@suse.com>
+Date: Thu, 4 Jan 2024 08:01:00 +0100
+Subject: [PATCH] Fix testsuite failures on s390x
+
+``/sys/power/state`` does not exist on s390x platforms and certain
+types of containers, so check that the file exist before running the
+test case.
+
+Output from ``make check`` was:
+
+	./textfile/textfiletest.cpp:351
+	...............................................................................
+
+	./textfile/textfiletest.cpp:354: FAILED:
+	  CHECK( f.Open("/sys/power/state") )
+	with expansion:
+	  false
+
+	./textfile/textfiletest.cpp:355: FAILED:
+	  REQUIRE( f.GetLineCount() == 1 )
+	with expansion:
+	  0 == 1
+---
+ tests/file/filetest.cpp         | 2 ++
+ tests/filename/filenametest.cpp | 2 ++
+ tests/textfile/textfiletest.cpp | 2 ++
+ 3 files changed, 6 insertions(+)
+
+diff --git a/tests/file/filetest.cpp b/tests/file/filetest.cpp
+index 8902eb4d6684..fc3c90569480 100644
+--- a/tests/file/filetest.cpp
++++ b/tests/file/filetest.cpp
+@@ -153,6 +153,7 @@ TEST_CASE("wxFile::Special", "[file][linux][special-file]")
+     CHECK( fileProc.ReadAll(&s) );
+     CHECK( !s.empty() );
+ 
++    if ( wxFile::Exists("/sys/power/state") ) {
+     // All files in /sys have the size of one kernel page, even if they don't
+     // have that much data in them.
+     const long pageSize = sysconf(_SC_PAGESIZE);
+@@ -163,6 +164,7 @@ TEST_CASE("wxFile::Special", "[file][linux][special-file]")
+     CHECK( fileSys.ReadAll(&s) );
+     CHECK( !s.empty() );
+     CHECK( s.length() < pageSize );
++    }
+ }
+ 
+ #endif // __LINUX__
+diff --git a/tests/filename/filenametest.cpp b/tests/filename/filenametest.cpp
+index 84356b39f719..ce2ec2af2760 100644
+--- a/tests/filename/filenametest.cpp
++++ b/tests/filename/filenametest.cpp
+@@ -1040,9 +1040,11 @@ TEST_CASE("wxFileName::GetSizeSpecial", "[filename][linux][special-file]")
+     INFO( "size of /proc/kcore=" << size );
+     CHECK( size > 0 );
+ 
++    if ( wxFile::Exists("/sys/power/state") ) {
+     // All files in /sys are one page in size, irrespectively of the size of
+     // their actual contents.
+     CHECK( wxFileName::GetSize("/sys/power/state") == sysconf(_SC_PAGESIZE) );
++    }
+ }
+ 
+ #endif // __LINUX__
+diff --git a/tests/textfile/textfiletest.cpp b/tests/textfile/textfiletest.cpp
+index f744ffc3271b..73467be8f85f 100644
+--- a/tests/textfile/textfiletest.cpp
++++ b/tests/textfile/textfiletest.cpp
+@@ -348,6 +348,7 @@ TEST_CASE("wxTextFile::Special", "[textfile][linux][special-file]")
+         CHECK( f.GetLineCount() > 1 );
+     }
+ 
++    if ( wxFile::Exists("/sys/power/state") ) {
+     SECTION("/sys")
+     {
+         wxTextFile f;
+@@ -356,6 +357,7 @@ TEST_CASE("wxTextFile::Special", "[textfile][linux][special-file]")
+         INFO( "/sys/power/state contains \"" << f[0] << "\"" );
+         CHECK( (f[0].find("mem") != wxString::npos || f[0].find("disk") != wxString::npos) );
+     }
++    }
+ }
+ 
+ #endif // __LINUX__

diff --git a/x11-libs/wxGTK/wxGTK-3.2.2.1-r3.ebuild b/x11-libs/wxGTK/wxGTK-3.2.2.1-r3.ebuild
index b6f07556613f..90d412ce19a8 100644
--- a/x11-libs/wxGTK/wxGTK-3.2.2.1-r3.ebuild
+++ b/x11-libs/wxGTK/wxGTK-3.2.2.1-r3.ebuild
@@ -84,6 +84,7 @@ PATCHES=(
 	"${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() {


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: x11-libs/wxGTK/files/, x11-libs/wxGTK/
@ 2024-05-08 11:07 Sam James
  0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2024-05-08 11:07 UTC (permalink / raw
  To: gentoo-commits

commit:     b840ec865ffc41c408909b0fa586b7652c72af30
Author:     NHOrus <jy6x2b32pie9 <AT> yahoo <DOT> com>
AuthorDate: Thu Mar 28 20:00:03 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed May  8 11:06:46 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b840ec86

x11-libs/wxGTK: remove auto_ptr in 3.0.5.1

Backports fixes from 3.2.2, using existing wxScopedPtr

[sam: Keep -r1 in stable and add -r2 in ~arch.]

Closes: https://bugs.gentoo.org/910441
Signed-off-by: NHOrus <jy6x2b32pie9 <AT> yahoo.com>
Closes: https://github.com/gentoo/gentoo/pull/35971
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../wxGTK/files/wxGTK-3.0.5.1-excise-autoptr.patch | 322 +++++++++++++++++++++
 x11-libs/wxGTK/wxGTK-3.0.5.1-r2.ebuild             | 188 ++++++++++++
 2 files changed, 510 insertions(+)

diff --git a/x11-libs/wxGTK/files/wxGTK-3.0.5.1-excise-autoptr.patch b/x11-libs/wxGTK/files/wxGTK-3.0.5.1-excise-autoptr.patch
new file mode 100644
index 000000000000..e03f64632f2b
--- /dev/null
+++ b/x11-libs/wxGTK/files/wxGTK-3.0.5.1-excise-autoptr.patch
@@ -0,0 +1,322 @@
+Direct replacement of auto_ptr, equivalent to parts of upstream commits:
+https://github.com/wxWidgets/wxWidgets/commit/b8c9cd35288a5c94f88ea83bf8c9ee644f99ece1
+https://github.com/wxWidgets/wxWidgets/commit/11a5728b327d5f16ef284d737f6329d38ae4d4b1
+made by diffing new-er upstream version with fixes included and current file
+diff --git a/tests/archive/archivetest.cpp b/tests/archive/archivetest.cpp
+index fa122d1..845ee0b 100644
+--- a/tests/archive/archivetest.cpp
++++ b/tests/archive/archivetest.cpp
+@@ -32,7 +32,6 @@
+ #include <sys/stat.h>
+ 
+ using std::string;
+-using std::auto_ptr;
+ 
+ 
+ // Check whether member templates can be used
+@@ -559,7 +558,7 @@ TestEntry& ArchiveTestCase<ClassFactoryT>::Add(const char *name,
+ template <class ClassFactoryT>
+ void ArchiveTestCase<ClassFactoryT>::CreateArchive(wxOutputStream& out)
+ {
+-    auto_ptr<OutputStreamT> arc(m_factory->NewStream(out));
++    wxScopedPtr<OutputStreamT> arc(m_factory->NewStream(out));
+     TestEntries::iterator it;
+ 
+     OnCreateArchive(*arc);
+@@ -587,7 +586,7 @@ void ArchiveTestCase<ClassFactoryT>::CreateArchive(wxOutputStream& out)
+ 
+         if ((choices & 2) || testEntry.IsText()) {
+             // try PutNextEntry(EntryT *pEntry)
+-            auto_ptr<EntryT> entry(m_factory->NewEntry());
++            wxScopedPtr<EntryT> entry(m_factory->NewEntry());
+             entry->SetName(name, wxPATH_UNIX);
+             if (setIsDir)
+                 entry->SetIsDir();
+@@ -701,8 +700,8 @@ template <class ClassFactoryT>
+ void ArchiveTestCase<ClassFactoryT>::ModifyArchive(wxInputStream& in,
+                                                    wxOutputStream& out)
+ {
+-    auto_ptr<InputStreamT> arcIn(m_factory->NewStream(in));
+-    auto_ptr<OutputStreamT> arcOut(m_factory->NewStream(out));
++    wxScopedPtr<InputStreamT> arcIn(m_factory->NewStream(in));
++    wxScopedPtr<OutputStreamT> arcOut(m_factory->NewStream(out));
+     EntryT *pEntry;
+ 
+     const wxString deleteName = wxT("bin/bin1000");
+@@ -714,7 +713,7 @@ void ArchiveTestCase<ClassFactoryT>::ModifyArchive(wxInputStream& in,
+     arcOut->CopyArchiveMetaData(*arcIn);
+ 
+     while ((pEntry = arcIn->GetNextEntry()) != NULL) {
+-        auto_ptr<EntryT> entry(pEntry);
++        wxScopedPtr<EntryT> entry(pEntry);
+         OnSetNotifier(*entry);
+         wxString name = entry->GetName(wxPATH_UNIX);
+ 
+@@ -759,7 +758,7 @@ void ArchiveTestCase<ClassFactoryT>::ModifyArchive(wxInputStream& in,
+ 
+     // try adding a new entry
+     TestEntry& testEntry = Add(newName.mb_str(), newData);
+-    auto_ptr<EntryT> newentry(m_factory->NewEntry());
++    wxScopedPtr<EntryT> newentry(m_factory->NewEntry());
+     newentry->SetName(newName);
+     newentry->SetDateTime(testEntry.GetDateTime());
+     newentry->SetSize(testEntry.GetLength());
+@@ -782,7 +781,7 @@ void ArchiveTestCase<ClassFactoryT>::ExtractArchive(wxInputStream& in)
+     typedef std::list<EntryPtr> Entries;
+     typedef typename Entries::iterator EntryIter;
+ 
+-    auto_ptr<InputStreamT> arc(m_factory->NewStream(in));
++    wxScopedPtr<InputStreamT> arc(m_factory->NewStream(in));
+     int expectedTotal = m_testEntries.size();
+     EntryPtr entry;
+     Entries entries;
+@@ -991,7 +990,7 @@ void ArchiveTestCase<ClassFactoryT>::TestIterator(wxInputStream& in)
+     typedef std::list<EntryT*> ArchiveCatalog;
+     typedef typename ArchiveCatalog::iterator CatalogIter;
+ 
+-    auto_ptr<InputStreamT> arc(m_factory->NewStream(in));
++    wxScopedPtr<InputStreamT> arc(m_factory->NewStream(in));
+     size_t count = 0;
+ 
+ #ifdef WXARC_MEMBER_TEMPLATES
+@@ -1003,7 +1002,7 @@ void ArchiveTestCase<ClassFactoryT>::TestIterator(wxInputStream& in)
+ #endif
+ 
+     for (CatalogIter it = cat.begin(); it != cat.end(); ++it) {
+-        auto_ptr<EntryT> entry(*it);
++        wxScopedPtr<EntryT> entry(*it);
+         count += m_testEntries.count(entry->GetName(wxPATH_UNIX));
+     }
+ 
+@@ -1020,7 +1019,7 @@ void ArchiveTestCase<ClassFactoryT>::TestPairIterator(wxInputStream& in)
+     typedef std::map<wxString, EntryT*> ArchiveCatalog;
+     typedef typename ArchiveCatalog::iterator CatalogIter;
+ 
+-    auto_ptr<InputStreamT> arc(m_factory->NewStream(in));
++    wxScopedPtr<InputStreamT> arc(m_factory->NewStream(in));
+     size_t count = 0;
+ 
+ #ifdef WXARC_MEMBER_TEMPLATES
+@@ -1032,7 +1031,7 @@ void ArchiveTestCase<ClassFactoryT>::TestPairIterator(wxInputStream& in)
+ #endif
+ 
+     for (CatalogIter it = cat.begin(); it != cat.end(); ++it) {
+-        auto_ptr<EntryT> entry(it->second);
++        wxScopedPtr<EntryT> entry(it->second);
+         count += m_testEntries.count(entry->GetName(wxPATH_UNIX));
+     }
+ 
+@@ -1049,7 +1048,7 @@ void ArchiveTestCase<ClassFactoryT>::TestSmartIterator(wxInputStream& in)
+     typedef typename ArchiveCatalog::iterator CatalogIter;
+     typedef wxArchiveIterator<InputStreamT, Ptr<EntryT> > Iter;
+ 
+-    auto_ptr<InputStreamT> arc(m_factory->NewStream(in));
++    wxScopedPtr<InputStreamT> arc(m_factory->NewStream(in));
+ 
+ #ifdef WXARC_MEMBER_TEMPLATES
+     ArchiveCatalog cat((Iter)*arc, Iter());
+@@ -1080,7 +1079,7 @@ void ArchiveTestCase<ClassFactoryT>::TestSmartPairIterator(wxInputStream& in)
+     typedef wxArchiveIterator<InputStreamT,
+                 std::pair<wxString, Ptr<EntryT> > > PairIter;
+ 
+-    auto_ptr<InputStreamT> arc(m_factory->NewStream(in));
++    wxScopedPtr<InputStreamT> arc(m_factory->NewStream(in));
+ 
+ #ifdef WXARC_MEMBER_TEMPLATES
+     ArchiveCatalog cat((PairIter)*arc, PairIter());
+@@ -1108,8 +1107,8 @@ void ArchiveTestCase<ClassFactoryT>::ReadSimultaneous(TestInputStream& in)
+ 
+     // create two archive input streams
+     TestInputStream in2(in);
+-    auto_ptr<InputStreamT> arc(m_factory->NewStream(in));
+-    auto_ptr<InputStreamT> arc2(m_factory->NewStream(in2));
++    wxScopedPtr<InputStreamT> arc(m_factory->NewStream(in));
++    wxScopedPtr<InputStreamT> arc2(m_factory->NewStream(in2));
+ 
+     // load the catalog
+ #ifdef WXARC_MEMBER_TEMPLATES
+@@ -1201,7 +1200,7 @@ protected:
+     void CreateArchive(wxOutputStream& out);
+     void ExtractArchive(wxInputStream& in);
+ 
+-    auto_ptr<wxArchiveClassFactory> m_factory;  // factory to make classes
++    wxScopedPtr<wxArchiveClassFactory> m_factory;  // factory to make classes
+     int m_options;                              // test options
+ };
+ 
+@@ -1241,7 +1240,7 @@ void CorruptionTestCase::runTest()
+ 
+ void CorruptionTestCase::CreateArchive(wxOutputStream& out)
+ {
+-    auto_ptr<wxArchiveOutputStream> arc(m_factory->NewStream(out));
++    wxScopedPtr<wxArchiveOutputStream> arc(m_factory->NewStream(out));
+ 
+     arc->PutNextDirEntry(wxT("dir"));
+     arc->PutNextEntry(wxT("file"));
+@@ -1250,8 +1249,8 @@ void CorruptionTestCase::CreateArchive(wxOutputStream& out)
+ 
+ void CorruptionTestCase::ExtractArchive(wxInputStream& in)
+ {
+-    auto_ptr<wxArchiveInputStream> arc(m_factory->NewStream(in));
+-    auto_ptr<wxArchiveEntry> entry(arc->GetNextEntry());
++    wxScopedPtr<wxArchiveInputStream> arc(m_factory->NewStream(in));
++    wxScopedPtr<wxArchiveEntry> entry(arc->GetNextEntry());
+ 
+     while (entry.get() != NULL) {
+         char buf[1024];
+@@ -1259,7 +1258,6 @@ void CorruptionTestCase::ExtractArchive(wxInputStream& in)
+         while (arc->IsOk())
+             arc->Read(buf, sizeof(buf));
+ 
+-        auto_ptr<wxArchiveEntry> next(arc->GetNextEntry());
+-        entry = next;
++        entry.reset(arc->GetNextEntry());
+     }
+ }
+diff --git a/tests/archive/archivetest.h b/tests/archive/archivetest.h
+index 7a1a306..37a083c 100644
+--- a/tests/archive/archivetest.h
++++ b/tests/archive/archivetest.h
+@@ -13,7 +13,7 @@
+ 
+ #include "wx/archive.h"
+ #include "wx/wfstream.h"
+-
++#include "wx/scopedptr.h"
+ 
+ ///////////////////////////////////////////////////////////////////////////////
+ // Bit flags for options for the tests
+@@ -213,7 +213,7 @@ protected:
+ 
+     typedef std::map<wxString, TestEntry*> TestEntries;
+     TestEntries m_testEntries;              // test data
+-    std::auto_ptr<ClassFactoryT> m_factory; // factory to make classes
++    wxScopedPtr<ClassFactoryT> m_factory; // factory to make classes
+     int m_options;                          // test options
+     wxDateTime m_timeStamp;                 // timestamp to give test entries
+     int m_id;                               // select between the possibilites
+diff --git a/tests/archive/ziptest.cpp b/tests/archive/ziptest.cpp
+index 3e9cff3..dc3fef5 100644
+--- a/tests/archive/ziptest.cpp
++++ b/tests/archive/ziptest.cpp
+@@ -22,7 +22,6 @@
+ #include "wx/zipstrm.h"
+ 
+ using std::string;
+-using std::auto_ptr;
+ 
+ 
+ ///////////////////////////////////////////////////////////////////////////////
+@@ -186,7 +185,7 @@ void ZipPipeTestCase::runTest()
+     TestInputStream in(out, m_id % ((m_options & PipeIn) ? 4 : 3));
+     wxZipInputStream zip(in);
+ 
+-    auto_ptr<wxZipEntry> entry(zip.GetNextEntry());
++    wxScopedPtr<wxZipEntry> entry(zip.GetNextEntry());
+     CPPUNIT_ASSERT(entry.get() != NULL);
+ 
+     if ((m_options & PipeIn) == 0)
+diff --git a/tests/net/socket.cpp b/tests/net/socket.cpp
+index acd91ae..7e27fc4 100644
+--- a/tests/net/socket.cpp
++++ b/tests/net/socket.cpp
+@@ -28,10 +28,11 @@
+ #include "wx/url.h"
+ #include "wx/sstream.h"
+ #include "wx/evtloop.h"
++#include "wx/scopedptr.h"
+ #include <memory>
+ 
+-typedef std::auto_ptr<wxSockAddress> wxSockAddressPtr;
+-typedef std::auto_ptr<wxSocketClient> wxSocketClientPtr;
++typedef wxScopedPtr<wxSockAddress> wxSockAddressPtr;
++typedef wxScopedPtr<wxSocketClient> wxSocketClientPtr;
+ 
+ static wxString gs_serverHost(wxGetenv("WX_TEST_SERVER"));
+ 
+@@ -257,7 +258,7 @@ void SocketTestCase::UrlTest()
+ 
+     wxURL url("http://" + gs_serverHost);
+ 
+-    const std::auto_ptr<wxInputStream> in(url.GetInputStream());
++    const wxScopedPtr<wxInputStream> in(url.GetInputStream());
+     CPPUNIT_ASSERT( in.get() );
+ 
+     wxStringOutputStream out;
+diff --git a/tests/streams/largefile.cpp b/tests/streams/largefile.cpp
+index 9c6c481..59fca24 100644
+--- a/tests/streams/largefile.cpp
++++ b/tests/streams/largefile.cpp
+@@ -33,6 +33,7 @@
+ 
+ #include "wx/filename.h"
+ #include "wx/wfstream.h"
++#include "wx/scopedptr.h"
+ 
+ #ifdef __WINDOWS__
+     #include "wx/msw/wrapwin.h"
+@@ -51,7 +52,6 @@
+     #define fileno _fileno
+ #endif
+ 
+-using std::auto_ptr;
+ 
+ 
+ ///////////////////////////////////////////////////////////////////////////////
+@@ -120,7 +120,7 @@ void LargeFileTest::runTest()
+ 
+     // write a large file
+     {
+-        auto_ptr<wxOutputStream> out(MakeOutStream(tmpfile.m_name));
++        wxScopedPtr<wxOutputStream> out(MakeOutStream(tmpfile.m_name));
+ 
+         // write 'A's at [ 0x7fffffbf, 0x7fffffff [
+         pos = 0x7fffffff - size;
+@@ -154,7 +154,7 @@ void LargeFileTest::runTest()
+ 
+     // read the large file back
+     {
+-        auto_ptr<wxInputStream> in(MakeInStream(tmpfile.m_name));
++        wxScopedPtr<wxInputStream> in(MakeInStream(tmpfile.m_name));
+         char buf[size];
+ 
+         if (haveLFS) {
+@@ -218,7 +218,7 @@ protected:
+ 
+ wxInputStream *LargeFileTest_wxFile::MakeInStream(const wxString& name) const
+ {
+-    auto_ptr<wxFileInputStream> in(new wxFileInputStream(name));
++    wxScopedPtr<wxFileInputStream> in(new wxFileInputStream(name));
+     CPPUNIT_ASSERT(in->IsOk());
+     return in.release();
+ }
+@@ -250,7 +250,7 @@ protected:
+ 
+ wxInputStream *LargeFileTest_wxFFile::MakeInStream(const wxString& name) const
+ {
+-    auto_ptr<wxFFileInputStream> in(new wxFFileInputStream(name));
++    wxScopedPtr<wxFFileInputStream> in(new wxFFileInputStream(name));
+     CPPUNIT_ASSERT(in->IsOk());
+     return in.release();
+ }
+diff --git a/wxWidgets-3.0.5.1/src/stc/scintilla/src/Editor.cxx.old b/wxWidgets-3.0.5.1/src/stc/scintilla/src/Editor.cxx
+index 2081df2..a8c8572 100644
+--- a/src/stc/scintilla/src/Editor.cxx
++++ b/src/stc/scintilla/src/Editor.cxx
+@@ -41,6 +41,7 @@
+ #include "Selection.h"
+ #include "PositionCache.h"
+ #include "Editor.h"
++#include "wx/scopedptr.h"
+ 
+ #ifdef SCI_NAMESPACE
+ using namespace Scintilla;
+@@ -5706,7 +5707,7 @@ long Editor::FindText(
+ 
+ 	Sci_TextToFind *ft = reinterpret_cast<Sci_TextToFind *>(lParam);
+ 	int lengthFound = istrlen(ft->lpstrText);
+-	std::auto_ptr<CaseFolder> pcf(CaseFolderForEncoding());
++	wxScopedPtr<CaseFolder> pcf(CaseFolderForEncoding());
+ 	int pos = pdoc->FindText(ft->chrg.cpMin, ft->chrg.cpMax, ft->lpstrText,
+ 	        (wParam & SCFIND_MATCHCASE) != 0,
+ 	        (wParam & SCFIND_WHOLEWORD) != 0,

diff --git a/x11-libs/wxGTK/wxGTK-3.0.5.1-r2.ebuild b/x11-libs/wxGTK/wxGTK-3.0.5.1-r2.ebuild
new file mode 100644
index 000000000000..832b85ae5e18
--- /dev/null
+++ b/x11-libs/wxGTK/wxGTK-3.0.5.1-r2.ebuild
@@ -0,0 +1,188 @@
+# 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 )
+
+	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
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-05-08 11:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-04 17:18 [gentoo-commits] repo/gentoo:master commit in: x11-libs/wxGTK/files/, x11-libs/wxGTK/ Mart Raudsepp
  -- strict thread matches above, loose matches on Subject: below --
2024-05-08 11:07 Sam James
2024-03-08 20:02 Sam James
2023-06-26 14:11 Sam James
2023-01-20 22:18 Arsen Arsenović
2023-01-20 22:18 Arsen Arsenović
2018-11-07 15:00 Mart Raudsepp
2016-06-17  1:03 Ryan Hill

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox