EAPI=8

inherit meson

DESCRIPTION="A rofi inspired native client for web services"
HOMEPAGE="https://git.dec05eba.com/QuickMedia"

SRC_URI="https://dec05eba.com/files/twemoji.tar.gz"
inherit git-r3
EGIT_REPO_URI="https://repo.dec05eba.com/QuickMedia"
EGIT_SUBMODULES=( '*' )

LICENSE="GPL-3"
SLOT="0"

BDEPEND="
	dev-build/meson
	dev-build/ninja
"
DEPEND="
	${COMMON_DEPENDS}
	media-libs/libglvnd
	x11-libs/libX11
	net-misc/curl
	media-video/mpv
	x11-libs/libXrandr
	media-fonts/noto
"
RDEPEND="
	${DEPEND}
	x11-misc/xdg-utils
	media-video/ffmpeg
	dev-util/source-highlight
	net-misc/yt-dlp
"

src_unpack() {
	git-r3_src_unpack
	mkdir -p "${S}/emoji"
	tar -xzf "${DISTDIR}/twemoji.tar.gz" -C "${S}/emoji"
}

src_configure() {
	local emesonargs=(
		-Dinstall_symlink=true
		-Dinstall_emoji=false
		-Dstrip=true
	)
	meson_src_configure
}

src_install() {
	meson_src_install

	insinto /usr/share/quickmedia
	doins -r emoji
}