devel/mustach: Remove old patch, fix macOS build - test6/Makefile patch is merged upstream - Fix macOS breakage caused by -soname usediff -r1.8 -r1.9 pkgsrc/devel/mustach/Makefile
(sjmulder)
@@ -1,29 +1,30 @@ | @@ -1,29 +1,30 @@ | |||
1 | # $NetBSD: Makefile,v 1.8 2021/11/20 00:31:10 sjmulder Exp $ | 1 | # $NetBSD: Makefile,v 1.9 2022/04/17 20:00:34 sjmulder Exp $ | |
2 | 2 | |||
3 | DISTNAME= mustach-1.2.2 | 3 | DISTNAME= mustach-1.2.2 | |
4 | PKGREVISION= 1 | |||
4 | CATEGORIES= devel | 5 | CATEGORIES= devel | |
5 | MASTER_SITES= https://gitlab.com/jobol/mustach/-/archive/${PKGVERSION_NOREV}/ | 6 | MASTER_SITES= https://gitlab.com/jobol/mustach/-/archive/${PKGVERSION_NOREV}/ | |
6 | 7 | |||
7 | MAINTAINER= sjmulder@NetBSD.org | 8 | MAINTAINER= sjmulder@NetBSD.org | |
8 | HOMEPAGE= https://gitlab.com/jobol/mustach | 9 | HOMEPAGE= https://gitlab.com/jobol/mustach | |
9 | COMMENT= C implementation of mustache templating | 10 | COMMENT= C implementation of mustache templating | |
10 | LICENSE= apache-2.0 | 11 | LICENSE= apache-2.0 | |
11 | 12 | |||
12 | # 'test' is basic-tests and spec-tests, which downloads files with git | 13 | # 'test' is basic-tests and spec-tests, which downloads files with git | |
13 | TEST_TARGET= basic-tests | 14 | TEST_TARGET= basic-tests | |
14 | TEST_DEPENDS+= valgrind-[0-9]*:../../devel/valgrind | 15 | TEST_DEPENDS+= valgrind-[0-9]*:../../devel/valgrind | |
15 | 16 | |||
16 | USE_TOOLS+= gmake gsed pkg-config | 17 | USE_TOOLS+= gmake gsed pkg-config | |
17 | 18 | |||
18 | .include "../../mk/bsd.prefs.mk" | 19 | .include "../../mk/bsd.prefs.mk" | |
19 | 20 | |||
20 | # Workaround is portable, might as well use it everywhere. | 21 | # Workaround is portable, might as well use it everywhere. | |
21 | CFLAGS+= -DNO_OPEN_MEMSTREAM | 22 | CFLAGS+= -DNO_OPEN_MEMSTREAM | |
22 | 23 | |||
23 | MAKE_ENV+= MANDIR=${PREFIX}/${PKGMANDIR} | 24 | MAKE_ENV+= MANDIR=${PREFIX}/${PKGMANDIR} | |
24 | MAKE_ENV+= libs=single | 25 | MAKE_ENV+= libs=single | |
25 | 26 | |||
26 | # mustach supports cjson too, add it here once in pkgsrc | 27 | # mustach supports cjson too, add it here once in pkgsrc | |
27 | .include "../../textproc/jansson/buildlink3.mk" | 28 | .include "../../textproc/jansson/buildlink3.mk" | |
28 | .include "../../textproc/json-c/buildlink3.mk" | 29 | .include "../../textproc/json-c/buildlink3.mk" | |
29 | .include "../../mk/bsd.pkg.mk" | 30 | .include "../../mk/bsd.pkg.mk" |
@@ -1,6 +1,6 @@ | @@ -1,6 +1,6 @@ | |||
1 | $NetBSD: distinfo,v 1.7 2021/11/20 00:31:10 sjmulder Exp $ | 1 | $NetBSD: distinfo,v 1.8 2022/04/17 20:00:34 sjmulder Exp $ | |
2 | 2 | |||
3 | BLAKE2s (mustach-1.2.2.tar.gz) = bfb5bb378dd3f9535a7188bd81d9624242b85f5f30364dc0c8bb179badb1b265 | 3 | BLAKE2s (mustach-1.2.2.tar.gz) = bfb5bb378dd3f9535a7188bd81d9624242b85f5f30364dc0c8bb179badb1b265 | |
4 | SHA512 (mustach-1.2.2.tar.gz) = d714dd5a0c58d9bd23826cd56f91b0ad04ff0bb0733b0dfca41100219436ab90b42b8fd3878932f5101cfd2a4f6ae3c85dcaea9010521ef1a17dd00e980363a7 | 4 | SHA512 (mustach-1.2.2.tar.gz) = d714dd5a0c58d9bd23826cd56f91b0ad04ff0bb0733b0dfca41100219436ab90b42b8fd3878932f5101cfd2a4f6ae3c85dcaea9010521ef1a17dd00e980363a7 | |
5 | Size (mustach-1.2.2.tar.gz) = 36229 bytes | 5 | Size (mustach-1.2.2.tar.gz) = 36229 bytes | |
6 | SHA1 (patch-test6_Makefile) = 59d63febabaad20b880ed440587d12d3c5a40599 | 6 | SHA1 (patch-Makefile) = c24272ce1671a9bce63cef16a52289260842826a |
$NetBSD: patch-Makefile,v 1.1 2022/04/17 20:00:34 sjmulder Exp $
Don't use -soname on macOS.
https://gitlab.com/jobol/mustach/-/merge_requests/26
--- Makefile.orig 2022-04-17 19:51:45.000000000 +0000
+++ Makefile
@@ -148,11 +148,17 @@ $(info cjson = ${cjson})
override CFLAGS += -fPIC -Wall -Wextra -DVERSION=${VERSION}
ifeq ($(shell uname),Darwin)
- darwin_single = -install_name $(LIBDIR)/libmustach.so$(SOVEREV)
- darwin_core = -install_name $(LIBDIR)/libmustach-core.so$(SOVEREV)
- darwin_cjson = -install_name $(LIBDIR)/libmustach-cjson.so$(SOVEREV)
- darwin_jsonc = -install_name $(LIBDIR)/libmustach-json-c.so$(SOVEREV)
- darwin_jansson = -install_name $(LIBDIR)/libmustach-jansson.so$(SOVEREV)
+ LDFLAGS_single += -install_name $(LIBDIR)/libmustach.so$(SOVEREV)
+ LDFLAGS_core += -install_name $(LIBDIR)/libmustach-core.so$(SOVEREV)
+ LDFLAGS_cjson += -install_name $(LIBDIR)/libmustach-cjson.so$(SOVEREV)
+ LDFLAGS_jsonc += -install_name $(LIBDIR)/libmustach-json-c.so$(SOVEREV)
+ LDFLAGS_jansson += -install_name $(LIBDIR)/libmustach-jansson.so$(SOVEREV)
+else
+ LDFLAGS_single += -Wl,-soname,libmustach.so$(SOVER)
+ LDFLAGS_core += -Wl,-soname,libmustach-core.so$(SOVER)
+ LDFLAGS_cjson += -Wl,-soname,libmustach-cjson.so$(SOVER)
+ LDFLAGS_jsonc += -Wl,-soname,libmustach-json-c.so$(SOVER)
+ LDFLAGS_jansson += -Wl,-soname,libmustach-jansson.so$(SOVER)
endif
# targets
@@ -164,19 +170,19 @@ mustach: $(TOOLOBJS)
$(CC) $(LDFLAGS) $(TOOLFLAGS) -o mustach $(TOOLOBJS) $(TOOLLIBS)
libmustach.so$(SOVEREV): $(SINGLEOBJS)
- $(CC) -shared -Wl,-soname,libmustach.so$(SOVER) $(LDFLAGS) $(darwin_single) -o $@ $^ $(SINGLELIBS)
+ $(CC) -shared $(LDFLAGS) $(LDFLAGS_single) -o $@ $^ $(SINGLELIBS)
libmustach-core.so$(SOVEREV): $(COREOBJS)
- $(CC) -shared -Wl,-soname,libmustach-core.so$(SOVER) $(LDFLAGS) $(darwin_core) -o $@ $(COREOBJS) $(lib_OBJ)
+ $(CC) -shared $(LDFLAGS) $(LDFLAGS_core) -o $@ $(COREOBJS) $(lib_OBJ)
libmustach-cjson.so$(SOVEREV): $(COREOBJS) mustach-cjson.o
- $(CC) -shared -Wl,-soname,libmustach-cjson.so$(SOVER) $(LDFLAGS) $(darwin_cjson) -o $@ $^ $(cjson_libs)
+ $(CC) -shared $(LDFLAGS) $(LDFLAGS_cjson) -o $@ $^ $(cjson_libs)
libmustach-json-c.so$(SOVEREV): $(COREOBJS) mustach-json-c.o
- $(CC) -shared -Wl,-soname,libmustach-json-c.so$(SOVER) $(LDFLAGS) $(darwin_jsonc) -o $@ $^ $(jsonc_libs)
+ $(CC) -shared $(LDFLAGS) $(LDFLAGS_jsonc) -o $@ $^ $(jsonc_libs)
libmustach-jansson.so$(SOVEREV): $(COREOBJS) mustach-jansson.o
- $(CC) -shared -Wl,-soname,libmustach-jansson.so$(SOVER) $(LDFLAGS) $(darwin_jansson) -o $@ $^ $(jansson_libs)
+ $(CC) -shared $(LDFLAGS) $(LDFLAGS_jansson) -o $@ $^ $(jansson_libs)
# pkgconfigs