Source: gbrainy
Version: 1:2.3.4-1
Tags: patch

I am attaching 2 patches for you. One drops the obsolete menu and .xpm
files since Debian just uses .desktop files now.

The other allows gbrainy to drop its gtk2 dependencies by
cherry-picking a commit from git.

And they clean up a few things.

Thanks,
Jeremy Bicha
From 1699c615bf56050f852fc6e6cc74c7c619bbdaca Mon Sep 17 00:00:00 2001
From: Jeremy Bicha <jbi...@debian.org>
Date: Tue, 6 Mar 2018 08:52:43 -0500
Subject: [PATCH 1/2] Drop obsolete menu and .xpm

---
 debian/gbrainy.xpm | 172 -----------------------------------------------------
 debian/menu        |   2 -
 debian/rules       |  20 ++-----
 3 files changed, 4 insertions(+), 190 deletions(-)
 delete mode 100644 debian/gbrainy.xpm
 delete mode 100644 debian/menu

diff --git a/debian/gbrainy.xpm b/debian/gbrainy.xpm
deleted file mode 100644
index 9cd9008..0000000
--- a/debian/gbrainy.xpm
+++ /dev/null
@@ -1,172 +0,0 @@
-/* XPM */
-static char * gbrainy_xpm[] = {
-"32 32 137 2",
-"  	c None",
-". 	c #3895BD",
-"+ 	c #3994BC",
-"@ 	c #3995BD",
-"# 	c #3795BE",
-"$ 	c #3B97BE",
-"% 	c #459CC1",
-"& 	c #4B9FC3",
-"* 	c #80BBD5",
-"= 	c #ABD3E3",
-"- 	c #C6E1EC",
-"; 	c #B7D8E7",
-"> 	c #D4E8F1",
-", 	c #FFFFFF",
-"' 	c #F7FBFC",
-") 	c #E2F0F5",
-"! 	c #BADAE8",
-"~ 	c #8EC3D9",
-"{ 	c #4FA1C5",
-"] 	c #59A6C8",
-"^ 	c #FDFEFE",
-"/ 	c #F6FAFC",
-"( 	c #B1D5E5",
-"_ 	c #EAF4F8",
-": 	c #FEFFFF",
-"< 	c #CEE5EF",
-"[ 	c #74B5D1",
-"} 	c #A4CEE1",
-"| 	c #FCFDFE",
-"1 	c #96C7DC",
-"2 	c #D7EAF2",
-"3 	c #68AECD",
-"4 	c #4099C0",
-"5 	c #C8E2ED",
-"6 	c #94C6DC",
-"7 	c #A1CDE0",
-"8 	c #3A96BE",
-"9 	c #C4E0EC",
-"0 	c #D3E7F0",
-"a 	c #D3E8F1",
-"b 	c #BFDDEA",
-"c 	c #3D97BF",
-"d 	c #8BC1D8",
-"e 	c #EDF5F9",
-"f 	c #9ECBDF",
-"g 	c #B3D7E6",
-"h 	c #419AC0",
-"i 	c #F2F8FB",
-"j 	c #D2E7F0",
-"k 	c #BCDBE8",
-"l 	c #F3F9FB",
-"m 	c #68AFCD",
-"n 	c #88BFD7",
-"o 	c #E5F1F6",
-"p 	c #BCDBE9",
-"q 	c #EEF6F9",
-"r 	c #D6E9F1",
-"s 	c #B4D6E6",
-"t 	c #B4D7E6",
-"u 	c #B4D7E7",
-"v 	c #B7D9E7",
-"w 	c #F5FAFC",
-"x 	c #3E98BF",
-"y 	c #BDDCE9",
-"z 	c #E1EFF5",
-"A 	c #B1D6E5",
-"B 	c #93C5DB",
-"C 	c #C3DFEB",
-"D 	c #A9D1E2",
-"E 	c #7CB9D4",
-"F 	c #E8F3F7",
-"G 	c #B8D9E8",
-"H 	c #C8E2EC",
-"I 	c #9FCCDF",
-"J 	c #F1F8FA",
-"K 	c #AFD5E4",
-"L 	c #C2DEEB",
-"M 	c #A8D1E2",
-"N 	c #A9D1E3",
-"O 	c #83BDD5",
-"P 	c #DDEDF4",
-"Q 	c #EBF5F9",
-"R 	c #95C7DC",
-"S 	c #B3D6E6",
-"T 	c #C6E1ED",
-"U 	c #CDE4EE",
-"V 	c #52A3C6",
-"W 	c #FAFDFD",
-"X 	c #A3CFE0",
-"Y 	c #8CC2D9",
-"Z 	c #70B3D0",
-"` 	c #F4F9FB",
-" .	c #ACD3E3",
-"..	c #FBFDFE",
-"+.	c #84BDD6",
-"@.	c #4C9FC3",
-"#.	c #C8E1ED",
-"$.	c #CCE4EE",
-"%.	c #A4CFE1",
-"&.	c #EFF7FA",
-"*.	c #C5E1EC",
-"=.	c #C5E0EC",
-"-.	c #CBE3EE",
-";.	c #CDE4EF",
-">.	c #8CC1D9",
-",.	c #98C8DD",
-"'.	c #F3F8FB",
-").	c #5AA7C8",
-"!.	c #ACD3E4",
-"~.	c #82BCD6",
-"{.	c #86BFD7",
-"].	c #F8FBFD",
-"^.	c #B9DAE8",
-"/.	c #DDEDF3",
-"(.	c #95C6DC",
-"_.	c #499EC3",
-":.	c #8DC2D9",
-"<.	c #D5E9F1",
-"[.	c #C4DFEB",
-"}.	c #A6D0E1",
-"|.	c #84BDD7",
-"1.	c #7FBBD5",
-"2.	c #7AB8D3",
-"3.	c #EBF4F8",
-"4.	c #9AC9DE",
-"5.	c #FAFCFD",
-"6.	c #E3F0F6",
-"7.	c #56A5C7",
-"8.	c #61ABCA",
-"9.	c #EFF6FA",
-"0.	c #AAD2E3",
-"a.	c #3C97BE",
-"b.	c #4A9FC3",
-"c.	c #71B3D0",
-"d.	c #57A6C7",
-"e.	c #3894BD",
-"f.	c #3894BE",
-"  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . +   ",
-"@ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # ",
-". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
-". . . . . . . . . . . . . $ % $ . . . . . . . . . . . . . . . . ",
-". . . . . . . . . & * = - ; > , ' ) ! ~ { . . . . . . . . . . . ",
-". . . . . . . ] ! ^ , , , , / ( _ , , , : < [ @ . . . . . . . . ",
-". . . . . $ } | , , , , , , , , 1 , , , , , , 2 3 . . . . . . . ",
-". . . . 4 5 , , , , , , , , , , 6 , , , , , , , ^ 7 8 . . . . . ",
-". . . @ 9 , , , , , , , , , , 0 a , , , , , , , , , b c . . . . ",
-". . . d , , , , , , , , , , e f , , , , , , , , , , , g . . . . ",
-". . h i , , , , , , , , , j k , , , , , , , , , l ^ , , m . . . ",
-". . n , , , , , , , , , o p , , , , , q r s t - u v w : 1 x . . ",
-". . y , , , , , , , , , p z , , , , 2 A B ^ ^ q , , C D ' E . . ",
-". . o , , , , , , , , , F G , H I A z , J K L : , , , , , M . . ",
-". . _ , , , , , , , , : N O t P , , , , , , Q R , , , , , < . . ",
-". . S , , , , , , , , T / , , , , , , , , , , - U , , , , F . . ",
-". . V w , , , , , W X z , , , , , , , , , , , W Y , , , , l . . ",
-". . . Z ` , , , ,  .^ , , , , , , , , , , , , ..+., , , , W . . ",
-". . . . @.I #.$.%.&., , , , , , , , , , , , , 2 d *.=.-.;.=.. . ",
-". . . . . . . . >., , , , , , , , , , , , , , ,.'., , , - . . . ",
-". . . . . . . . ).^ , , , , , , , , , , , &.!.Q , , , , ~.. . . ",
-". . . . . . . . . {.]., , , , , , , ..< ^./., , , , , , (.. . . ",
-". . . . . . . . . . _.:.y <.2 [.}.|.1., , , , , , , , , 2.. . . ",
-". . . . . . . . . . . . . . . { 3., 4.5., , , , , , , ) x . . . ",
-". . . . . . . . . . . . . . . . =., 6.* / , , , , , z 7.. . . . ",
-". . . . . . . . . . . . . . . . 8.: , 9.:.B v ^.0.E a.. . . . . ",
-". . . . . . . . . . . . . . . . . Z 9., W b.. . . . . . . . . . ",
-". . . . . . . . . . . . . . . . . . [ , , N . . . . . . . . . . ",
-". . . . . . . . . . . . . . . . . . $ e , j $ . . . . . . . . . ",
-". . . . . . . . . . . . . . . . . . . c.d.. . . . . . . . . . . ",
-"# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . e.",
-"  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . f.  "};
diff --git a/debian/menu b/debian/menu
deleted file mode 100644
index 63a0f4e..0000000
--- a/debian/menu
+++ /dev/null
@@ -1,2 +0,0 @@
-?package(gbrainy): needs="X11" section="Games/Puzzles" title="gbrainy" \
- command="/usr/games/gbrainy" icon="/usr/share/pixmaps/gbrainy.xpm"
diff --git a/debian/rules b/debian/rules
index b5dbfed..d77a2bc 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,23 +3,11 @@
 %:
 	dh $@ --with=cli
 
