Bug#1019841: amule: Please transition to wxwidgets3.2

2023-01-08 Thread Olly Betts
Control: tags 1019841 + patch

> tags 1019841 - patch
> # there are no traces of a patch here

I added the patch tag because Scott's most recent comment linked to
patch in a github PR.

Anyway, I've taken that patch, simplified it a bit (since we only need
to support wx3.2 here and it's easier to inspect the patch without all
the version conditionalisation), and also made it suppress wxSizerFlags
runtime checks - the patch in the PR had fixes for some instances, but
I still managed to trigger one and it seems best for our purposes to
just suppress them (which restores the situation to how it is when
built with wx3.0).

I've attached nmudiff output.

I've only tested with with networking disabled - it ideally
needs a test from someone who actually uses the package.

Cheers,
Olly
diff -Nru amule-2.3.3/debian/changelog amule-2.3.3/debian/changelog
--- amule-2.3.3/debian/changelog	2021-10-01 16:26:49.0 +1300
+++ amule-2.3.3/debian/changelog	2023-01-09 13:00:46.0 +1300
@@ -1,3 +1,10 @@
+amule (1:2.3.3-2.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Update to use wxwidgets3.2 - new patch wx3.2.patch; Closes: #1019841
+
+ -- Olly Betts   Mon, 09 Jan 2023 13:00:46 +1300
+
 amule (1:2.3.3-2) unstable; urgency=medium
 
   * rebuild to pick up libcrypto++8; Closes: #995282, #995285
diff -Nru amule-2.3.3/debian/control amule-2.3.3/debian/control
--- amule-2.3.3/debian/control	2021-10-01 16:26:49.0 +1300
+++ amule-2.3.3/debian/control	2023-01-09 08:59:01.0 +1300
@@ -16,8 +16,8 @@
libpng-dev,
libreadline-dev,
libupnp-dev (>= 1:1.6.24-4~),
-   libwxgtk3.0-gtk3-dev,
-   wx3.0-i18n,
+   libwxgtk3.2-dev,
+   wx3.2-i18n,
zlib1g-dev,
 Standards-Version: 4.5.1
 Homepage: http://www.amule.org
diff -Nru amule-2.3.3/debian/patches/series amule-2.3.3/debian/patches/series
--- amule-2.3.3/debian/patches/series	2021-10-01 16:26:49.0 +1300
+++ amule-2.3.3/debian/patches/series	2023-01-09 09:02:35.0 +1300
@@ -2,3 +2,4 @@
 use_xdg-open_as_preview_default.diff
 version_check.diff
 #libupnp1.8.patch
+wx3.2.patch
diff -Nru amule-2.3.3/debian/patches/wx3.2.patch amule-2.3.3/debian/patches/wx3.2.patch
--- amule-2.3.3/debian/patches/wx3.2.patch	1970-01-01 12:00:00.0 +1200
+++ amule-2.3.3/debian/patches/wx3.2.patch	2023-01-09 13:00:46.0 +1300
@@ -0,0 +1,461 @@
+Description: Fixes for wxWidgets 3.2 compatibility
+ Largely based on patch from Mr Hyde  in
+ https://github.com/amule-project/amule/pull/168
+Author: Olly Betts 
+Bug: https://github.com/amule-project/amule/issues/340
+Bug-Debian: https://bugs.debian.org/1019841
+Forwarded: no
+Last-Update: 2023-01-09
+
+--- a/src/ColorFrameCtrl.cpp
 b/src/ColorFrameCtrl.cpp
+@@ -61,7 +61,7 @@
+ /
+ void CColorFrameCtrl::SetFrameBrushColour(const wxColour& colour)
+ {
+-	m_brushFrame = *(wxTheBrushList->FindOrCreateBrush(colour, wxSOLID));
++	m_brushFrame = *(wxTheBrushList->FindOrCreateBrush(colour, wxBRUSHSTYLE_SOLID));
+ 
+ 	Refresh(FALSE);
+ }  // SetFrameColor
+@@ -70,7 +70,7 @@
+ /
+ void CColorFrameCtrl::SetBackgroundBrushColour(const wxColour& colour)
+ {
+-	m_brushBack = *(wxTheBrushList->FindOrCreateBrush(colour, wxSOLID));
++	m_brushBack = *(wxTheBrushList->FindOrCreateBrush(colour, wxBRUSHSTYLE_SOLID));
+ 
+ 	// clear out the existing garbage, re-start with a clean plot
+ 	Refresh(FALSE);
+--- a/src/DownloadListCtrl.cpp
 b/src/DownloadListCtrl.cpp
+@@ -850,7 +850,7 @@
+ 		dc->SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT));
+ 		dc->SetPen( colour.Blend(65).GetPen() );
+ 	} else {
+-		dc->SetBackground(*(wxTheBrushList->FindOrCreateBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOX), wxSOLID)));
++		dc->SetBackground(*(wxTheBrushList->FindOrCreateBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOX), wxBRUSHSTYLE_SOLID)));
+ 		dc->SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));
+ 		dc->SetPen(*wxTRANSPARENT_PEN);
+ 	}
+@@ -1413,7 +1413,7 @@
+ 		dc->DrawLine( rect.x, rect.y + 2, rect.x + width, rect.y + 2 );
+ 
+ 		// Draw the green line
+-		dc->SetPen( *(wxThePenList->FindOrCreatePen( crProgress , 1, wxSOLID ) ));
++		dc->SetPen( *(wxThePenList->FindOrCreatePen( crProgress , 1, wxPENSTYLE_SOLID ) ));
+ 		dc->DrawLine( rect.x, rect.y + 1, rect.x + width, rect.y + 1 );
+ 	}
+ }
+--- a/src/GenericClientListCtrl.cpp
 b/src/GenericClientListCtrl.cpp
+@@ -660,7 +660,7 @@
+ 		dc->SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT));
+ 		dc->SetPen( colour.Blend(65).GetPen() );
+ 	} else {
+-		dc->SetBackground(*(wxTheBrushList->FindOrCreateBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOX), wxSOLID)));
++		

Bug#1019841: amule: Please transition to wxwidgets3.2

2022-09-14 Thread Scott Talbert

On Wed, 14 Sep 2022, Sandro Tosi wrote:


control: forwarded -1 https://github.com/amule-project/amule/issues/340

Hello Scott,


For most packages, the transition should be as simple as changing
Build-Depends from libwxgtk3.0-gtk3-dev to libwxgtk3.2-dev. Some
packages may require small patches; I'm happy to help with those (and
I have some already from working on this transition in Fedora
already).


it looks like an attempt was made in fedora to build amule with 3.2
and quickly reverted (i dont know the details, just what's in the git
repo), see the links in the gh issue (which i think you may want to
subscribe to, if you have a user on gh).

would you be able to have a look at amule and wxwidgets3.2 compatibility?


It seems amule isn't in Fedora proper - it's in RPMFusion, which is why I 
didn't see it in my repoquery.


I seem to recall amule is some sort of P2P client, which I'd rather not 
try to connect to.  Can you try the changes in this pull request?  A few 
users seem to report success with those.


https://github.com/amule-project/amule/pull/168

Thanks,
Scott