commit:     acb72ed900e053abb2ee32d30439d3c8aca98614
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 24 12:47:28 2023 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Fri Nov 24 12:55:07 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=acb72ed9

dev-perl/Wx: Port to wxGTK 3.2

Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>

 dev-perl/Wx/Manifest                               |   1 +
 dev-perl/Wx/Wx-0.993.200-r3.ebuild                 |  63 +++++++++++
 dev-perl/Wx/files/Wx-0.993.200-gtk3.patch          |  29 +++++
 .../Wx/files/Wx-0.993.200-wx32-makemaker.patch     | 124 +++++++++++++++++++++
 4 files changed, 217 insertions(+)

diff --git a/dev-perl/Wx/Manifest b/dev-perl/Wx/Manifest
index 3d7b2b306854..fcbed98a7731 100644
--- a/dev-perl/Wx/Manifest
+++ b/dev-perl/Wx/Manifest
@@ -1 +1,2 @@
+DIST Wx-0.993.200-wx32-port.patch 40231 BLAKE2B 
bd0ab52037e900ec749b9a1243eadfba19338412e1e48289a38cf64b78b9b38e39a5b6d5580b54266c02080339b4c52928cad7999b324dec0d5346823b459ce9
 SHA512 
9e0bf4ae46ceaf5e30c0c8700fe98afe4313df6b8d30a592bf2e1a9d59c07ba7bbdb1bbc952a5272319ac2492ce6e4f3346ce077de2b69fbab572199177328ef
 DIST Wx-0.9932.tar.gz 486326 BLAKE2B 
54509a108b131973aa3c14fc895893248ddfe2807c0117a7fd56b710e79fbac257dadacb6aa39a0463447b16aa909bb2faed1a437024389afeb2b00c63562a8c
 SHA512 
49f9a32bcd65ad4f2017f322e45ddaad741cdc0f0245489425771dda917553c354945fa949521c18730d27e78444a79d0d56374d462bcd92a96c0e76a4471c0e

diff --git a/dev-perl/Wx/Wx-0.993.200-r3.ebuild 
b/dev-perl/Wx/Wx-0.993.200-r3.ebuild
new file mode 100644
index 000000000000..5cd0d3e5b5b8
--- /dev/null
+++ b/dev-perl/Wx/Wx-0.993.200-r3.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+WX_GTK_VER="3.2-gtk3"
+DIST_AUTHOR=MDOOTSON
+DIST_VERSION=0.9932
+DIST_EXAMPLES=("samples/*")
+inherit wxwidgets virtualx perl-module
+
+DESCRIPTION="Perl bindings for wxGTK"
+HOMEPAGE="https://wxperl.sourceforge.net/ https://metacpan.org/release/Wx";
+SRC_URI="${SRC_URI}
+       https://dev.gentoo.org/~pacho/${PN}/${P}-wx32-port.patch";
+
+SLOT="0"
+KEYWORDS="~amd64 ~riscv ~x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+       >=dev-perl/Alien-wxWidgets-0.690.0-r1
+       x11-libs/wxGTK:${WX_GTK_VER}
+       >=virtual/perl-File-Spec-0.820.0
+"
+DEPEND="${RDEPEND}
+       >=virtual/perl-ExtUtils-MakeMaker-6.480.0
+       >=virtual/perl-ExtUtils-ParseXS-3.150.0
+       >=dev-perl/ExtUtils-XSpp-0.160.200
+       >=virtual/perl-if-0.30.0
+       test? (
+               >=virtual/perl-Test-Harness-2.260.0
+               >=virtual/perl-Test-Simple-0.430.0
+       )
+"
+BDEPEND="${DEPEND}
+       app-text/dos2unix
+"
+
+PATCHES=(
+       # wxGTK-3.2 port from Fedora
+       "${FILESDIR}"/${P}-gtk3.patch
+       "${FILESDIR}"/${P}-wx32-makemaker.patch
+       "${DISTDIR}"/${P}-wx32-port.patch
+)
+
+src_prepare() {
+       # Fix line endings
+       dos2unix MANIFEST || die
+       dos2unix typemap || die
+
+       setup-wxwidgets
+       perl-module_src_prepare
+}
+
+src_test() {
+       # the webview/t/03_threads.t test tends to hang or crash in weird
+       # ways depending on local configuration. eg, backtraces involving
+       # all of webkit-gtk, kpartsplugin and kdelibs...
+       perl_rm_files t/12_pod.t ext/webview/t/03_threads.t
+       virtx perl-module_src_test
+}

