unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob 8e19bc86d69daf96ca95ef6685f77fa4d6e30d08 9310 bytes (raw)
name: gnu/packages/patches/openbox-python-3-compatibility.patch 	 # note: path name is non-authoritative(*)

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
 
Make Openbox compatible with Python 3.

Patch adapted from Gentoo:

https://gitweb.gentoo.org/repo/gentoo.git/patch/?id=31bad4f781f788ccf848500f8c17905ad32a2de9

Openbox seems to be abandoned upstream, with no activity in their Git repo since
2015:

http://openbox.org/develop-git.php

From 31bad4f781f788ccf848500f8c17905ad32a2de9 Mon Sep 17 00:00:00 2001
From: Hanno Böck <hanno@gentoo.org>
Date: Mon, 13 Jan 2020 17:22:27 +0100
Subject: x11-wm/openbox: Python 3 support.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Use EAPI 7.
Remove Python 2, change to python single package.

Closes: https://bugs.gentoo.org/696042
Signed-off-by: Hanno Böck <hanno@gentoo.org>
Package-Manager: Portage-2.3.84, Repoman-2.3.20
---
 x11-wm/openbox/files/openbox-3.6.1-py3-xdg.patch | 126 +++++++++++++++++++++++
 x11-wm/openbox/openbox-3.6.1-r2.ebuild           | 100 ++++++++++++++++++
 2 files changed, 226 insertions(+)
 create mode 100644 x11-wm/openbox/files/openbox-3.6.1-py3-xdg.patch
 create mode 100644 x11-wm/openbox/openbox-3.6.1-r2.ebuild

