diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-06-29 12:04:12 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-06-29 12:04:12 +0100 |
commit | 0f558761aa2dee1017b4751e4017205e015a9560 (patch) | |
tree | 037df795519468a25d9362b4e95cdaeb84eb1cf9 /dev-libs/libmpack/libmpack-1.0.5-r3.ebuild | |
parent | 752d6256e5204b958b0ef7905675a940b5e9172f (diff) |
gentoo resync : 29.12.2022
Diffstat (limited to 'dev-libs/libmpack/libmpack-1.0.5-r3.ebuild')
-rw-r--r-- | dev-libs/libmpack/libmpack-1.0.5-r3.ebuild | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/dev-libs/libmpack/libmpack-1.0.5-r3.ebuild b/dev-libs/libmpack/libmpack-1.0.5-r3.ebuild new file mode 100644 index 000000000000..ee84302d76e2 --- /dev/null +++ b/dev-libs/libmpack/libmpack-1.0.5-r3.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2022 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=/usr/$(get_libdir)" + ) + + emake "${myemakeargs[@]}" lib-bin +} + +src_test() { + emake VERBOSE=1 XLDFLAGS="-shared" test +} + +src_install() { + local myemakeargs=( + "VERBOSE=1" + "PREFIX=${EPREFIX}/usr" + "DESTDIR=${ED}" + "LIBDIR=/usr/$(get_libdir)" + "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 +} |