new bblfs: dev-libs/libmpack-1.0.5

This commit is contained in:
2026-01-31 01:49:48 -05:00
parent 7307974a88
commit f8cb9dc60f
2 changed files with 148 additions and 0 deletions
+59
View File
@@ -0,0 +1,59 @@
pkgname=libmpack
pkgver=1.0.5
pkgdesc="Simple implementation of msgpack in C"
homepage="https://github.com/libmpack/libmpack"
license=("MIT")
_patches=("${pkgname}-1.0.5-libtool.patch")
_patch_sums=("dcb0029018df34aa5530ef6f9f0c8ffec7d33288e8854273db98c823f03663d260837c80846acf5571400dd0f78588f26fe62b20a2f9469c09f22189b0a65fff")
sources=("${pkgname}-${pkgver}.tar.gz"
"${_patches[@]}"
)
urls=("https://github.com/${pkgname}/${pkgname}/archive/${pkgver}.tar.gz"
"${_patches[@]}"
)
sha512sums=("6e30edafcacfb580b410bc6749ed7fe8f18b3be0cb98959339853e77bc3ec0cda6df08a0f1f22768cfc773458a2ea6bcef4f0421eea55cf56c58981d13711a04"
"${_patch_sums[@]}"
)
src_prepare() {
tar -xf ${distdir}/${sources[0]} --strip-components=1
for _patch in ${_patches[@]}; do
patch -p1 -i ${filedir}/${_patch}
done
# Respect users CFLAGS
sed -e 's/-ggdb//g' -i .config/debug.mk
sed -e 's/-O3//g' -i .config/release.mk
autoreconf -fiv
}
src_build() {
./configure --prefix=/usr --enable-shared --disable-static
local make_args=(
"VERBOSE=1"
"PREFIX=/usr"
"config=release"
"LIBDIR=/usr/lib"
"INCDIR=/usr/include"
)
make "${make_args[@]}" lib-bin
}
src_check() {
make VERBOSE=1 XLDFLAGS="-shared" test
}
src_install() {
local make_args=(
"VERBOSE=1"
"PREFIX=/usr"
"DESTDIR=${pkgdir}"
"config=release"
"LIBDIR=/usr/lib"
"INCDIR=/usr/include"
"XLDFLAGS=-shared"
)
make "${make_args[@]}" install
}
# vim:ft=sh syn=sh et sw=2:
@@ -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