gentoo-ebuilds/media-libs/zint/zint-2.14.0.ebuild
Alfred Wingate d1edc2534b
media-libs/zint: new package, add 2.14.0
Signed-off-by: Alfred Wingate <parona@protonmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
2025-02-22 20:51:10 +00:00

58 lines
1 KiB
Bash

# Copyright 2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake desktop xdg
DESCRIPTION="Barcode encoding library supporting over 50 symbologies"
HOMEPAGE="https://www.zint.org.uk/"
SRC_URI="
https://downloads.sourceforge.net/${PN}/${P}-src.tar.gz
"
S="${WORKDIR}/${P}-src"
# see LICENSE
LICENSE="BSD GPL-3+"
SLOT="0/$(ver_cut 1-2)"
KEYWORDS="~amd64"
IUSE="gui png test"
RESTRICT="!test? ( test )"
DEPEND="
gui? (
dev-qt/qtbase:6[gui,widgets]
dev-qt/qtsvg:6
dev-qt/qttools:6[widgets]
)
png? (
media-libs/libpng:=
)
"
RDEPEND="${DEPEND}"
src_configure() {
local mycmakeargs=(
-DZINT_FRONTEND=ON
-DZINT_QT6=$(usex gui)
-DZINT_TEST=$(usex test)
-DZINT_UNINSTALL=OFF
-DZINT_USE_PNG=$(usex png)
-DZINT_USE_QT=$(usex gui)
)
cmake_src_configure
}
src_test() {
local -x QT_QPA_PLATFORM=offscreen
cmake_src_test -j1 # parallel tests cause failures to each other
}
src_install() {
cmake_src_install
einstalldocs
if use gui; then
domenu zint-qt.desktop
doicon zint-qt.png
fi
}