diff options
Diffstat (limited to 'dev-libs/libmpack')
-rw-r--r-- | dev-libs/libmpack/Manifest | 2 | ||||
-rw-r--r-- | dev-libs/libmpack/files/libmpack-1.0.5-libtool.patch | 89 | ||||
-rw-r--r-- | dev-libs/libmpack/libmpack-1.0.5-r3.ebuild | 63 |
3 files changed, 154 insertions, 0 deletions
diff --git a/dev-libs/libmpack/Manifest b/dev-libs/libmpack/Manifest index 0934eb9733b9..5d6458d8b694 100644 --- a/dev-libs/libmpack/Manifest +++ b/dev-libs/libmpack/Manifest @@ -1,3 +1,5 @@ +AUX libmpack-1.0.5-libtool.patch 2022 BLAKE2B 1b1104b35a79d1bd3595353ec238fd13ece6a369d10999a5c7b627a7c9a98a24fad880970cda5d324cd95e434ae4f31e044ff6702a307f7811bf0833372afbb9 SHA512 dcb0029018df34aa5530ef6f9f0c8ffec7d33288e8854273db98c823f03663d260837c80846acf5571400dd0f78588f26fe62b20a2f9469c09f22189b0a65fff DIST libmpack-1.0.5.tar.gz 32966 BLAKE2B 8ad01de11c740c3efc7b42046b89f7691dd32d228e126485bc49224e54789e7f12a611982c0fd9d2bbe8b06d1ce2df1ceea1b302e139e30d0a8c31f251129166 SHA512 6e30edafcacfb580b410bc6749ed7fe8f18b3be0cb98959339853e77bc3ec0cda6df08a0f1f22768cfc773458a2ea6bcef4f0421eea55cf56c58981d13711a04 EBUILD libmpack-1.0.5-r2.ebuild 1298 BLAKE2B 105ad8baeabbc915a33cbbc2d2a62aa6e37b422f969533ca38293bf9299ad67d3b29be8ef20190ee692d56357c67d111a7b5ab0d989f74bf13bc7bb69ed8c6ca SHA512 a3395fa0d99cf4913040c0318e28115e8ade54fa44cdc76fcddc173744b054f646d0680fdb3a2f3e2ce46a44526787b5868c02b5552544dd2f8a9aed1c4cd46e +EBUILD libmpack-1.0.5-r3.ebuild 1338 BLAKE2B b6dea0a251618a778858329c60061e9be4b010bce61971418bd4a7eb04cc0f9c8a4ba8a5c4e74eb9570a2d46df41b85656898dae690fcc4156e55d499df600ef SHA512 4ef6cae229e65c1e77af51a3afc2905285a44710ac90809be617fcc009e17914fd1bb6481a75052d547ef0d08c7d0ea9c60beaaec7c31ede8312243c89fb6062 MISC metadata.xml 333 BLAKE2B f3e54e3a241a85adad55693f7dd3cc47cc646d1432b4281c264c849fb2a2bfc050aee53f5ae766063335b72c3ca91ed9054bac758d82c969acb61913f7282940 SHA512 aa83f4113099ecf8b749a070014b9d9c09fc1c0d4836f2cf621b2966088cf3ee73e26ab4f365063713db353671ad5937f98ffe4c87762c6e196cd57c8eb595ea diff --git a/dev-libs/libmpack/files/libmpack-1.0.5-libtool.patch b/dev-libs/libmpack/files/libmpack-1.0.5-libtool.patch new file mode 100644 index 000000000000..59ebd91fc9e4 --- /dev/null +++ b/dev-libs/libmpack/files/libmpack-1.0.5-libtool.patch @@ -0,0 +1,89 @@ +https://bugs.gentoo.org/778899 + +Author: orbea <orbea@riseup.net> +Date: Fri Jun 17 17:29:51 2022 -0700 + + configure: Add minimal configure.ac for libtool + +diff --git a/Makefile b/Makefile.in +similarity index 92% +rename from Makefile +rename to Makefile.in +index 76cfd35..2c05a99 100644 +--- a/Makefile ++++ b/Makefile.in +@@ -4,11 +4,9 @@ + config ?= debug + SYSTEM ?= $(shell uname -s) + +-ifeq ($(SYSTEM),Darwin) +- LIBTOOL ?= glibtool +-else +- LIBTOOL ?= libtool +-endif ++top_builddir = @top_builddir@ ++ ++LIBTOOL := @LIBTOOL@ + + ifneq ($(VERBOSE),1) + LIBTOOL += --quiet +@@ -33,11 +31,11 @@ else + XCFLAGS += -std=c99 + endif + +-NAME := mpack +-MAJOR := 1 +-MINOR := 0 +-PATCH := 3 +-VERSION := $(MAJOR).$(MINOR).$(PATCH) ++NAME := @PACKAGE_NAME@ ++MAJOR := @MAJOR@ ++MINOR := @MINOR@ ++PATCH := @PATCH@ ++VERSION := @PACKAGE_VERSION@ + + LT_REVISION=0 + LT_CURRENT=0 +@@ -130,6 +128,11 @@ clean: + $(TOBJ): XCFLAGS := $(filter-out $(TEST_FILTER_OUT),$(XCFLAGS)) \ + -std=gnu99 -Wno-conversion -Wno-unused-parameter + ++$(OUTDIR)/.tag: ++ @mkdir -p $(OUTDIR)/$(SRCDIR) ++ @mkdir -p $(OUTDIR)/$(TESTDIR)/deps/tap ++ @touch $@ ++ + $(COVOUT): $(SRC) $(TSRC) + find $(OUTDIR) -type f -name '*.gcda' -print0 | xargs -0 rm -f + $(MAKE) CFLAGS='-DNDEBUG -g --coverage' LDFLAGS=--coverage config=$(config) test +@@ -142,7 +145,7 @@ $(PROFOUT): $(SRC) $(TSRC) + gprof $(OUTDIR)/run-tests gmon.out > $@ + rm gmon.out + +-$(OUTDIR)/%.lo: %.c $(AMALG) ++$(OUTDIR)/%.lo: %.c $(AMALG) $(OUTDIR)/.tag + @echo compile $< =\> $@ + @$(LIBTOOL) --mode=compile --tag=CC $(CC) $(XCFLAGS) $(CFLAGS) -o $@ -c $< + +diff --git a/configure.ac b/configure.ac +new file mode 100644 +index 0000000..d2f02e7 +--- /dev/null ++++ b/configure.ac +@@ -0,0 +1,16 @@ ++m4_define([MAJOR], [1]) ++m4_define([MINOR], [0]) ++m4_define([PATCH], [5]) ++ ++AC_INIT([mpack], [MAJOR.MINOR.PATCH]) ++AC_CONFIG_FILES([Makefile]) ++ ++LT_INIT ++ ++AC_SUBST([top_builddir], [$abs_builddir]) ++ ++AC_SUBST([MAJOR], [MAJOR]) ++AC_SUBST([MINOR], [MINOR]) ++AC_SUBST([PATCH], [PATCH]) ++ ++AC_OUTPUT 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 +} |