commit:     337dbc747bcb2d8f80afe329e337219c44ad55e2
Author:     Itai Ferber <itai <AT> itaiferber <DOT> net>
AuthorDate: Thu Jul 18 12:24:43 2024 +0000
Commit:     Itai Ferber <itai <AT> itaiferber <DOT> net>
CommitDate: Thu Jul 18 12:24:43 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=337dbc74

app-misc/via: fix installation error

Signed-off-by: Itai Ferber <itai <AT> itaiferber.net>

 app-misc/via/via-3.0.0.ebuild | 26 +++++++++++---------------
 1 file changed, 11 insertions(+), 15 deletions(-)

diff --git a/app-misc/via/via-3.0.0.ebuild b/app-misc/via/via-3.0.0.ebuild
index 62be413b7..2e1b715b4 100644
--- a/app-misc/via/via-3.0.0.ebuild
+++ b/app-misc/via/via-3.0.0.ebuild
@@ -14,6 +14,10 @@ LICENSE="GPL-3"
 SLOT="0"
 KEYWORDS="~amd64"
 
+# Stripping AppImage binaries causes them to no longer recognize their internal
+# filesystem.
+RESTRICT="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
@@ -41,21 +45,13 @@ RDEPEND="
        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
+       newbin "${DISTDIR}/${P}.AppImage" via
+
+       # The AppImage is self-contained and is installed as a binary directly, 
but
+       # it also contains a `.desktop` file and app icons that we want; we can
+       # extract those from its contents.
+       "${ED}/usr/bin/via" --appimage-extract
 
        local size
        for size in 16 24 32 48 64 96 128 256 512 1024; do
@@ -65,6 +61,6 @@ src_install() {
        # 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}"
+       sed -ie "s|^Exec=.*$|Exec=${EPREFIX}/usr/bin/via|" "${menu_path}" || die
        domenu "${menu_path}"
 }

Reply via email to