diff options
author | Ian Jordan <immoloism@gmail.com> | 2024-04-06 15:55:08 +0100 |
---|---|---|
committer | Arthur Zamarin <arthurzam@gentoo.org> | 2024-04-09 20:28:45 +0300 |
commit | d4bf91b23fa91da8e800fb939b3afb6af7b97cca (patch) | |
tree | c3ee1d015b3f68765a69f2bfd1737f82f3a63f88 /mate-extra | |
parent | x11-wm/marco: add 1.28.1 (diff) | |
download | gentoo-d4bf91b23fa91da8e800fb939b3afb6af7b97cca.tar.gz gentoo-d4bf91b23fa91da8e800fb939b3afb6af7b97cca.tar.bz2 gentoo-d4bf91b23fa91da8e800fb939b3afb6af7b97cca.zip |
mate-extra/mate-tweak: New package
Signed-off-by: Ian Jordan <immoloism@gmail.com>
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'mate-extra')
-rw-r--r-- | mate-extra/mate-calc/metadata.xml | 5 | ||||
-rw-r--r-- | mate-extra/mate-tweak/Manifest | 1 | ||||
-rw-r--r-- | mate-extra/mate-tweak/files/mate-tweak-22.10.0-avoid-distutilsextra.patch | 86 | ||||
-rw-r--r-- | mate-extra/mate-tweak/mate-tweak-22.10.0.ebuild | 67 | ||||
-rw-r--r-- | mate-extra/mate-tweak/metadata.xml | 22 |
5 files changed, 177 insertions, 4 deletions
diff --git a/mate-extra/mate-calc/metadata.xml b/mate-extra/mate-calc/metadata.xml index 144734d5fb8a..6d18d4d8c299 100644 --- a/mate-extra/mate-calc/metadata.xml +++ b/mate-extra/mate-calc/metadata.xml @@ -9,10 +9,7 @@ <email>proxy-maint@gentoo.org</email> <name>Proxy Maintainers</name> </maintainer> - <longdescription> - MATE Calculator is a fork of gnome-calc, the calculator application that was previously in the OpenWindows Deskset of the Solaris 8 operating system. - </longdescription> <upstream> - <remote-id type="github">mate-desktop/mate-calc</remote-id> + <remote-id type="github">mate-desktop/mate-session-manager</remote-id> </upstream> </pkgmetadata> diff --git a/mate-extra/mate-tweak/Manifest b/mate-extra/mate-tweak/Manifest new file mode 100644 index 000000000000..c9dc760b7162 --- /dev/null +++ b/mate-extra/mate-tweak/Manifest @@ -0,0 +1 @@ +DIST mate-tweak-22.10.0.tar.gz 183534 BLAKE2B b5fffb3e0114df627e9634bef0da68354bd52f96e64ddbe7a2183e89c15957deae9398885b8ec7cd2074a9417a5e2801bd26743db6b8e222ec986445dc6100ca SHA512 9d1cd553827e79023635d6027e4028ee527d6950a2321d87c44ac7874ef019d46ea41f59b8020e1dbab2bdfd97bfc8647bff89983de549150087659ef25a1f89 diff --git a/mate-extra/mate-tweak/files/mate-tweak-22.10.0-avoid-distutilsextra.patch b/mate-extra/mate-tweak/files/mate-tweak-22.10.0-avoid-distutilsextra.patch new file mode 100644 index 000000000000..bf8b552d7424 --- /dev/null +++ b/mate-extra/mate-tweak/files/mate-tweak-22.10.0-avoid-distutilsextra.patch @@ -0,0 +1,86 @@ +alternative to distutilsextra that can be inserted into setup.py +based on https://davesteele.github.io/development/2015/12/11/add-i18n-to-setup-py/ + +diff --git a/setup.py b/setup.py +index 412527b..2e79447 100755 +--- a/setup.py ++++ b/setup.py +@@ -20,13 +20,11 @@ + + import os + import sys ++import shutil + + from glob import glob + from setuptools import setup +- +-import DistUtilsExtra.command.build_extra +-import DistUtilsExtra.command.build_i18n +-import DistUtilsExtra.command.clean_i18n ++from setuptools.command.build import build + + # to update i18n .mo files (and merge .pot file into .po files) run on Linux: + # tx pull -a --minimum-perc=5 +@@ -43,6 +41,48 @@ with open('mate-tweak') as f: + + PROGRAM_VERSION = __VERSION__ + ++podir = "po" ++pos = [x for x in os.listdir(podir) if x[-3:] == ".po"] ++langs = sorted([os.path.split(x)[-1][:-3] for x in pos]) ++ ++def mkmo(lang): ++ outpath = os.path.join("build/mo", lang, "LC_MESSAGES") ++ if os.path.exists(outpath): ++ shutil.rmtree(outpath) ++ os.makedirs(outpath) ++ ++ inpath = os.path.join(podir, lang + ".po") ++ ++ cmd = "msgfmt %s -o %s/%s.mo" % (inpath, outpath, "mate-tweak") ++ os.system(cmd) ++ ++def merge_i18n(): ++ cmd = "LC_ALL=C intltool-merge -u -c ./po/.intltool-merge-cache ./po " ++ for infile in (x[:-3] for x in os.listdir('.') if x[-3:] == '.in'): ++ print("Processing %s.in to %s" % (infile, infile)) ++ ++ if 'desktop' in infile: ++ flag = '-d' ++ elif 'schema' in infile: ++ flag = '-s' ++ elif 'xml' in infile: ++ flag = '-x' ++ else: ++ flag = '' ++ ++ if flag: ++ os.system("%s %s %s.in %s" % (cmd, flag, infile, infile)) ++ ++class custom_build(build): ++ def run(self, *args): ++ build.run(self, *args) ++ ++ for lang in langs: ++ mkmo(lang) ++ ++ merge_i18n() ++ data_files.extend(datafilelist('{prefix}/share/locale'.format(prefix=sys.prefix), 'build/mo')) ++ + def datafilelist(installbase, sourcebase): + datafileList = [] + for root, subFolders, files in os.walk(sourcebase): +@@ -62,12 +102,9 @@ data_files = [ + ('{prefix}/share/polkit-1/actions'.format(prefix=sys.prefix), ['data/org.mate.mate-tweak.policy',]), + ('{prefix}/lib/mate-tweak'.format(prefix=sys.prefix), ['data/mate-tweak.ui', 'util/mate-tweak-helper']), + ] +-data_files.extend(datafilelist('{prefix}/share/locale'.format(prefix=sys.prefix), 'build/mo')) + + cmdclass ={ +- "build" : DistUtilsExtra.command.build_extra.build_extra, +- "build_i18n" : DistUtilsExtra.command.build_i18n.build_i18n, +- "clean": DistUtilsExtra.command.clean_i18n.clean_i18n, ++ "build" : custom_build, + } + + setup( diff --git a/mate-extra/mate-tweak/mate-tweak-22.10.0.ebuild b/mate-extra/mate-tweak/mate-tweak-22.10.0.ebuild new file mode 100644 index 000000000000..1bc88c4fed7b --- /dev/null +++ b/mate-extra/mate-tweak/mate-tweak-22.10.0.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_EXT=1 +DISTUTILS_SINGLE_IMPL=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{10..12} ) +inherit distutils-r1 + +DESCRIPTION="Tweak tool for the MATE Desktop" +HOMEPAGE="https://github.com/ubuntu-mate/mate-tweak" +SRC_URI="https://github.com/ubuntu-mate/mate-tweak/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="dropdown" + +RDEPEND=" + $(python_gen_cond_dep ' + dev-python/distro[${PYTHON_USEDEP}] + dev-python/psutil[${PYTHON_USEDEP}] + dev-python/setproctitle[${PYTHON_USEDEP}] + ') + gnome-base/dconf + x11-libs/libnotify + mate-base/libmatekbd + mate-base/mate-panel + dropdown? ( x11-terms/tilda ) +" + +BDEPEND=" + dev-util/intltool + net-misc/rsync + sys-devel/gettext +" + +PATCHES=( + "${FILESDIR}/mate-tweak-22.10.0-avoid-distutilsextra.patch" +) + +pkg_setup() { + python-single-r1_pkg_setup +} + +src_prepare() { + # Correct paths in mate-tweak script - makes "Window Behavior" options work + # from https://github.com/shiznix/unity-gentoo/blob/master/mate-extra/mate-tweak/mate-tweak-22.10.0_p_p0_p01.ebuild + sed -e "s:brisk-menu/brisk-menu:brisk-menu:g" \ + -e "s:/usr/lib/mate-netbook/mate-window-picker-applet:/usr/libexec/mate-window-picker-applet:g" \ + -e "s:/usr/lib/MULTIARCH:MULTIARCH:g" \ + -e "s:'/usr/lib/' + self.multiarch + :self.multiarch + :g" \ + -e "/self.multiarch = sysconfig.get_config_var/c\ self.multiarch = os.path.join('/','usr','libexec')" \ + -e "s:self.multiarch + '/mate-panel/libappmenu-mate.so':'/usr/$(get_libdir)/mate-panel/libappmenu-mate.so':g" \ + -i mate-tweak || die + + distutils-r1_src_prepare +} + +src_install() { + distutils-r1_src_install + rsync -av "${ED}"/usr/lib/python*/site-packages/usr/ "${ED}"/usr || die + rm -r "${ED}"/usr/lib/python*/site-packages/{usr,__pycache__,setup.py} || die + python_fix_shebang "${ED}" +} diff --git a/mate-extra/mate-tweak/metadata.xml b/mate-extra/mate-tweak/metadata.xml new file mode 100644 index 000000000000..8df5c97744ba --- /dev/null +++ b/mate-extra/mate-tweak/metadata.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person" proxied="yes"> + <email>immoloism@gmail.com</email> + <name>Ian Jordan</name> + </maintainer> + <maintainer type="person" proxied="yes"> + <email>tacokoneko@gmail.com</email> + <name>Robet Kirkman</name> + </maintainer> + <maintainer type="project" proxied="proxy"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <use> + <flag name="dropdown">Support the <pkg>x11-terms/tilda</pkg> dropdown terminal emulator</flag> + </use> + <upstream> + <remote-id type="github">ubuntu-mate/mate-tweak</remote-id> + </upstream> +</pkgmetadata> |