Gentoo Archives: gentoo-commits

From: Mart Raudsepp <leio@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: gnome-extra/gnome-tweaks/, gnome-extra/gnome-tweaks/files/
Date: Sun, 29 Mar 2020 16:19:22
Message-Id: 1585498693.9ce29e6be1338b0ca8edbff7835ff10b5ab01f0c.leio@gentoo
1 commit: 9ce29e6be1338b0ca8edbff7835ff10b5ab01f0c
2 Author: Mart Raudsepp <leio <AT> gentoo <DOT> org>
3 AuthorDate: Sun Mar 29 13:56:47 2020 +0000
4 Commit: Mart Raudsepp <leio <AT> gentoo <DOT> org>
5 CommitDate: Sun Mar 29 16:18:13 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9ce29e6b
7
8 gnome-extra/gnome-tweaks: bump to 3.34.0
9
10 Package-Manager: Portage-2.3.84, Repoman-2.3.20
11 Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org>
12
13 gnome-extra/gnome-tweaks/Manifest | 1 +
14 .../gnome-tweaks/files/3.34.0-fix-python.patch | 85 ++++++++++++++++++++++
15 .../gnome-tweaks/gnome-tweaks-3.34.0.ebuild | 51 +++++++++++++
16 3 files changed, 137 insertions(+)
17
18 diff --git a/gnome-extra/gnome-tweaks/Manifest b/gnome-extra/gnome-tweaks/Manifest
19 index 883637886a8..9f0b2f95bc7 100644
20 --- a/gnome-extra/gnome-tweaks/Manifest
21 +++ b/gnome-extra/gnome-tweaks/Manifest
22 @@ -1 +1,2 @@
23 DIST gnome-tweaks-3.32.0.tar.xz 241492 BLAKE2B f3c0a25b39726600fc5d53d8d3c343dbcde594642a87fc56dd3fff9b88a3498e0f283568a944fc37445c138201db1f280222eb1161f5b8351c566537404cde5e SHA512 8107e9d2b33ac6c46e8d0076b27a1c3a84e1721e49a6b80da28fe854f6f4f6693bc7f7e836c54d39bafec79dcee8a6e2b2962580a77d7d01bfc06c6d11206d8f
24 +DIST gnome-tweaks-3.34.0.tar.xz 246592 BLAKE2B 8701b03f64bf6b779f6f96de25684602447b4da8f2714cb38f866e5016532aad3283f3dc217b29161534958c03e72aed33c0803e60681a3616818d037c23e5e8 SHA512 1d2b21a31550d4b48afd02a9fcfb9844eacac7aa726ef624abcb40225af31da29b34e9032b3bb2943e5cb5f7553a6f931467d04bfbc2b026732e6bdcb86eb840
25
26 diff --git a/gnome-extra/gnome-tweaks/files/3.34.0-fix-python.patch b/gnome-extra/gnome-tweaks/files/3.34.0-fix-python.patch
27 new file mode 100644
28 index 00000000000..2501bc7c4d1
29 --- /dev/null
30 +++ b/gnome-extra/gnome-tweaks/files/3.34.0-fix-python.patch
31 @@ -0,0 +1,85 @@
32 +From 0ec042734f63a3a870920b1e71f07851d335ea45 Mon Sep 17 00:00:00 2001
33 +From: Mart Raudsepp <leio@g.o>
34 +Date: Sun, 29 Mar 2020 16:05:36 +0300
35 +Subject: [PATCH] build: Fix python files installation handling
36 +
37 +The deprecated meson python3 module tends to end up installing only
38 +to a python version that meson is installed for too, possibly
39 +breaking some expectations downstream that want it installed to
40 +a specific python3 version, that might not match what the build
41 +machine uses for meson.
42 +Fix it by using the non-deprecated python module and methods from it.
43 +
44 +The python module exists since 0.46, which should be safe to require
45 +by now. There were meson 0.50 features used already, but unnecessarily,
46 +as the configure_file install parameter was added then, but all versions
47 +default to `true` anyhow. However in practice this only emitted a
48 +warning with newer meson versions and was able to build fine with older
49 +versions too. However fix it too, so that we are now warning-free for
50 +meson features after raising of the meson version dep.
51 +---
52 + gtweak/meson.build | 5 ++---
53 + meson.build | 12 ++++++++----
54 + 2 files changed, 10 insertions(+), 7 deletions(-)
55 +
56 +diff --git a/gtweak/meson.build b/gtweak/meson.build
57 +index 3d9a743..4e558b4 100644
58 +--- a/gtweak/meson.build
59 ++++ b/gtweak/meson.build
60 +@@ -11,7 +11,6 @@ configure_file(
61 + input: 'defs.py.in',
62 + output: 'defs.py',
63 + configuration: defs_conf,
64 +- install: true,
65 + install_dir: gtweakdir
66 + )
67 +
68 +@@ -46,5 +45,5 @@ tweak_sources = [
69 + 'tweaks/tweak_wacom.py',
70 + ]
71 +
72 +-install_data(shell_sources, install_dir: gtweakdir)
73 +-install_data(tweak_sources, install_dir: gtweakdir + '/tweaks')
74 ++python3.install_sources(shell_sources, subdir: 'gtweak')
75 ++python3.install_sources(tweak_sources, subdir: join_paths('gtweak', 'tweaks'))
76 +diff --git a/meson.build b/meson.build
77 +index b7da518..df49ae3 100644
78 +--- a/meson.build
79 ++++ b/meson.build
80 +@@ -1,11 +1,16 @@
81 + project('gnome-tweaks',
82 + version: '3.34.0',
83 +- meson_version: '>= 0.40.0'
84 ++ meson_version: '>= 0.46.0'
85 + )
86 +
87 + gnome = import('gnome')
88 + i18n = import('i18n')
89 +-python3 = import('python3')
90 ++pymod = import('python')
91 ++python3 = pymod.find_installation('python3')
92 ++
93 ++if not python3.found()
94 ++ error('No valid python3 installation found')
95 ++endif
96 +
97 + prefix = get_option('prefix')
98 +
99 +@@ -13,13 +18,12 @@ bindir = join_paths(prefix, get_option('bindir'))
100 + datadir = join_paths(prefix, get_option('datadir'))
101 + libexecdir = join_paths(prefix, get_option('libexecdir'))
102 + localedir = join_paths(prefix, get_option('localedir'))
103 +-pythondir = join_paths(prefix, python3.sysconfig_path('purelib'))
104 +
105 + pkgdatadir = join_paths(datadir, meson.project_name())
106 +
107 + appdatadir = join_paths(datadir, 'metainfo')
108 + desktopdir = join_paths(datadir, 'applications')
109 +-gtweakdir = join_paths(pythondir, 'gtweak')
110 ++gtweakdir = python3.get_install_dir(subdir: 'gtweak')
111 + icondir = join_paths(datadir, 'icons', 'hicolor')
112 + schemadir = join_paths(datadir, 'glib-2.0', 'schemas')
113 +
114 +--
115 +2.20.1
116 +
117
118 diff --git a/gnome-extra/gnome-tweaks/gnome-tweaks-3.34.0.ebuild b/gnome-extra/gnome-tweaks/gnome-tweaks-3.34.0.ebuild
119 new file mode 100644
120 index 00000000000..7a5ad14a25b
121 --- /dev/null
122 +++ b/gnome-extra/gnome-tweaks/gnome-tweaks-3.34.0.ebuild
123 @@ -0,0 +1,51 @@
124 +# Copyright 1999-2020 Gentoo Authors
125 +# Distributed under the terms of the GNU General Public License v2
126 +
127 +EAPI=7
128 +PYTHON_COMPAT=( python3_{6,7,8} )
129 +
130 +inherit gnome.org meson python-single-r1 xdg
131 +
132 +DESCRIPTION="Customize advanced GNOME 3 options"
133 +HOMEPAGE="https://wiki.gnome.org/Apps/Tweaks"
134 +
135 +LICENSE="GPL-3+ CC0-1.0"
136 +SLOT="0"
137 +
138 +IUSE=""
139 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
140 +
141 +KEYWORDS="~amd64 ~arm64 ~ia64 ~ppc ~ppc64 ~x86"
142 +
143 +DEPEND="${PYTHON_DEPS}"
144 +# See README.md for list of deps
145 +RDEPEND="${DEPEND}
146 + $(python_gen_cond_dep '
147 + >=dev-python/pygobject-3.10.2:3[${PYTHON_MULTI_USEDEP}]
148 + ')
149 + >=gnome-base/gnome-settings-daemon-3
150 + x11-themes/sound-theme-freedesktop
151 +
152 + >=dev-libs/glib-2.58:2
153 + >=x11-libs/gtk+-3.12:3[introspection]
154 + >=gnome-base/gnome-desktop-3.30:3[introspection]
155 + gui-libs/libhandy:0.0[introspection]
156 + net-libs/libsoup:2.4[introspection]
157 + x11-libs/libnotify[introspection]
158 +
159 + >=gnome-base/gsettings-desktop-schemas-3.33.0
160 + >=gnome-base/gnome-shell-3.24
161 + x11-wm/mutter
162 +"
163 +BDEPEND=">=sys-devel/gettext-0.19.8"
164 +
165 +PATCHES=(
166 + "${FILESDIR}"/3.28.1-gentoo-cursor-themes.patch # Add contents of Gentoo's cursor theme directory to cursor theme list
167 + "${FILESDIR}"/${PV}-fix-python.patch
168 +)
169 +
170 +src_install() {
171 + meson_src_install
172 + python_optimize
173 + python_fix_shebang "${ED}"/usr/bin/
174 +}