diff options
author | Horodniceanu Andrei <a.horodniceanu@proton.me> | 2023-08-29 17:59:07 +0300 |
---|---|---|
committer | Conrad Kostecki <conikost@gentoo.org> | 2023-08-30 20:30:01 +0200 |
commit | a13cf65c6083a6edf98b1fbf505c348d664097df (patch) | |
tree | 296c924faec4e9d7b54e046c7c2f7fe3474d1611 /dev-libs/libmpack | |
parent | dev-scheme/chez: drop old 9.6.0 (diff) | |
download | gentoo-a13cf65c6083a6edf98b1fbf505c348d664097df.tar.gz gentoo-a13cf65c6083a6edf98b1fbf505c348d664097df.tar.bz2 gentoo-a13cf65c6083a6edf98b1fbf505c348d664097df.zip |
dev-libs/libmpack: Don't compile during src_install
Signed-off-by: Horodniceanu Andrei <a.horodniceanu@proton.me>
Closes: https://github.com/gentoo/gentoo/pull/32514
Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
Diffstat (limited to 'dev-libs/libmpack')
-rw-r--r-- | dev-libs/libmpack/libmpack-1.0.5-r4.ebuild | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/dev-libs/libmpack/libmpack-1.0.5-r4.ebuild b/dev-libs/libmpack/libmpack-1.0.5-r4.ebuild new file mode 100644 index 000000000000..2b6ab319eef8 --- /dev/null +++ b/dev-libs/libmpack/libmpack-1.0.5-r4.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools toolchain-funcs + +DESCRIPTION="Simple implementation of msgpack in C" +HOMEPAGE="https://github.com/libmpack/libmpack" +SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~x64-macos" + +PATCHES=( + "${FILESDIR}"/${P}-libtool.patch # 778899 +) + +src_prepare() { + default + + # Respect users CFLAGS + sed -e 's/-ggdb//g' -i Makefile.in || die + sed -e 's/-O3//g' -i .config/release.mk || die + + eautoreconf +} + +src_compile() { + local myemakeargs=( + "VERBOSE=1" + "PREFIX=${EPREFIX}/usr" + "CC=$(tc-getCC)" + "config=release" + "LIBDIR=${EPREFIX}/usr/$(get_libdir)" + "INCDIR=${EPREFIX}/usr/include" + ) + + emake "${myemakeargs[@]}" lib-bin +} + +src_test() { + emake VERBOSE=1 XLDFLAGS="-shared" test +} + +src_install() { + local myemakeargs=( + "VERBOSE=1" + "PREFIX=${EPREFIX}/usr" + "DESTDIR=${D}" + "config=release" + "LIBDIR=${EPREFIX}/usr/$(get_libdir)" + "INCDIR=${EPREFIX}/usr/include" + "XLDFLAGS=-shared" + ) + + emake "${myemakeargs[@]}" install + + if [[ ${CHOST} == *-darwin* ]] ; then + local file="libmpack.0.0.0.dylib" + install_name_tool \ + -id "${EPREFIX}/usr/$(get_libdir)/${file}" \ + "${ED}/usr/$(get_libdir)/${file}" \ + || die "Failed to adjust install_name" + fi + + find "${ED}" -name '*.la' -delete || die +} |