diff --git a/dev-perl/Wx/files/Wx-0.993.200-gtk3.patch 
b/dev-perl/Wx/files/Wx-0.993.200-gtk3.patch
new file mode 100644
index 000000000000..7d385bd6a61b
--- /dev/null
+++ b/dev-perl/Wx/files/Wx-0.993.200-gtk3.patch
@@ -0,0 +1,29 @@
+Description: Fixes for GTK3 compatibility
+ wxWidgets 3.0 built with GTK3 doesn't have wxColour::GetPixel(), see:
+ http://trac.wxwidgets.org/ticket/15141#comment:2
+Author: Olly Betts <o...@survex.com>
+Forwarded: no
+Last-Update: 2018-04-01
+
+--- a/XS/Colour.xs
++++ b/XS/Colour.xs
+@@ -114,7 +114,7 @@
+ 
+ #endif
+ 
+-#if !defined(__WXMAC__)
++#if !defined(__WXMAC__) && !defined (__WXGTK3__)
+ 
+ long
+ wxColour::GetPixel()
+--- a/ext/propgrid/XS/PGProperty.xsp
++++ b/ext/propgrid/XS/PGProperty.xsp
+@@ -1148,7 +1148,7 @@
+     bool SetPlValue( wxColour* col, int flags = wxPG_SETVAL_REFRESH_EDITOR )
+       %code{%
+             if( col->IsOk() ) {
+-                wxVariant value = wxVariant(*col);
++                wxVariant value = wxVariant(wxAny(*col));
+                 THIS->SetValue(value, NULL, flags );
+                 RETVAL = true;
+             } else {

diff --git a/dev-perl/Wx/files/Wx-0.993.200-wx32-makemaker.patch 
b/dev-perl/Wx/files/Wx-0.993.200-wx32-makemaker.patch
new file mode 100644
index 000000000000..ef827e6381c1
--- /dev/null
+++ b/dev-perl/Wx/files/Wx-0.993.200-wx32-makemaker.patch
@@ -0,0 +1,124 @@
+Description: remove reference to adv lib
+ The build fails with
+   No such 'link' library: 'adv' at 
/build/libwx-perl-0.9932/build/Wx/build/MakeMaker.pm line 212.
+ And 
https://raw.githubusercontent.com/wxWidgets/wxWidgets/v3.2.0/docs/changes.txt 
says for 3.1.2
+   - wxAdvanced library was merged into wxCore, simply remove all references
+    to "adv" from your build system, it is not needed any longer.
+Origin: vendor
+Author: gregor herrmann <gre...@debian.org>
+Last-Update: 2022-09-15
+
+--- a/Makefile.PL
++++ b/Makefile.PL
+@@ -86,7 +86,7 @@
+     PMLIBDIRS         => [ 'lib', 'build' ],
+     EXE_FILES         => [ qw(script/wxperl_overload) ],
+     WX_CORE_LIB_MAYBE => $^O eq 'darwin' ? 'media html' : '',
+-    WX_CORE_LIB       => 'adv core base',
++    WX_CORE_LIB       => 'core base',
+     WX_OVERLOAD       => { header  => 'cpp/ovl_const.h',
+                            source  => 'cpp/ovl_const.cpp',
+                          },
+--- a/build/Wx/build/MakeMaker.pm
++++ b/build/Wx/build/MakeMaker.pm
+@@ -48,7 +48,7 @@
+   WX_CORE_LIB => 'xrc core base'
+ 
+ link libraries from wxWidgets' core or contrib directory.
+-If not spedified, defaults to 'adv html core net base' for compatibility.
++If not spedified, defaults to 'html core net base' for compatibility.
+ 
+ =item * WX_LIB
+ 
+@@ -362,7 +362,7 @@
+ 
+   $args{CCFLAGS} .= $options{extra_cflags} ? ' ' . $options{extra_cflags} : 
'';
+   $args{LIBS} .=  $options{extra_libs} ? ' ' . $options{extra_libs} : '';
+-  $args{WX_CORE_LIB} ||= 'adv html core net base';
++  $args{WX_CORE_LIB} ||= 'html core net base';
+ 
+   foreach ( keys %args ) {
+     my $v = $args{$_};
+--- a/ext/aui/Makefile.PL
++++ b/ext/aui/Makefile.PL
+@@ -19,5 +19,5 @@
+ wxWriteMakefile( NAME         => 'Wx::AUI',
+                  VERSION_FROM => 'lib/Wx/AUI.pm',
+                  REQUIRE_WX   => 2.007002,
+-                 WX_CORE_LIB  => 'aui adv core base',
++                 WX_CORE_LIB  => 'aui core base',
+                  );
+--- a/ext/calendar/Makefile.PL
++++ b/ext/calendar/Makefile.PL
+@@ -18,7 +18,7 @@
+ 
+ wxWriteMakefile( NAME         => 'Wx::Calendar',
+                  VERSION_FROM => 'Calendar.pm',
+-                 WX_CORE_LIB  => 'adv core base',
++                 WX_CORE_LIB  => 'core base',
+                  );
+ 
+ # local variables:
+--- a/ext/dataview/Makefile.PL
++++ b/ext/dataview/Makefile.PL
+@@ -19,5 +19,5 @@
+ wxWriteMakefile( NAME         => 'Wx::DataView',
+                  VERSION_FROM => 'DataView.pm',
+                  REQUIRE_WX   => 2.009000,
+-                 WX_CORE_LIB  => 'adv core base',
++                 WX_CORE_LIB  => 'core base',
+                  );
+--- a/ext/grid/Makefile.PL
++++ b/ext/grid/Makefile.PL
+@@ -16,7 +16,7 @@
+ 
+ wxWriteMakefile( NAME         => 'Wx::Grid',
+                  VERSION_FROM => 'lib/Wx/Grid.pm',
+-                 WX_CORE_LIB  => 'adv core base',
++                 WX_CORE_LIB  => 'core base',
+                  );
+ 
+ # local variables:
+--- a/ext/propgrid/Makefile.PL
++++ b/ext/propgrid/Makefile.PL
+@@ -19,7 +19,7 @@
+ wxWriteMakefile( NAME         => 'Wx::PropertyGrid',
+                  VERSION_FROM => 'lib/Wx/PropertyGrid.pm',
+                  REQUIRE_WX   => 2.009003,
+-                 WX_CORE_LIB  => 'propgrid adv core base',
++                 WX_CORE_LIB  => 'propgrid core base',
+                  REQUIRE_WX_LIB  => 'propgrid',
+                  NO_WX_PLATFORMS => [ ],
+                );
+\ No newline at end of file
+--- a/ext/ribbon/Makefile.PL
++++ b/ext/ribbon/Makefile.PL
+@@ -19,7 +19,7 @@
+ wxWriteMakefile( NAME         => 'Wx::Ribbon',
+                  VERSION_FROM => 'lib/Wx/Ribbon.pm',
+                  REQUIRE_WX   => 2.009003,
+-                 WX_CORE_LIB  => 'ribbon adv core base',
++                 WX_CORE_LIB  => 'ribbon core base',
+                  REQUIRE_WX_LIB  => 'ribbon',
+                  NO_WX_PLATFORMS => [ ],
+                  );
+--- a/ext/richtext/Makefile.PL
++++ b/ext/richtext/Makefile.PL
+@@ -19,5 +19,5 @@
+ wxWriteMakefile( NAME         => 'Wx::RichText',
+                  VERSION_FROM => 'lib/Wx/RichText.pm',
+                  REQUIRE_WX   => 2.007000,
+-                 WX_CORE_LIB  => 'richtext html xml adv core base',
++                 WX_CORE_LIB  => 'richtext html xml core base',
+                  );
+--- a/ext/xrc/Makefile.PL
++++ b/ext/xrc/Makefile.PL
+@@ -16,7 +16,7 @@
+ 
+ wxWriteMakefile( NAME            => 'Wx::XRC',
+                  VERSION_FROM    => 'lib/Wx/XRC.pm',
+-                 WX_CORE_LIB     => 'xrc xml html adv core base',
++                 WX_CORE_LIB     => 'xrc xml html core base',
+                  );
+ 
+ # local variables:

Reply via email to