From a4a67eb3fd69a08c304ff589bc1edd3f2fd08f7a Mon Sep 17 00:00:00 2001 From: David Guglielmi Date: Wed, 21 Aug 2024 21:51:33 +0200 Subject: [PATCH] gui-apps/blackbox: new ebuild --- gui-apps/blackbox/Manifest | 2 + gui-apps/blackbox/blackbox-0.14.0.ebuild | 58 +++++++++++++++++ .../blackbox-0.14.1_pre20240716.ebuild | 62 +++++++++++++++++++ .../files/blackbox-0.14.0-fix-gcc14.patch | 43 +++++++++++++ ...ename-executable-to-backbox-terminal.patch | 53 ++++++++++++++++ gui-apps/blackbox/metadata.xml | 11 ++++ 6 files changed, 229 insertions(+) create mode 100644 gui-apps/blackbox/Manifest create mode 100644 gui-apps/blackbox/blackbox-0.14.0.ebuild create mode 100644 gui-apps/blackbox/blackbox-0.14.1_pre20240716.ebuild create mode 100644 gui-apps/blackbox/files/blackbox-0.14.0-fix-gcc14.patch create mode 100644 gui-apps/blackbox/files/blackbox-0.14.0-rename-executable-to-backbox-terminal.patch create mode 100644 gui-apps/blackbox/metadata.xml diff --git a/gui-apps/blackbox/Manifest b/gui-apps/blackbox/Manifest new file mode 100644 index 0000000..b168f92 --- /dev/null +++ b/gui-apps/blackbox/Manifest @@ -0,0 +1,2 @@ +DIST blackbox-0.14.1_pre20240716.tar.bz2 160192 BLAKE2B 37d0a9f6a19f46896bbeec91ad00e2a35deba4f8da3898389a3594e6768e311f3c7afb5690f1fee890e76c2e2aa6d38127b27bda7b419371905f790d49edb524 SHA512 7b7dc875b79f937a49007a1e6461961aecf5dd5bf39bf207d221ef9a613d92d872d7f3c2f29554263f2f4add039ad52901546a1fe9d5b6fd56eed57d2fc4614f +DIST blackbox-v0.14.0.tar.bz2 142954 BLAKE2B 4701d88dbd7b12b148143d6acf30469ca129fbd591365242f5e6c9f2cf18884ca46f670cce72ecc83c058a599567f442eddc9cf14e1ae9f694a93de9245f89c9 SHA512 3d5d1f78f19ec719c5d8f8db9afd73450fca8241ada0649d58aec92010836013a949cff3b0964341ab3d939a4e3d8c97cabd1cd3d199f4248dc5e3479c1a53db diff --git a/gui-apps/blackbox/blackbox-0.14.0.ebuild b/gui-apps/blackbox/blackbox-0.14.0.ebuild new file mode 100644 index 0000000..0f24a69 --- /dev/null +++ b/gui-apps/blackbox/blackbox-0.14.0.ebuild @@ -0,0 +1,58 @@ +# Copyright 2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit gnome2-utils meson vala xdg + +DESCRIPTION="An elegant and customizable terminal for GNOME" +HOMEPAGE="https://gitlab.gnome.org/raggesilver/blackbox" +SRC_URI="https://gitlab.gnome.org/raggesilver/blackbox/-/archive/v${PV}/${PN}-v${PV}.tar.bz2" + +S="${WORKDIR}/${PN}-v${PV}" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64" + +RDEPEND=" + >=dev-libs/glib-2.76:2 + >=gui-libs/gtk-4.12.2:4 + >=gui-libs/libadwaita-1.4:1 + >=gui-libs/pqmarble-2 + >=gui-libs/vte-0.75.1:2.91-gtk4[vala] + dev-libs/json-glib + >=dev-libs/libpcre2-10.43:0= + >=dev-libs/libxml2-2.9.12 + >=gnome-base/librsvg-2.54.0 + dev-libs/libgee + media-libs/graphene[introspection] +" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}"/${P}-rename-executable-to-backbox-terminal.patch + "${FILESDIR}"/${P}-fix-gcc14.patch +) + +src_prepare() { + vala_setup + default +} + +src_configure() { + local emesonargs=( + -Dblackbox_is_flatpak=false + ) + meson_src_configure +} + +pkg_postinst() { + xdg_pkg_postinst + gnome2_schemas_update +} + +pkg_postrm() { + xdg_pkg_postrm + gnome2_schemas_update +} diff --git a/gui-apps/blackbox/blackbox-0.14.1_pre20240716.ebuild b/gui-apps/blackbox/blackbox-0.14.1_pre20240716.ebuild new file mode 100644 index 0000000..2d8e0da --- /dev/null +++ b/gui-apps/blackbox/blackbox-0.14.1_pre20240716.ebuild @@ -0,0 +1,62 @@ +# Copyright 2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit gnome2-utils meson vala xdg + +COMMIT_ID="53be9986dea776eb4c2804d4e342cbd3a3cf06fc" + +DESCRIPTION="An elegant and customizable terminal for GNOME" +HOMEPAGE="https://gitlab.gnome.org/raggesilver/blackbox" +SRC_URI=" + https://gitlab.gnome.org/raggesilver/blackbox/-/archive/${COMMIT_ID}/${PN}-${COMMIT_ID::-30}.tar.bz2 + -> ${P}.tar.bz2 +" + +S="${WORKDIR}/${PN}-${COMMIT_ID}" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64" + +RDEPEND=" + >=dev-libs/glib-2.76:2 + >=gui-libs/gtk-4.12.2:4 + >=gui-libs/libadwaita-1.4:1 + >=gui-libs/pqmarble-2 + >=gui-libs/vte-0.75.1:2.91-gtk4[vala] + dev-libs/json-glib + >=dev-libs/libpcre2-10.43:0= + >=dev-libs/libxml2-2.9.12 + >=gnome-base/librsvg-2.54.0 + dev-libs/libgee + media-libs/graphene[introspection] +" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}"/${PN}-0.14.0-rename-executable-to-backbox-terminal.patch +) + +src_prepare() { + vala_setup + default +} + +src_configure() { + local emesonargs=( + -Dblackbox_is_flatpak=false + ) + meson_src_configure +} + +pkg_postinst() { + xdg_pkg_postinst + gnome2_schemas_update +} + +pkg_postrm() { + xdg_pkg_postrm + gnome2_schemas_update +} diff --git a/gui-apps/blackbox/files/blackbox-0.14.0-fix-gcc14.patch b/gui-apps/blackbox/files/blackbox-0.14.0-fix-gcc14.patch new file mode 100644 index 0000000..3bd08ae --- /dev/null +++ b/gui-apps/blackbox/files/blackbox-0.14.0-fix-gcc14.patch @@ -0,0 +1,43 @@ +From 2f45717f1c18f710d9b9fbf21830027c8f0794e7 Mon Sep 17 00:00:00 2001 +From: Rico Tzschichholz +Date: Sat, 24 Feb 2024 14:57:55 +0000 +Subject: [PATCH] Drop usage of return*_if_fail() to avoid return-mismatch + error of C compiler + +--- + src/widgets/ColorSchemeThumbnail.vala | 2 +- + src/widgets/Window.vala | 5 +---- + 2 files changed, 2 insertions(+), 5 deletions(-) + +diff --git a/src/widgets/ColorSchemeThumbnail.vala b/src/widgets/ColorSchemeThumbnail.vala +index 2e1e57e..8c73e3d 100644 +--- a/src/widgets/ColorSchemeThumbnail.vala ++++ b/src/widgets/ColorSchemeThumbnail.vala +@@ -125,7 +125,7 @@ public class Terminal.ColorSchemePreviewPaintable : GLib.Object, Gdk.Paintable { + + private async void load_image () { + var file_content = ColorSchemeThumbnailProvider.apply_scheme (this.scheme); +- return_if_fail (file_content != null); ++ if (file_content == null) return; + + try { + this.handler = new Rsvg.Handle.from_data (file_content); +diff --git a/src/widgets/Window.vala b/src/widgets/Window.vala +index 1388685..abdc8fd 100644 +--- a/src/widgets/Window.vala ++++ b/src/widgets/Window.vala +@@ -38,10 +38,7 @@ public struct Terminal.Padding { + } + + public static Padding from_variant (Variant vari) { +- return_val_if_fail ( +- vari.check_format_string ("(uuuu)", false), +- Padding.zero () +- ); ++ if (!vari.check_format_string ("(uuuu)", false)) return Padding.zero (); + + var iter = vari.iterator (); + uint top = 0, right = 0, bottom = 0, left = 0; +-- +GitLab + diff --git a/gui-apps/blackbox/files/blackbox-0.14.0-rename-executable-to-backbox-terminal.patch b/gui-apps/blackbox/files/blackbox-0.14.0-rename-executable-to-backbox-terminal.patch new file mode 100644 index 0000000..982ffe1 --- /dev/null +++ b/gui-apps/blackbox/files/blackbox-0.14.0-rename-executable-to-backbox-terminal.patch @@ -0,0 +1,53 @@ +From b9e1662ece1baaf57d141ad045e316dffcbf53a4 Mon Sep 17 00:00:00 2001 +From: Carl George +Date: Thu, 20 Jul 2023 00:01:26 -0500 +Subject: [PATCH] Rename executable to blackbox-terminal + +This is to avoid file conflicts with the blackbox window manager, which +is already packaged in several Linux distros. +--- + com.raggesilver.BlackBox.json | 2 +- + data/com.raggesilver.BlackBox.desktop.in | 2 +- + src/meson.build | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/com.raggesilver.BlackBox.json b/com.raggesilver.BlackBox.json +index 86e0a5d..030c22f 100644 +--- a/com.raggesilver.BlackBox.json ++++ b/com.raggesilver.BlackBox.json +@@ -3,7 +3,7 @@ + "runtime": "org.gnome.Platform", + "runtime-version": "45", + "sdk": "org.gnome.Sdk", +- "command": "blackbox", ++ "command": "blackbox-terminal", + "finish-args": [ + "--filesystem=host", + "--filesystem=xdg-run/gvfsd", +diff --git a/data/com.raggesilver.BlackBox.desktop.in b/data/com.raggesilver.BlackBox.desktop.in +index 28f3b55..1d45a17 100644 +--- a/data/com.raggesilver.BlackBox.desktop.in ++++ b/data/com.raggesilver.BlackBox.desktop.in +@@ -1,6 +1,6 @@ + [Desktop Entry] + Name=Black Box +-Exec=blackbox ++Exec=blackbox-terminal + Terminal=false + Type=Application + Categories=GNOME;GTK;System;TerminalEmulator; +diff --git a/src/meson.build b/src/meson.build +index 8891f58..47d03f1 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -75,7 +75,7 @@ if get_option('blackbox_is_flatpak') + add_project_arguments('-D', 'BLACKBOX_IS_FLATPAK', language: 'vala') + endif + +-executable('blackbox', blackbox_sources, config_header, ++executable('blackbox-terminal', blackbox_sources, config_header, + vala_args: '--target-glib=2.50', dependencies: blackbox_deps, + install: true, + ) +-- +GitLab diff --git a/gui-apps/blackbox/metadata.xml b/gui-apps/blackbox/metadata.xml new file mode 100644 index 0000000..629c4ec --- /dev/null +++ b/gui-apps/blackbox/metadata.xml @@ -0,0 +1,11 @@ + + + + + david.guglielmi@gmail.com + David GUGLIELMI + + + raggesilver/blackbox + +