From f9857e82a7252972c228316a3e6a08825d06a231 Mon Sep 17 00:00:00 2001 From: none Date: Sat, 20 Apr 2024 04:40:21 +0200 Subject: [PATCH] add rglauncher initial --- gui-apps/rglauncher/rglauncher-9999.ebuild | 73 ++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 gui-apps/rglauncher/rglauncher-9999.ebuild diff --git a/gui-apps/rglauncher/rglauncher-9999.ebuild b/gui-apps/rglauncher/rglauncher-9999.ebuild new file mode 100644 index 0000000..83cb44d --- /dev/null +++ b/gui-apps/rglauncher/rglauncher-9999.ebuild @@ -0,0 +1,73 @@ +# Copyright 2020-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +CRATES=" +" + +inherit cargo xdg desktop + +DESCRIPTION="Application launcher" +HOMEPAGE="https://github.com/aeghn/rglauncher" + + +if [[ ${PV} == "9999" ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/aeghn/rglauncher.git" +else + SRC_URI=" + https://github.com/aeghn/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz + ${CARGO_CRATE_URIS} + " + KEYWORDS="~amd64 ~ppc64" +fi + + +# LICENSE="" +SLOT="0" +KEYWORDS="~amd64" +IUSE="+mdict clip calc hyprwin" + + +# Rust packages ignore CFLAGS and LDFLAGS so let's silence the QA warnings +# QA_FLAGS_IGNORED="usr/bin/btm" + + +src_unpack() { + if [[ "${PV}" == *9999* ]]; then + git-r3_src_unpack + cargo_live_src_unpack + else + cargo_src_unpack + fi +} + +src_prepare() { + # Stripping symbols should be the choice of the user. + sed -i '/strip = "symbols"/d' Cargo.toml || die "Unable to patch out symbol stripping" + + eapply_user +} + +src_configure() { + myfeatures=( + $(usev mdict) + $(usev clip) + $(usev calc) + $(usev hyprwin) + ) + + cargo_src_configure --no-default-features +} + +src_install() { + cargo_src_install + + # TODO: look out for this in the future + # sed -i 's/Icon=io\.github\.dimtpap\.coppwr/Icon=coppwr/' assets/io.github.dimtpap.coppwr.desktop + # domenu assets/io.github.dimtpap.coppwr.desktop + + mv data/logo.svg data/rglauncher.svg + doicon data/rglauncher.svg +}