mirror of
https://anongit.gentoo.org/git/repo/gentoo.git
synced 2025-06-15 19:37:25 +02:00
... to avoid installing broken static libraries w/ LTO. There is build switch for static libraries, but it doesn't apply to all static libraries and it would require a revbump to add. Closes: https://bugs.gentoo.org/957922 Signed-off-by: Alfred Wingate <parona@protonmail.com> Part-of: https://github.com/gentoo/gentoo/pull/42558 Closes: https://github.com/gentoo/gentoo/pull/42558 Signed-off-by: Sam James <sam@gentoo.org>
62 lines
1.1 KiB
Bash
62 lines
1.1 KiB
Bash
# Copyright 2025 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
EAPI=8
|
|
|
|
inherit cmake desktop dot-a 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 ~riscv"
|
|
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() {
|
|
lto-guarantee-fat
|
|
|
|
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
|
|
|
|
strip-lto-bytecode
|
|
}
|