commit:     729f378babf59b1b8d6612a24aaff6e194ee0f6e
Author:     Conrad Kostecki <conrad <AT> kostecki <DOT> com>
AuthorDate: Tue Sep 17 18:55:53 2019 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Wed Sep 18 03:33:35 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=729f378b

x11-misc/xflux-gui: disable gschemas compilation

Since Gentoo uses its own method for compiling gschemas, disabling this
for that package, as otherwise it causes a file collision.

Reported to upstream (patch got merged already):
https://www.github.com/xflux-gui/fluxgui/issues/124

Closes: https://bugs.gentoo.org/691950
Package-Manager: Portage-2.3.76, Repoman-2.3.17
Signed-off-by: Conrad Kostecki <conrad <AT> kostecki.com>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 ...xflux-gui-1.2.0-disable-gschemas-compiled.patch | 37 +++++++++++++++++
 x11-misc/xflux-gui/xflux-gui-1.2.0-r1.ebuild       | 48 ++++++++++++++++++++++
 2 files changed, 85 insertions(+)

diff --git 
a/x11-misc/xflux-gui/files/xflux-gui-1.2.0-disable-gschemas-compiled.patch 
b/x11-misc/xflux-gui/files/xflux-gui-1.2.0-disable-gschemas-compiled.patch
new file mode 100644
index 00000000000..dc14be17339
--- /dev/null
+++ b/x11-misc/xflux-gui/files/xflux-gui-1.2.0-disable-gschemas-compiled.patch
@@ -0,0 +1,37 @@
+From 674d17b100f7b8a471d65b61749ca892567f8d58 Mon Sep 17 00:00:00 2001
+From: Conrad Kostecki <con...@kostecki.com>
+Date: Fri, 16 Aug 2019 16:02:59 +0200
+Subject: [PATCH] setup.py: add posbility to disable compilation of gschema
+
+When you install fluxgui, it also compiles the gschema, which is for
+most distros fine. But on source distros like Gentoo, which do the
+compilation of gschema separately, this will lead to a file collision,
+as packages unter Gentoo are not allowed to install such files.
+
+So we introduce a new env variable called DISABLE_GSCHEMA_COMPILED which
+needs to be set to disable this behaviour.
+
+Closes: https://github.com/xflux-gui/fluxgui/issues/124
+Signed-off-by: Conrad Kostecki <con...@kostecki.com>
+---
+ setup.py | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 8a8fa14..4bd404d 100755
+--- a/setup.py
++++ b/setup.py
+@@ -76,9 +76,10 @@ def run(self):
+         super().run()
+ 
+         # Compile '*.gschema.xml' to update or create 'gschemas.compiled'.
+-        info("compiling gsettings schemas")
+-        gschema_dir = os.path.join(self.install_dir, gschema_dir_suffix)
+-        self.spawn(["glib-compile-schemas", gschema_dir])
++        if os.environ.get('DISABLE_GSCHEMAS_COMPILED', None) is None:
++            info("compiling gsettings schemas")
++            gschema_dir = os.path.join(self.install_dir, gschema_dir_suffix)
++            self.spawn(["glib-compile-schemas", gschema_dir])
+ 
+ setup(name = "f.lux indicator applet",
+     version = "1.2.1~pre",

diff --git a/x11-misc/xflux-gui/xflux-gui-1.2.0-r1.ebuild 
b/x11-misc/xflux-gui/xflux-gui-1.2.0-r1.ebuild
new file mode 100644
index 00000000000..1eaaa8fe574
--- /dev/null
+++ b/x11-misc/xflux-gui/xflux-gui-1.2.0-r1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{5,6,7} )
+
+inherit distutils-r1 gnome2-utils xdg-utils
+
+DESCRIPTION="A GUI for f.lux"
+HOMEPAGE="https://justgetflux.com/";
+SRC_URI="https://github.com/${PN}/fluxgui/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+
+PATCHES=( "${FILESDIR}/${P}-disable-gschemas-compiled.patch" )
+
+RDEPEND="
+       dev-libs/libappindicator:3
+       dev-python/pexpect[${PYTHON_USEDEP}]
+       dev-python/pygobject[${PYTHON_USEDEP}]
+       dev-python/pyxdg[${PYTHON_USEDEP}]
+       x11-libs/libXxf86vm
+       x11-misc/xflux
+"
+
+S="${WORKDIR}/fluxgui-${PV}"
+
+python_install() {
+       # Don't let the package compiling the schemas, as this could cause a 
file collision
+       export DISABLE_GSCHEMAS_COMPILED="true"
+
+       distutils-r1_python_install
+}
+
+pkg_postinst() {
+       gnome2_schemas_update
+       xdg_desktop_database_update
+       xdg_icon_cache_update
+}
+
+pkg_postrm() {
+       gnome2_schemas_update
+       xdg_desktop_database_update
+       xdg_icon_cache_update
+}

Reply via email to