+override_dh_auto_configure:
+	dh_auto_configure -- --bindir=/usr/games
+
 override_dh_auto_install:
 	dh_auto_install
-
-	# Create missing directories
-	mkdir -p $(CURDIR)/debian/gbrainy/usr/games/
-	mkdir -p $(CURDIR)/debian/gbrainy/usr/lib/gbrainy/
-	mkdir -p $(CURDIR)/debian/gbrainy/usr/share/pixmaps
-	
-	# Install missing stuff
-	cp $(CURDIR)/debian/gbrainy.xpm $(CURDIR)/debian/gbrainy/usr/share/pixmaps
-	
-	# Move files from wrong locations
-	mv $(CURDIR)/debian/gbrainy/usr/bin/gbrainy $(CURDIR)/debian/gbrainy/usr/games/gbrainy
-	
 	# Remove stuff that we don't want
-	rm -f $(CURDIR)/debian/gbrainy/usr/share/pixmaps/gbrainy.png
-	rm -f $(CURDIR)/debian/gbrainy/usr/share/pixmaps/gbrainy16.png
-	rm -f $(CURDIR)/debian/gbrainy/usr/share/pixmaps/gbrainy.svg
+	rm -rf $(CURDIR)/debian/gbrainy/usr/share/pixmaps
 	rm -rf $(CURDIR)/debian/gbrainy/usr/lib/pkgconfig
