mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-24 06:48:18 -07:00
... to avoid installing broken static libraries w/ LTO. Also, add missing einstalldocs call. Bug: https://bugs.gentoo.org/968594 Signed-off-by: Sam James <sam@gentoo.org>
51 lines
1.1 KiB
Bash
51 lines
1.1 KiB
Bash
# Copyright 1999-2026 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
EAPI=8
|
|
|
|
inherit dot-a multilib-minimal usr-ldscript
|
|
|
|
DESCRIPTION="An extremely fast compression and decompression library"
|
|
HOMEPAGE="https://www.oberhumer.com/opensource/lzo/"
|
|
SRC_URI="https://www.oberhumer.com/opensource/lzo/download/${P}.tar.gz"
|
|
|
|
LICENSE="GPL-2+"
|
|
SLOT="2"
|
|
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~x64-macos ~x64-solaris"
|
|
IUSE="examples static-libs"
|
|
|
|
src_configure() {
|
|
use static-libs && lto-guarantee-fat
|
|
multilib-minimal_src_configure
|
|
}
|
|
|
|
multilib_src_configure() {
|
|
ECONF_SOURCE=${S} \
|
|
econf \
|
|
--enable-shared \
|
|
$(use_enable static-libs static)
|
|
}
|
|
|
|
multilib_src_test() {
|
|
emake test
|
|
}
|
|
|
|
multilib_src_install() {
|
|
emake DESTDIR="${D}" install
|
|
gen_usr_ldscript -a lzo2
|
|
}
|
|
|
|
multilib_src_install_all() {
|
|
einstalldocs
|
|
strip-lto-bytecode
|
|
|
|
rm "${ED}"/usr/share/doc/${PF}/COPYING || die
|
|
|
|
if use examples; then
|
|
docinto examples
|
|
dodoc examples/*.{c,h}
|
|
fi
|
|
|
|
find "${ED}" -name '*.la' -delete || die
|
|
}
|