diff options
Diffstat (limited to 'x11-themes/tela-icon-theme/tela-icon-theme-99999999.ebuild')
-rw-r--r-- | x11-themes/tela-icon-theme/tela-icon-theme-99999999.ebuild | 91 |
1 files changed, 56 insertions, 35 deletions
diff --git a/x11-themes/tela-icon-theme/tela-icon-theme-99999999.ebuild b/x11-themes/tela-icon-theme/tela-icon-theme-99999999.ebuild index 3a0301169077..d8088e9cffda 100644 --- a/x11-themes/tela-icon-theme/tela-icon-theme-99999999.ebuild +++ b/x11-themes/tela-icon-theme/tela-icon-theme-99999999.ebuild @@ -1,70 +1,91 @@ -# Copyright 2022-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -inherit edo +inherit check-reqs edo xdg -# eg. 20211225 -> 2021-12-25 -MY_PV="${PV:0:4}-${PV:4:2}-${PV:6:2}" MY_PN="${PN^}" - -# standard comes first -MY_COLOR_VARIANTS=( standard black blue brown green grey orange pink purple red yellow manjaro ubuntu dracula nord ) - -inherit xdg +MY_PV="${PV:0:4}-${PV:4:2}-${PV:6:2}" # eg. 20211225 -> 2021-12-25 DESCRIPTION="A flat colorful Design icon theme" HOMEPAGE="https://github.com/vinceliuice/Tela-icon-theme" -if [[ ${PV} == 99999999 ]]; then +if [[ "${PV}" == 99999999 ]]; then inherit git-r3 - EGIT_REPO_URI="https://github.com/vinceliuice/${MY_PN}.git" + + EGIT_REPO_URI="https://github.com/vinceliuice/Tela-icon-theme.git" else - SRC_URI="https://github.com/vinceliuice/${MY_PN}/archive/refs/tags/${MY_PV}.tar.gz -> ${P}.tar.gz" + SRC_URI="https://github.com/vinceliuice/Tela-icon-theme/archive/refs/tags/${MY_PV}.tar.gz -> ${P}.tar.gz" KEYWORDS="~amd64 ~arm64 ~ppc64" S="${WORKDIR}/${MY_PN}-${MY_PV}" fi LICENSE="GPL-3+" SLOT="0" -IUSE="+${MY_COLOR_VARIANTS[*]} +hardlink kde" # this is why standard comes first - -REQUIRED_USE="|| ( ${MY_COLOR_VARIANTS[*]} )" - -# not needed and slows us down, package installs 120 000 small files +IUSE="+hardlink kde minimal" RESTRICT="binchecks strip test" -# technically we can use app-arch/hardlink too, but it's deprecated BDEPEND=" app-shells/bash - hardlink? ( sys-apps/util-linux[hardlink(-)?] ) + hardlink? ( sys-apps/util-linux[hardlink] ) " +DOCS=( + AUTHORS + README.md + tela-dark.png + tela-light.png +) + +tela-icon-theme_check-reqs() { + if ! use minimal; then + if use hardlink; then + CHECKREQS_DISK_USR=1700M + else + CHECKREQS_DISK_USR=2600M + fi + + check-reqs_${EBUILD_PHASE_FUNC} + fi +} + +pkg_setup() { + tela-icon-theme_check-reqs +} + +pkg_pretend() { + tela-icon-theme_check-reqs +} + src_prepare() { default - # we use eclass for that - sed -i '/gtk-update-icon-cache/d' install.sh || die + + # We use eclass for that. + sed -i "/gtk-update-icon-cache/d" install.sh || die } src_install() { - local v variants=( - $(for v in ${MY_COLOR_VARIANTS[@]}; do - usev ${v} - done) - $(usev kde '-c') - ) + einstalldocs dodir /usr/share/icons - ./install.sh -d "${ED}/usr/share/icons" "${variants[@]}" || die - if use hardlink; then - einfo "Linking duplicate icons... (may take a long time)" - hardlink -pot "${ED}/usr/share/icons" || die "hardlink failed" + + local options=() + + use kde && options+=( -c ) + + if use minimal; then + options+=( standard ) + else + options+=( -a ) fi - # installs broken symlink (by design, but we remove it due to QA warnings) - # https://bugs.gentoo.org/830467 - edob find "${ED}" -xtype l -print -delete + edob ./install.sh -d "${ED}/usr/share/icons" "${options[@]}" - einstalldocs + use hardlink && \ + edob -m "Linking duplicate icons" hardlink -pot "${ED}/usr/share/icons" + + # Installs broken symlinks (by design, but we remove it due to QA warnings). + # https://bugs.gentoo.org/830467 + edob -m "Removing broken symlinks" find "${ED}" -xtype l -print -delete } |