diff options
author | Paul Zander <negril.nx+gentoo@gmail.com> | 2024-03-23 14:12:24 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2024-03-23 13:38:01 +0000 |
commit | 89f3d5d1f9ff6c6abd6427fbc839cb0d6108410e (patch) | |
tree | e54665db1c7b2227898ef383f70c472f76f0d4ce /media-libs/quirc/quirc-1.2-r2.ebuild | |
parent | dev-util/cargo-c: add 0.9.31 (diff) | |
download | gentoo-89f3d5d1f9ff6c6abd6427fbc839cb0d6108410e.tar.gz gentoo-89f3d5d1f9ff6c6abd6427fbc839cb0d6108410e.tar.bz2 gentoo-89f3d5d1f9ff6c6abd6427fbc839cb0d6108410e.zip |
media-libs/quirc: fix so name
Closes: https://bugs.gentoo.org/927381
Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/35873
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-libs/quirc/quirc-1.2-r2.ebuild')
-rw-r--r-- | media-libs/quirc/quirc-1.2-r2.ebuild | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/media-libs/quirc/quirc-1.2-r2.ebuild b/media-libs/quirc/quirc-1.2-r2.ebuild new file mode 100644 index 000000000000..677271f2e53e --- /dev/null +++ b/media-libs/quirc/quirc-1.2-r2.ebuild @@ -0,0 +1,92 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="QR decoder library" +HOMEPAGE="https://github.com/dlbeer/quirc" + +inherit flag-o-matic multilib-minimal toolchain-funcs + +if [[ ${PV} = *9999* ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/dlbeer/${PN}.git" +else + SRC_URI=" + https://github.com/dlbeer/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz + " + KEYWORDS="~amd64 ~x86" +fi + +DEPEND=" + media-libs/libjpeg-turbo:= + media-libs/libpng:= + media-libs/libsdl:= + opencv? ( media-libs/opencv:= ) + sdl? ( media-libs/sdl-gfx:= ) +" +RDEPEND=" + ${DEPEND} +" + +LICENSE="ISC" +SLOT="0/${PV}" + +IUSE="opencv sdl tools v4l" + +src_prepare() { + LIB_VERSION=$(grep '^LIB_VERSION = ' "${S}/Makefile" | cut -d ' ' -f 3 || die) + sed -r \ + -e "s#\.o libquirc.a#.o libquirc.so.${LIB_VERSION}#g" \ + -e '/^QUIRC_CFLAGS/ s/$/ -fPIC/' \ + -i Makefile || die + + default + multilib_copy_sources +} + +multilib_src_configure() { + tc-export CC CXX + + targets=( libquirc.so ) + use opencv && targets+=( opencv ) + use sdl && targets+=( sdl ) + use tools && targets+=( qrtest ) + use v4l && targets+=( v4l ) +} + +multilib_src_compile() { + append-ldflags "-Wl,-soname,libquirc.so.${LIB_VERSION}" + emake V=1 DESTDIR="${D}" PREFIX="${EPREFIX}/usr" "${targets[@]}" +} + +multilib_src_install() { + dolib.so "libquirc.so.${LIB_VERSION}" + dosym "libquirc.so.${LIB_VERSION}" "${EPREFIX}/usr/$(get_libdir)/libquirc.so" + dosym "libquirc.so.${LIB_VERSION}" "${EPREFIX}/usr/$(get_libdir)/libquirc.so.$(ver_cut 1 "${LIB_VERSION}")" + + if multilib_is_native_abi; then + into "/usr/libexec/${PN}" + if use opencv; then + dobin inspect-opencv + dobin quirc-demo-opencv + fi + + if use sdl; then + dobin inspect + dobin quirc-demo + fi + + if use tools; then + dobin qrtest + fi + + if use v4l; then + dobin quirc-scanner + fi + fi +} + +multilib_src_install_all() { + doheader lib/quirc.h +} |