# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit xdg-utils

DESCRIPTION="Mint-X icon theme for Linux Mint (based on Faenza and Elementary)"
HOMEPAGE="https://github.com/linuxmint/mint-x-icons"

MY_PN="mint-x-icons"
MY_P="${MY_PN}_${PV}"
SRC_URI="http://packages.linuxmint.com/pool/main/m/${MY_PN}/${MY_P}.tar.xz"
S="${WORKDIR}/${MY_PN}"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"

RDEPEND="x11-libs/gdk-pixbuf"
BDEPEND="dev-util/gtk-update-icon-cache"

src_prepare() {
	default
	find . -type d -exec chmod 755 {} + || die
	find . -type f -exec chmod 644 {} + || die
}

src_install() {
	insinto /usr/share/icons
	doins -r usr/share/icons/.
}

pkg_postinst() {
	xdg_icon_cache_update
}

pkg_postrm() {
	xdg_icon_cache_update
}