-	rmdir $(CURDIR)/debian/gbrainy/usr/bin/
-- 
2.15.1

From 432b6f49f8014719de4e9b58553d489061d670ff Mon Sep 17 00:00:00 2001
From: Jeremy Bicha <jbi...@debian.org>
Date: Tue, 6 Mar 2018 08:54:35 -0500
Subject: [PATCH 2/2] Cherry-pick update-references-to-gtk3.patch

Drop obsolete gtk2 dependencies and clean up a few others we don't need
---
 debian/control                                 |  4 ---
 debian/patches/series                          |  1 +
 debian/patches/update-references-to-gtk3.patch | 45 ++++++++++++++++++++++++++
 3 files changed, 46 insertions(+), 4 deletions(-)
 create mode 100644 debian/patches/series
 create mode 100644 debian/patches/update-references-to-gtk3.patch

diff --git a/debian/control b/debian/control
index 1ed1856..3c9fb03 100644
--- a/debian/control
+++ b/debian/control
@@ -14,11 +14,7 @@ Build-Depends: debhelper (>= 8),
  libcanberra-gtk3-0,
  libgtk3.0-cil-dev,
  librsvg2-dev,
- libmono-addins-cil-dev (>= 0.3),
- libmono-addins-gui-cil-dev (>= 0.3),
- mono-devel (>= 3~),
  gnome-doc-utils,