diff --git a/x11-wm/openbox/files/openbox-3.6.1-py3-xdg.patch b/x11-wm/openbox/files/openbox-3.6.1-py3-xdg.patch
new file mode 100644
index 00000000000..d28b536d64a
--- /dev/null
+++ b/x11-wm/openbox/files/openbox-3.6.1-py3-xdg.patch
@@ -0,0 +1,126 @@
+diff --git a/data/autostart/openbox-xdg-autostart b/data/autostart/openbox-xdg-autostart
+index 04a17a199..f2c75bbdd 100755
+--- a/data/autostart/openbox-xdg-autostart
++++ b/data/autostart/openbox-xdg-autostart
+@@ -19,6 +19,8 @@
+ #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ #   GNU General Public License for more details.
+ 
++from __future__ import print_function
++
+ ME="openbox-xdg-autostart"
+ VERSION="1.1"
+ 
+@@ -28,9 +30,9 @@ try:
+     from xdg.DesktopEntry import DesktopEntry
+     from xdg.Exceptions import ParsingError
+ except ImportError:
+-    print
+-    print >>sys.stderr, "ERROR:", ME, "requires PyXDG to be installed"
+-    print
++    print()
++    print("ERROR:", ME, "requires PyXDG to be installed", file=sys.stderr)
++    print()
+     sys.exit(1)
+ 
+ def main(argv=sys.argv):
+@@ -51,7 +53,7 @@ def main(argv=sys.argv):
+             try:
+                 autofile = AutostartFile(path)
+             except ParsingError:
+-                print "Invalid .desktop file: " + path
++                print("Invalid .desktop file: " + path)
+             else:
+                 if not autofile in files:
+                     files.append(autofile)
+@@ -99,9 +101,9 @@ class AutostartFile:
+ 
+     def _alert(self, str, info=False):
+         if info:
+-            print "\t ", str
++            print("\t ", str)
+         else:
+-            print "\t*", str
++            print("\t*", str)
+ 
+     def _showInEnvironment(self, envs, verbose=False):
+         default = not self.de.getOnlyShowIn()
+@@ -146,14 +148,14 @@ class AutostartFile:
+ 
+     def display(self, envs):
+         if self._shouldRun(envs):
+-            print "[*] " + self.de.getName()
++            print("[*] " + self.de.getName())
+         else:
+-            print "[ ] " + self.de.getName()
++            print("[ ] " + self.de.getName())
+         self._alert("File: " + self.path, info=True)
+         if self.de.getExec():
+             self._alert("Executes: " + self.de.getExec(), info=True)
+         self._shouldRun(envs, True)
+-        print
++        print()
+ 
+     def run(self, envs):
+         here = os.getcwd()
+@@ -165,34 +167,34 @@ class AutostartFile:
+         os.chdir(here)
+ 
+ def show_help():
+-    print "Usage:", ME, "[OPTION]... [ENVIRONMENT]..."
+-    print
+-    print "This tool will run xdg autostart .desktop files"
+-    print
+-    print "OPTIONS"
+-    print "  --list        Show a list of the files which would be run"
+-    print "                Files which would be run are marked with an asterix"
+-    print "                symbol [*].  For files which would not be run,"
+-    print "                information is given for why they are excluded"
+-    print "  --help        Show this help and exit"
+-    print "  --version     Show version and copyright information"
+-    print
+-    print "ENVIRONMENT specifies a list of environments for which to run autostart"
+-    print "applications.  If none are specified, only applications which do not "
+-    print "limit themselves to certain environments will be run."
+-    print
+-    print "ENVIRONMENT can be one or more of:"
+-    print "  GNOME         Gnome Desktop"
+-    print "  KDE           KDE Desktop"
+-    print "  ROX           ROX Desktop"
+-    print "  XFCE          XFCE Desktop"
+-    print "  Old           Legacy systems"
+-    print
++    print("Usage:", ME, "[OPTION]... [ENVIRONMENT]...")
++    print()
++    print("This tool will run xdg autostart .desktop files")
++    print()
++    print("OPTIONS")
++    print("  --list        Show a list of the files which would be run")
++    print("                Files which would be run are marked with an asterix")
++    print("                symbol [*].  For files which would not be run,")
++    print("                information is given for why they are excluded")
++    print("  --help        Show this help and exit")
++    print("  --version     Show version and copyright information")
++    print()
++    print("ENVIRONMENT specifies a list of environments for which to run autostart")
++    print("applications.  If none are specified, only applications which do not ")
++    print("limit themselves to certain environments will be run.")
++    print()
++    print("ENVIRONMENT can be one or more of:")
++    print("  GNOME         Gnome Desktop")
++    print("  KDE           KDE Desktop")
++    print("  ROX           ROX Desktop")
++    print("  XFCE          XFCE Desktop")
++    print("  Old           Legacy systems")
++    print()
+ 
+ def show_version():
+-    print ME, VERSION
+-    print "Copyright (c) 2008        Dana Jansens"
+-    print
++    print(ME, VERSION)
++    print("Copyright (c) 2008        Dana Jansens")
++    print()
+ 
+ if __name__ == "__main__":
+         sys.exit(main())
#diff --git a/x11-wm/openbox/openbox-3.6.1-r2.ebuild b/x11-wm/openbox/openbox-3.6.1-r2.ebuild
#new file mode 100644
#index 00000000000..80c67975b17
#--- /dev/null
#+++ b/x11-wm/openbox/openbox-3.6.1-r2.ebuild
#@@ -0,0 +1,100 @@
#+# Copyright 1999-2020 Gentoo Authors
#+# Distributed under the terms of the GNU General Public License v2
#+
#+EAPI=7
#+
#+PYTHON_COMPAT=( python3_{6,7,8} )
#+inherit multilib autotools python-single-r1 eutils
#+
#+DESCRIPTION="A standards compliant, fast, light-weight, extensible window manager"
#+HOMEPAGE="http://openbox.org/"
#+if [[ ${PV} == *9999* ]]; then
#+	inherit git-r3
#+	EGIT_REPO_URI="git://git.openbox.org/dana/openbox"
#+	SRC_URI="branding? (
#+	https://dev.gentoo.org/~hwoarang/distfiles/surreal-gentoo.tar.gz )"
#+else
#+	SRC_URI="http://openbox.org/dist/openbox/${P}.tar.gz
#+	branding? ( https://dev.gentoo.org/~hwoarang/distfiles/surreal-gentoo.tar.gz )"
#+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-linux"
#+fi
#+
#+LICENSE="GPL-2"
#+SLOT="3"
#+IUSE="branding debug imlib nls session startup-notification static-libs svg xdg"
#+REQUIRED_USE="xdg? ( ${PYTHON_REQUIRED_USE} )"
#+
#+RDEPEND="dev-libs/glib:2
#+	>=dev-libs/libxml2-2.0
#+	>=media-libs/fontconfig-2
#+	x11-libs/cairo
#+	x11-libs/libXau
#+	x11-libs/libXcursor
#+	x11-libs/libXext
#+	x11-libs/libXft
#+	x11-libs/libXinerama
#+	x11-libs/libXrandr
#+	x11-libs/libXt
#+	>=x11-libs/pango-1.8[X]
#+	imlib? ( media-libs/imlib2 )
#+	startup-notification? ( >=x11-libs/startup-notification-0.8 )
#+	svg? ( gnome-base/librsvg:2 )
#+	xdg? (
#+		${PYTHON_DEPS}
#+		dev-python/pyxdg[${PYTHON_USEDEP}]
#+	)
#+	"
#+DEPEND="${RDEPEND}
#+	sys-devel/gettext
#+	virtual/pkgconfig
#+	x11-base/xorg-proto"
#+
#+PATCHES=(
#+	"${FILESDIR}/${PN}-3.5.2-gnome-session.patch"
#+	# see https://github.com/danakj/openbox/pull/35
#+	"${FILESDIR}/${PN}-3.6.1-py3-xdg.patch"
#+)
#+
#+src_prepare() {
#+	default
#+	sed -i \
#+		-e "s:-O0 -ggdb ::" \
#+		-e 's/-fno-strict-aliasing//' \
#+		"${S}"/m4/openbox.m4 || die
#+	eautoreconf
#+}
#+
#+src_configure() {
#+	econf \
#+		--docdir="${EPREFIX}/usr/share/doc/${PF}" \
#+		$(use_enable debug) \
#+		$(use_enable static-libs static) \
#+		$(use_enable nls) \
#+		$(use_enable imlib imlib2) \
#+		$(use_enable svg librsvg) \
#+		$(use_enable startup-notification) \
#+		$(use_enable session session-management) \
#+		--with-x
#+}
#+
#+src_install() {
#+	dodir /etc/X11/Sessions
#+	echo "/usr/bin/openbox-session" > "${ED}/etc/X11/Sessions/${PN}"
#+	fperms a+x /etc/X11/Sessions/${PN}
#+	emake DESTDIR="${D}" install
#+	if use branding; then
#+		insinto /usr/share/themes
#+		doins -r "${WORKDIR}"/Surreal_Gentoo
#+		# make it the default theme
#+		sed -i \
#+			-e "/<theme>/{n; s@<name>.*</name>@<name>Surreal_Gentoo</name>@}" \
#+			"${D}"/etc/xdg/openbox/rc.xml \
#+			|| die "failed to set Surreal Gentoo as the default theme"
#+	fi
#+	use static-libs || find "${D}" -name '*.la' -delete
#+	if use xdg ; then
#+		python_fix_shebang "${ED}"/usr/libexec/openbox-xdg-autostart
#+	else
#+		rm "${ED}"/usr/libexec/openbox-xdg-autostart || die
#+	fi
#+}
#-- 
#cgit v1.2.3-18-g5258
#

debug log:

solving 8e19bc86d6 ...
found 8e19bc86d6 in https://yhetil.org/guix-patches/002d396c0ecfe47e1457a71842d53c95875f99cf.1642702165.git.leo@famulari.name/

applying [1/1] https://yhetil.org/guix-patches/002d396c0ecfe47e1457a71842d53c95875f99cf.1642702165.git.leo@famulari.name/
diff --git a/gnu/packages/patches/openbox-python-3-compatibility.patch b/gnu/packages/patches/openbox-python-3-compatibility.patch
new file mode 100644
index 0000000000..8e19bc86d6

1:52: trailing whitespace.
+ 
1:57: trailing whitespace.
+ 
1:69: trailing whitespace.
+ 
1:81: trailing whitespace.
+ 
1:89: trailing whitespace.
+ 
Checking patch gnu/packages/patches/openbox-python-3-compatibility.patch...
Applied patch gnu/packages/patches/openbox-python-3-compatibility.patch cleanly.
warning: squelched 6 whitespace errors
warning: 11 lines add whitespace errors.

index at:
100644 8e19bc86d69daf96ca95ef6685f77fa4d6e30d08	gnu/packages/patches/openbox-python-3-compatibility.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).