diff options
Diffstat (limited to 'media-libs/quirc')
-rw-r--r-- | media-libs/quirc/quirc-1.2-r1.ebuild (renamed from media-libs/quirc/quirc-1.2.ebuild) | 15 | ||||
-rw-r--r-- | media-libs/quirc/quirc-9999.ebuild | 15 |
2 files changed, 20 insertions, 10 deletions
diff --git a/media-libs/quirc/quirc-1.2.ebuild b/media-libs/quirc/quirc-1.2-r1.ebuild index 3f7560659bd6..6264615597ee 100644 --- a/media-libs/quirc/quirc-1.2.ebuild +++ b/media-libs/quirc/quirc-1.2-r1.ebuild @@ -6,7 +6,7 @@ EAPI=8 DESCRIPTION="QR decoder library" HOMEPAGE="https://github.com/dlbeer/quirc" -inherit multilib-minimal +inherit flag-o-matic multilib-minimal toolchain-funcs if [[ ${PV} = *9999* ]] ; then inherit git-r3 @@ -21,6 +21,7 @@ fi DEPEND=" media-libs/libjpeg-turbo:= media-libs/libpng:= + media-libs/libsdl:= opencv? ( media-libs/opencv:= ) sdl? ( media-libs/sdl-gfx:= ) " @@ -34,8 +35,9 @@ 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.${PV}#g" \ + -e "s#\.o libquirc.a#.o libquirc.so.${LIB_VERSION}#g" \ -e '/^QUIRC_CFLAGS/ s/$/ -fPIC/' \ -i Makefile || die @@ -44,6 +46,8 @@ src_prepare() { } multilib_src_configure() { + tc-export CC CXX + targets=( libquirc.so ) use opencv && targets+=( opencv ) use sdl && targets+=( sdl ) @@ -52,13 +56,14 @@ multilib_src_configure() { } multilib_src_compile() { + append-ldflags "-Wl,-soname,lib${QUIRC}.so.${LIB_VERSION}" emake V=1 DESTDIR="${D}" PREFIX="${EPREFIX}/usr" "${targets[@]}" } multilib_src_install() { - dolib.so "libquirc.so.${PV}" - dosym "libquirc.so.${PV}" "${EPREFIX}/usr/$(get_libdir)/libquirc.so" - dosym "libquirc.so.${PV}" "${EPREFIX}/usr/$(get_libdir)/libquirc.so.$(ver_cut 1)" + 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}" diff --git a/media-libs/quirc/quirc-9999.ebuild b/media-libs/quirc/quirc-9999.ebuild index 3f7560659bd6..6264615597ee 100644 --- a/media-libs/quirc/quirc-9999.ebuild +++ b/media-libs/quirc/quirc-9999.ebuild @@ -6,7 +6,7 @@ EAPI=8 DESCRIPTION="QR decoder library" HOMEPAGE="https://github.com/dlbeer/quirc" -inherit multilib-minimal +inherit flag-o-matic multilib-minimal toolchain-funcs if [[ ${PV} = *9999* ]] ; then inherit git-r3 @@ -21,6 +21,7 @@ fi DEPEND=" media-libs/libjpeg-turbo:= media-libs/libpng:= + media-libs/libsdl:= opencv? ( media-libs/opencv:= ) sdl? ( media-libs/sdl-gfx:= ) " @@ -34,8 +35,9 @@ 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.${PV}#g" \ + -e "s#\.o libquirc.a#.o libquirc.so.${LIB_VERSION}#g" \ -e '/^QUIRC_CFLAGS/ s/$/ -fPIC/' \ -i Makefile || die @@ -44,6 +46,8 @@ src_prepare() { } multilib_src_configure() { + tc-export CC CXX + targets=( libquirc.so ) use opencv && targets+=( opencv ) use sdl && targets+=( sdl ) @@ -52,13 +56,14 @@ multilib_src_configure() { } multilib_src_compile() { + append-ldflags "-Wl,-soname,lib${QUIRC}.so.${LIB_VERSION}" emake V=1 DESTDIR="${D}" PREFIX="${EPREFIX}/usr" "${targets[@]}" } multilib_src_install() { - dolib.so "libquirc.so.${PV}" - dosym "libquirc.so.${PV}" "${EPREFIX}/usr/$(get_libdir)/libquirc.so" - dosym "libquirc.so.${PV}" "${EPREFIX}/usr/$(get_libdir)/libquirc.so.$(ver_cut 1)" + 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}" |