- mono-csharp-shell
 Standards-Version: 3.9.7
 
 Package: gbrainy
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..e038418
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+update-references-to-gtk3.patch
diff --git a/debian/patches/update-references-to-gtk3.patch b/debian/patches/update-references-to-gtk3.patch
new file mode 100644
index 0000000..1bb5ea4
--- /dev/null
+++ b/debian/patches/update-references-to-gtk3.patch
@@ -0,0 +1,45 @@
+From: Jordi Mas <j...@softcatala.org>
+Date: Tue, 6 Mar 2018 07:18:46 +0100
+Subject: Fixes #792982. Update library references to gtk3
+
+---
+ src/Clients/Classical/gbrainy.exe.config.in | 2 +-
+ src/Core/Platform/Unix.cs                   | 2 +-
+ src/Core/gbrainy.Core.dll.config.in         | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/Clients/Classical/gbrainy.exe.config.in b/src/Clients/Classical/gbrainy.exe.config.in
+index 1d1b3ad..e766b70 100644
+--- a/src/Clients/Classical/gbrainy.exe.config.in
++++ b/src/Clients/Classical/gbrainy.exe.config.in
+@@ -1,4 +1,4 @@
+ <configuration>
+-	<dllmap dll="libgtk-win32-2.0-0.dll" target="libgtk-x11-2.0.so.0"/>
++	<dllmap dll="libgtk-3-0.dll" target="libgtk-3.so.0"/>
+ </configuration>
+ 
+diff --git a/src/Core/Platform/Unix.cs b/src/Core/Platform/Unix.cs
+index 3477ced..562e2ff 100644
+--- a/src/Core/Platform/Unix.cs
++++ b/src/Core/Platform/Unix.cs
+@@ -37,7 +37,7 @@ namespace gbrainy.Core.Platform
+ 		[DllImport ("libc")] // BSD
+ 		static extern void setproctitle (byte [] fmt, byte [] str_arg);
+ 
+-		[DllImport("libgtk-win32-2.0-0.dll")]
++		[DllImport("libgtk-3-0.dll")]
+ 		static extern unsafe bool gtk_show_uri(IntPtr screen, IntPtr uri, uint timestamp, out IntPtr error);
+ 
+ 		[DllImport ("libcanberra-gtk3.so.0")]
+diff --git a/src/Core/gbrainy.Core.dll.config.in b/src/Core/gbrainy.Core.dll.config.in
+index 3d17999..de1965c 100644
+--- a/src/Core/gbrainy.Core.dll.config.in
++++ b/src/Core/gbrainy.Core.dll.config.in
+@@ -1,5 +1,5 @@
+ <configuration>
+ 	<dllmap dll="rsvg-2" target="librsvg-2.so.2"/>
+-	<dllmap dll="libgtk-win32-2.0-0.dll" target="libgtk-x11-2.0.so.0"/>
++	<dllmap dll="libgtk-3-0.dll" target="libgtk-3.so.0"/>
+ </configuration>
+ 
+
-- 
2.15.1

Reply via email to