aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorItai Ferber <itai@itaiferber.net>2024-07-15 22:37:17 -0400
committerItai Ferber <itai@itaiferber.net>2024-07-15 22:37:17 -0400
commit02441cd7f343307c659c8b1240a92bb5f10ddb35 (patch)
treec978273f3954ac9757f706649ac7a641a7b77e4c /app-misc
parentapp-admin/pulumi-bin: add 3.124.0, drop 3.119.0 (diff)
downloadguru-02441cd7f343307c659c8b1240a92bb5f10ddb35.tar.gz
guru-02441cd7f343307c659c8b1240a92bb5f10ddb35.tar.bz2
guru-02441cd7f343307c659c8b1240a92bb5f10ddb35.zip
app-misc/via: new package, add 3.0.0
Signed-off-by: Itai Ferber <itai@itaiferber.net>
Diffstat (limited to 'app-misc')
-rw-r--r--app-misc/via/Manifest1
-rw-r--r--app-misc/via/metadata.xml8
-rw-r--r--app-misc/via/via-3.0.0.ebuild73
3 files changed, 82 insertions, 0 deletions
diff --git a/app-misc/via/Manifest b/app-misc/via/Manifest
new file mode 100644
index 000000000..7ab1fab35
--- /dev/null
+++ b/app-misc/via/Manifest
@@ -0,0 +1 @@
+DIST via-3.0.0.AppImage 96599478 BLAKE2B 4b39ba089749713c870608fd18aced435cf617beaf4577bd95de404876ad0ebf14d9a257b53c326033746fcc1acab477401e411d75a99f34453c5770d9abbafb SHA512 cf88b62466bdcdbe73877a37fc6a3ba401567519a62b1005c4e602f7e5f38df0fab05c0f7e368a9e92fddb135b068d069f385d5d932d13534c7c9cb253fbaac0
diff --git a/app-misc/via/metadata.xml b/app-misc/via/metadata.xml
new file mode 100644
index 000000000..ddf05e23e
--- /dev/null
+++ b/app-misc/via/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer needed -->
+ <upstream>
+ <remote-id type="github">the-via/releases</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-misc/via/via-3.0.0.ebuild b/app-misc/via/via-3.0.0.ebuild
new file mode 100644
index 000000000..f22f9e449
--- /dev/null
+++ b/app-misc/via/via-3.0.0.ebuild
@@ -0,0 +1,73 @@
+# Copyright 2024 Gentoo Authors
+
+EAPI=8
+
+inherit desktop
+
+DESCRIPTION="GUI configurator for supported QMK-based keyboards"
+HOMEPAGE="https://caniusevia.com"
+SRC_URI="amd64? (
+ https://github.com/the-via/releases/releases/download/v${PV}/${P}-linux.AppImage
+ -> ${P}.AppImage
+)"
+
+S="${WORKDIR}"
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RESTRICT="bindist mirror test strip"
+
+# These dependencies were extracted from the shared libraries required by the
+# via-nativia executable; it's not clear whether these are all _actually_
+# required, or whether the list is extensive because the executable is an
+# Electron app.
+RDEPEND="
+ app-accessibility/at-spi2-core
+ dev-libs/expat
+ dev-libs/glib
+ dev-libs/nspr
+ dev-libs/nss
+ media-libs/alsa-lib
+ media-libs/mesa
+ sys-apps/dbus
+ x11-libs/cairo
+ x11-libs/gtk+
+ x11-libs/libX11
+ x11-libs/libXcomposite
+ x11-libs/libXdamage
+ x11-libs/libXext
+ x11-libs/libXfixes
+ x11-libs/libXrandr
+ x11-libs/libdrm
+ x11-libs/libxcb
+ x11-libs/libxkbcommon
+ x11-libs/pango
+"
+
+src_unpack() {
+ # The AppImage is self-contained so we'll install it as a binary directly,
+ # but it also contains a `.desktop` file and app icons that we want; we can
+ # move it into "${S}", and also extract its contents into there.
+ mkdir -p "${S}" \
+ && mv "${DISTDIR}/${P}.AppImage" "${S}" \
+ && chmod +x "${S}/${P}.AppImage" \
+ && pushd "${S}" \
+ && "${S}/${P}.AppImage" --appimage-extract \
+ && popd \
+ || die
+}
+
+src_install() {
+ newbin "${S}/${P}.AppImage" via
+
+ for size in 16 24 32 48 64 96 128 256 512 1024; do
+ doicon -s "${size}" "${S}/squashfs-root/usr/share/icons/hicolor/${size}x${size}/apps/via-nativia.png"
+ done
+
+ # The inner `.desktop` file points to an internal binary; we can use the
+ # file but point it to the installed binary path.
+ local menu_path="${S}/squashfs-root/via-nativia.desktop"
+ sed -i '' -e 's|^Exec=.*$|Exec=/usr/bin/via|' "${menu_path}"
+ domenu "${menu_path}"
+}