diff --git a/games-util/nsz/Manifest b/games-util/nsz/Manifest new file mode 100644 index 0000000000..3f00836715 --- /dev/null +++ b/games-util/nsz/Manifest @@ -0,0 +1 @@ +DIST nsz-5.0.0.tar.gz 1136651 BLAKE2B 439854941069b11848afd17ec0c2c8ea47461622c3393c393d251290fe32d910dee1101dff8d7a2538567e7e700088830045c10f0ae08becb4cf14c515b1e435 SHA512 6ef968eb4859d8e3305dd1edc77aa99959b972db0848519ae20d7e7ee76fc02f621c89501c2a77f7f03f54f6873f8aecd80a0179e5e036e46ee63c6f5a96f0d5 diff --git a/games-util/nsz/files/nsz-5.0.0-override-the-location-of-the-app-config.patch b/games-util/nsz/files/nsz-5.0.0-override-the-location-of-the-app-config.patch new file mode 100644 index 0000000000..9fcd7b099c --- /dev/null +++ b/games-util/nsz/files/nsz-5.0.0-override-the-location-of-the-app-config.patch @@ -0,0 +1,32 @@ +From: Pavel Sobolev +Subject: [PATCH] Override the location of the app config + +Signed-off-by: Pavel Sobolev + +--- a/nsz/gui/NSZ_GUI.py ++++ b/nsz/gui/NSZ_GUI.py +@@ -19,6 +19,8 @@ import sys + import subprocess + import ctypes + ++import os ++ + def apply_dpi_scaling(config): + enable = int(config.get("DPI", "dpi_enable")) + auto = int(config.get("DPI", "dpi_auto")) +@@ -118,6 +120,15 @@ def launchGui(): + class GUI(App): + rootWidget = None + ++ def get_application_config(self): ++ xdg = os.environ.get("XDG_CONFIG_HOME") ++ if xdg: ++ cfg_dir = Path(xdg) / "nsz" ++ else: ++ cfg_dir = Path.home() / ".config" / "nsz" ++ cfg_dir.mkdir(parents=True, exist_ok=True) ++ cfg_file = cfg_dir / '%(appname)s.ini' ++ return super(GUI, self).get_application_config(cfg_file) + def run(self): + patchKivyOpenGlExtensionDecode() + LabelBase.register(DEFAULT_FONT, getGuiPath("fonts/MPLUS1p-Medium.ttf")) diff --git a/games-util/nsz/metadata.xml b/games-util/nsz/metadata.xml new file mode 100644 index 0000000000..c1479047dc --- /dev/null +++ b/games-util/nsz/metadata.xml @@ -0,0 +1,12 @@ + + + + + Pavel Sobolev + contact@paveloom.dev + + + https://github.com/nicoboss/nsz/issues + nicoboss/nsz + + diff --git a/games-util/nsz/nsz-5.0.0.ebuild b/games-util/nsz/nsz-5.0.0.ebuild new file mode 100644 index 0000000000..6f5a220009 --- /dev/null +++ b/games-util/nsz/nsz-5.0.0.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{12..15} ) + +inherit distutils-r1 optfeature + +DESCRIPTION="Homebrew compatible NSP/XCI compressor/decompressor" +HOMEPAGE="https://github.com/nicoboss/nsz" +SRC_URI="https://github.com/nicoboss/nsz/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" +RESTRICT="test" + +RDEPEND=" + dev-python/enlighten[${PYTHON_USEDEP}] + dev-python/pycryptodome[${PYTHON_USEDEP}] + dev-python/zstandard[${PYTHON_USEDEP}] +" + +PATCHES=( + "${FILESDIR}/nsz-5.0.0-override-the-location-of-the-app-config.patch" +) + +pkg_postinst() { + optfeature "GUI" dev-python/kivy +}