Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: gnome-extra/cinnamon-screensaver/, gnome-extra/cinnamon-screensaver/files/
Date: Wed, 09 Sep 2020 02:15:56
Message-Id: 1599617700.595bf917931b90247bfb191800275de6b7480ebf.sam@gentoo
1 commit: 595bf917931b90247bfb191800275de6b7480ebf
2 Author: Matthew S. Turnbull <sparky <AT> bluefang-logic <DOT> com>
3 AuthorDate: Wed Jul 29 16:05:00 2020 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Wed Sep 9 02:15:00 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=595bf917
7
8 gnome-extra/cinnamon-screensaver: 4.6.0 version bump
9
10 Switch to EAPI=7/meson. Include temp patchs, to fix python
11 install and builds with xinerama disabled, both of which have
12 been committed upstream but are currently unreleased.
13
14 Bug: https://bugs.gentoo.org/733544
15 Package-Manager: Portage-3.0.4, Repoman-2.3.23
16 Signed-off-by: Matthew S. Turnbull <sparky <AT> bluefang-logic.com>
17 Signed-off-by: Sam James <sam <AT> gentoo.org>
18
19 gnome-extra/cinnamon-screensaver/Manifest | 1 +
20 .../cinnamon-screensaver-4.6.0.ebuild | 76 +++++++++++++++++++++
21 .../cinnamon-screensaver-4.6.0-python-build.patch | 77 ++++++++++++++++++++++
22 .../cinnamon-screensaver-4.6.0-xinerama.patch | 49 ++++++++++++++
23 4 files changed, 203 insertions(+)
24
25 diff --git a/gnome-extra/cinnamon-screensaver/Manifest b/gnome-extra/cinnamon-screensaver/Manifest
26 index c77ec27b17f..cff09de74a1 100644
27 --- a/gnome-extra/cinnamon-screensaver/Manifest
28 +++ b/gnome-extra/cinnamon-screensaver/Manifest
29 @@ -1 +1,2 @@
30 DIST cinnamon-screensaver-4.4.1.tar.gz 160214 BLAKE2B df19a370c76648e0717565a3aab4785c3d8b48b20b9d87cc5426506f196db72872642d0ed1109a40986311c0ad7a5c17fbdcfc69681083afd3884c04822c6afa SHA512 92050febcfd41ad03b277cef60b95080d56b8fd985d064e9420a3357d7d0475355a4ca55965e581ae45410df8f19f3c031f6df0e3eec5b6b78aee7141d0244f7
31 +DIST cinnamon-screensaver-4.6.0.tar.gz 141043 BLAKE2B ba9f1e02fb7567d269daa4eccdb39d2c73dd6ac6bd3a3a4e00e1bcec685b48394fc9247d5006f908091291748e013ae65cf7718a972ef67ed7fd11a226789d6d SHA512 c83a057ff12a22445a155d4f91a45638d922c9b2180a7655f1e34bfd8ddcd31ed901b5b038236fa0e06c6f7986547c34ee8ab61cd216b5bc75f1c202b545c28f
32
33 diff --git a/gnome-extra/cinnamon-screensaver/cinnamon-screensaver-4.6.0.ebuild b/gnome-extra/cinnamon-screensaver/cinnamon-screensaver-4.6.0.ebuild
34 new file mode 100644
35 index 00000000000..b06476c95bd
36 --- /dev/null
37 +++ b/gnome-extra/cinnamon-screensaver/cinnamon-screensaver-4.6.0.ebuild
38 @@ -0,0 +1,76 @@
39 +# Copyright 1999-2020 Gentoo Authors
40 +# Distributed under the terms of the GNU General Public License v2
41 +
42 +EAPI=7
43 +PYTHON_COMPAT=( python3_{6,7,8} )
44 +
45 +inherit meson python-single-r1 xdg
46 +
47 +DESCRIPTION="Screensaver for Cinnamon"
48 +HOMEPAGE="https://projects.linuxmint.com/cinnamon/"
49 +SRC_URI="https://github.com/linuxmint/cinnamon-screensaver/archive/${PV}.tar.gz -> ${P}.tar.gz"
50 +
51 +LICENSE="GPL-2+"
52 +SLOT="0"
53 +IUSE="systemd xinerama"
54 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
55 +KEYWORDS="~amd64 ~x86"
56 +
57 +COMMON_DEPEND="
58 + >=dev-libs/glib-2.37.3:2[dbus]
59 + >=x11-libs/gtk+-3.22:3[introspection]
60 + >=gnome-extra/cinnamon-desktop-4.6:0=
61 + >=dev-libs/dbus-glib-0.78
62 +
63 + sys-apps/dbus
64 + sys-libs/pam
65 + x11-libs/libX11
66 + x11-libs/libXext
67 + x11-libs/libXrandr
68 + x11-themes/adwaita-icon-theme
69 +
70 + ${PYTHON_DEPS}
71 +
72 + xinerama? ( x11-libs/libXinerama )
73 +"
74 +RDEPEND="${COMMON_DEPEND}
75 + $(python_gen_cond_dep '
76 + dev-python/pygobject:3[${PYTHON_USEDEP}]
77 + dev-python/setproctitle[${PYTHON_USEDEP}]
78 + dev-python/xapp[${PYTHON_USEDEP}]
79 + dev-python/psutil[${PYTHON_USEDEP}]
80 + ')
81 + systemd? ( >=sys-apps/systemd-31 )
82 + !systemd? ( sys-auth/elogind )
83 +"
84 +DEPEND="${COMMON_DEPEND}
85 + x11-base/xorg-proto
86 +"
87 +BDEPEND="
88 + dev-util/gdbus-codegen
89 + >=dev-util/intltool-0.40
90 + sys-devel/gettext
91 + virtual/pkgconfig
92 +"
93 +
94 +PATCHES=(
95 + "${FILESDIR}"/${PN}-4.6.0-python-build.patch
96 + "${FILESDIR}"/${PN}-4.6.0-xinerama.patch
97 +)
98 +
99 +src_prepare() {
100 + xdg_src_prepare
101 + python_fix_shebang src
102 +}
103 +
104 +src_configure() {
105 + local emesonargs=(
106 + $(meson_use xinerama)
107 + )
108 + meson_src_configure
109 +}
110 +
111 +src_install() {
112 + meson_src_install
113 + python_optimize "${ED}"/usr/share/cinnamon-screensaver/
114 +}
115
116 diff --git a/gnome-extra/cinnamon-screensaver/files/cinnamon-screensaver-4.6.0-python-build.patch b/gnome-extra/cinnamon-screensaver/files/cinnamon-screensaver-4.6.0-python-build.patch
117 new file mode 100644
118 index 00000000000..1e43396257f
119 --- /dev/null
120 +++ b/gnome-extra/cinnamon-screensaver/files/cinnamon-screensaver-4.6.0-python-build.patch
121 @@ -0,0 +1,77 @@
122 +From f838b2ab03af0285043d980feba9d52d96d66164 Mon Sep 17 00:00:00 2001
123 +From: Michael Webster <miketwebster@×××××.com>
124 +Date: Fri, 15 May 2020 08:34:40 -0400
125 +Subject: [PATCH] Build: Only generate python bytecode during builds with no
126 + temporary install folder. Package managers should handle this otherwise.
127 +
128 +This eliminates a lot of warnings during the packaging portion of
129 +the deb build.
130 +---
131 + install-scripts/meson.build | 16 ++++++++++++++++
132 + install-scripts/meson_compile_python.py | 10 ++++++++++
133 + meson.build | 1 +
134 + src/meson.build | 2 --
135 + 4 files changed, 27 insertions(+), 2 deletions(-)
136 + create mode 100644 install-scripts/meson.build
137 + create mode 100644 install-scripts/meson_compile_python.py
138 +
139 +diff --git a/install-scripts/meson.build b/install-scripts/meson.build
140 +new file mode 100644
141 +index 0000000..667d669
142 +--- /dev/null
143 ++++ b/install-scripts/meson.build
144 +@@ -0,0 +1,16 @@
145 ++# These scripts run as post-installation scripts.
146 ++
147 ++# They're designed to do nothing if DESTDIR is set, which happens
148 ++# during debian builds for instance - there's a fake install target
149 ++# so running these would be pointless.
150 ++
151 ++# When using deb packaging, these aren't needed, as these operations
152 ++# are run automatically by the package manager.
153 ++
154 ++# They're really only necessary in straight builds where 'ninja install'
155 ++# will be run directly, to install the program onto the system.
156 ++
157 ++
158 ++# Generate python bytecode
159 ++meson.add_install_script('meson_compile_python.py')
160 ++
161 +diff --git a/install-scripts/meson_compile_python.py b/install-scripts/meson_compile_python.py
162 +new file mode 100644
163 +index 0000000..9ec0f4d
164 +--- /dev/null
165 ++++ b/install-scripts/meson_compile_python.py
166 +@@ -0,0 +1,10 @@
167 ++#!/usr/bin/python3
168 ++
169 ++import os
170 ++import subprocess
171 ++
172 ++pythondir = os.path.join(os.environ['MESON_INSTALL_PREFIX'], 'share', 'cinnamon-screensaver')
173 ++
174 ++if not os.environ.get('DESTDIR'):
175 ++ print('Generating python bytecode...')
176 ++ subprocess.call(['sh', '-c', 'python3 -m compileall "%s"' % pythondir])
177 +diff --git a/meson.build b/meson.build
178 +index c508770..d7dcd31 100644
179 +--- a/meson.build
180 ++++ b/meson.build
181 +@@ -123,6 +123,7 @@ conf_h = configure_file(
182 +
183 + inc = include_directories('.')
184 +
185 ++subdir('install-scripts')
186 + subdir('libcscreensaver')
187 + subdir('data')
188 + subdir('src')
189 +diff --git a/src/meson.build b/src/meson.build
190 +index 7e0978e..f04fda0 100644
191 +--- a/src/meson.build
192 ++++ b/src/meson.build
193 +@@ -64,5 +64,3 @@ foreach script : app_scripts
194 + meson.add_install_script('sh', '-c',
195 + 'ln -sf "@0@" "$DESTDIR/@1@"'.format(join_paths(pkgdatadir, script[0]), join_paths(bindir, script[1])))
196 + endforeach
197 +-
198 +-meson.add_install_script('sh', '-c', 'python3 -m compileall "$DESTDIR/@0@"'.format(pkgdatadir) )
199
200 diff --git a/gnome-extra/cinnamon-screensaver/files/cinnamon-screensaver-4.6.0-xinerama.patch b/gnome-extra/cinnamon-screensaver/files/cinnamon-screensaver-4.6.0-xinerama.patch
201 new file mode 100644
202 index 00000000000..e3240a01001
203 --- /dev/null
204 +++ b/gnome-extra/cinnamon-screensaver/files/cinnamon-screensaver-4.6.0-xinerama.patch
205 @@ -0,0 +1,49 @@
206 +From 13575ae3f332e33a1952a803f2392d6d70df2028 Mon Sep 17 00:00:00 2001
207 +From: Sparky Bluefang <sparky@××××××××××××××.com>
208 +Date: Wed, 2 Sep 2020 17:59:45 -0400
209 +Subject: [PATCH] Fix meson syntax error when xinerama support is disabled.
210 +
211 +Fixes #346
212 +---
213 + libcscreensaver/meson.build | 7 ++++++-
214 + meson.build | 3 ++-
215 + 2 files changed, 8 insertions(+), 2 deletions(-)
216 +
217 +diff --git a/libcscreensaver/meson.build b/libcscreensaver/meson.build
218 +index 1800c46..c2c3757 100644
219 +--- a/libcscreensaver/meson.build
220 ++++ b/libcscreensaver/meson.build
221 +@@ -145,13 +145,18 @@ gir_sources = [
222 + dbus_built
223 + ]
224 +
225 ++libcscreensaver_deps = [gobject, gtk, gdk, x11, xrandr, xext, glib, gio, gthread, pam, m]
226 ++if use_xinerama
227 ++ libcscreensaver_deps += xinerama
228 ++endif
229 ++
230 + libcscreensaver = library(
231 + 'cscreensaver',
232 + cscreensaver_sources + gir_sources,
233 + version: '0.0.0',
234 + include_directories: inc,
235 + cpp_args: '-DG_LOG_DOMAIN="CScreensaver"',
236 +- dependencies: [gobject, gtk, gdk, x11, xinerama, xrandr, xext, glib, gio, gthread, pam, m],
237 ++ dependencies: libcscreensaver_deps,
238 + install: true
239 + )
240 +
241 +diff --git a/meson.build b/meson.build
242 +index b15c3fb..2f9a9a5 100644
243 +--- a/meson.build
244 ++++ b/meson.build
245 +@@ -61,7 +61,8 @@ foreach sym : [
246 + endif
247 + endforeach
248 +
249 +-if get_option('xinerama')
250 ++use_xinerama = get_option('xinerama')
251 ++if use_xinerama
252 + if host_machine.system() == 'solaris'
253 + xinerama = cc.find_library('Xext')
254 + xinerama_h = cc.has_header('X11/extensions/xinerama.h')