dev-libs/qrcodegen: respect ${EPREFIX} for installation

Add ${PV} as suffix to shared lib, as intended in the patches
Fix variable order

Signed-off-by: Lucio Sauer <watermanpaint@posteo.net>
This commit is contained in:
Lucio Sauer
2024-04-27 19:18:19 +02:00
parent 3444503132
commit 9321d33a5a

View File

@@ -1,4 +1,4 @@
# Copyright 1999-2023 Gentoo Authors
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Forked from : https://github.com/gentoo-mirror/pg_overlay/blob/master/dev-libs/qrcodegen
@@ -9,36 +9,29 @@ DESCRIPTION="High-quality QR Code generator library"
HOMEPAGE="https://www.nayuki.io/page/qr-code-generator-library"
SRC_URI="https://github.com/nayuki/QR-Code-generator/archive/v${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/QR-Code-generator-${PV}"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
DEPEND="${RDEPEND}
${PYTHON_DEPS}"
S=${WORKDIR}/QR-Code-generator-${PV}
PATCHES=( "${FILESDIR}/c_makefile_generate_libraries.patch" )
PATCHES+=( "${FILESDIR}/cpp_makefile_generate_libraries.patch" )
PATCHES=(
"${FILESDIR}/c_makefile_generate_libraries.patch"
"${FILESDIR}/cpp_makefile_generate_libraries.patch"
)
src_compile() {
pushd c
emake
popd
pushd cpp
emake
popd
for dir in c cpp
do
emake -C ${dir}
done
}
src_install() {
pushd c
emake DESTDIR="${D}" install-header
emake DESTDIR="${D}" LIBDIR="${D}"/usr/$(get_libdir) install-shared
popd
pushd cpp
emake DESTDIR="${D}" install-header
emake DESTDIR="${D}" LIBDIR="${D}"/usr/$(get_libdir) install-shared
popd
local -x DESTDIR="${ED}"
for dir in c cpp
do
emake -C ${dir} install-header
emake -C ${dir} LIBDIR="${ED}"/usr/$(get_libdir) VERSION=${PV} install-shared
done
}