Hi, This diff adds a shared library build target to this port. The upstream makefile builds only a static library. I tested this diff with portcheck tools and build shared and static linked programs with this this library.
Bye, Jan Index: Makefile =================================================================== RCS file: /cvs/ports/devel/libowfat/Makefile,v retrieving revision 1.4 diff -u -p -r1.4 Makefile --- Makefile 28 Sep 2015 16:52:49 -0000 1.4 +++ Makefile 4 Oct 2016 23:34:54 -0000 @@ -1,10 +1,12 @@ # $OpenBSD: Makefile,v 1.4 2015/09/28 16:52:49 jca Exp $ COMMENT = library of general purpose APIs -BROKEN-hppa= missing atomic ops +BROKEN-hppa = missing atomic ops + +SHARED_LIBS += owfat 0.0 DISTNAME = libowfat-0.30 -REVISION = 0 +REVISION = 1 CATEGORIES = devel MAINTAINER = Jan Klemkow <j.klem...@wemelug.de> @@ -15,7 +17,9 @@ EXTRACT_SUFX = .tar.xz USE_GMAKE = Yes MAKE_FILE = GNUmakefile -MAKE_FLAGS = CC="${CC}" COPTFLAGS="${CFLAGS}" +CFLAGS+=-fpic + +MAKE_FLAGS = CC="${CC}" COPTFLAGS="${CFLAGS}" SO_VERSION="0.0" FAKE_FLAGS = prefix=${DESTDIR}${PREFIX} \ INCLUDEDIR=${DESTDIR}${PREFIX}/include/lowfat \ MAN3DIR=${DESTDIR}${PREFIX}/share/lowfat/man Index: patches/patch-GNUmakefile =================================================================== RCS file: /cvs/ports/devel/libowfat/patches/patch-GNUmakefile,v retrieving revision 1.3 diff -u -p -r1.3 patch-GNUmakefile --- patches/patch-GNUmakefile 28 Sep 2015 16:52:49 -0000 1.3 +++ patches/patch-GNUmakefile 4 Oct 2016 22:35:11 -0000 @@ -1,18 +1,34 @@ $OpenBSD: patch-GNUmakefile,v 1.3 2015/09/28 16:52:49 jca Exp $ ---- GNUmakefile.orig Sat Sep 19 00:13:11 2015 -+++ GNUmakefile Sat Sep 19 00:23:26 2015 -@@ -18,8 +18,9 @@ all: ent $(LIBS) libowfat.a libsocket t +--- GNUmakefile.orig Fri Apr 10 22:54:57 2015 ++++ GNUmakefile Wed Oct 5 00:34:58 2016 +@@ -13,7 +13,7 @@ LIBS=byte.a fmt.a scan.a str.a uint.a open.a stralloc. + buffer.a mmap.a taia.a tai.a dns.a case.a mult.a array.a io.a \ + textcode.a cdb.a critbit.a + +-all: ent $(LIBS) libowfat.a libsocket t ++all: ent $(LIBS) libowfat.a libowfat.so.$(SO_VERSION) libsocket t + CROSS= #CROSS=i686-mingw- - CC=$(CROSS)gcc --CFLAGS=-pipe -W -Wall -Wextra -O2 -fomit-frame-pointer -+COPTFLAGS=-pipe -W -Wall -O2 -fomit-frame-pointer - #CFLAGS=-pipe -Os -march=pentiumpro -mcpu=pentiumpro -fomit-frame-pointer -fschedule-insns2 -Wall -+CFLAGS=$(COPTFLAGS) +@@ -147,6 +147,9 @@ libowfat.a: $(ALL_OBJS) + $(CROSS)ar cru $@ $(ALL_OBJS) + -$(CROSS)ranlib $@ + ++libowfat.so.$(SO_VERSION): $(ALL_OBJS) ++ gcc -shared -fpic -o $@ $(ALL_OBJS) ++ + CFLAGS+=-I. + + %.o: %.c +@@ -185,6 +188,7 @@ install-inc: + install-lib: libowfat.a + install -d $(LIBDIR) + install -m 644 libowfat.a $(LIBDIR) ++ install -m 644 libowfat.so.$(SO_VERSION) $(LIBDIR) - ent: ent.c haveuint128.h - gcc -g -o ent ent.c -I. -@@ -317,7 +318,7 @@ dns_nd6.o fmt_xlong.o scan_xlong.o fmt_ip6_flat.o $(TE + install-man: + install -d $(MAN3DIR) +@@ -317,7 +321,7 @@ dns_nd6.o fmt_xlong.o scan_xlong.o fmt_ip6_flat.o $(TE iob_send.o scan_ip6if.o: havealloca.h dep: haveip6.h haven2i.h havesl.h haveinline.h iopause.h select.h haveepoll.h havekqueue.h havedevpoll.h havescope.h havesigio.h havebsdsf.h havesendfile.h havealloca.h haveuint128.h Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/devel/libowfat/pkg/PLIST,v retrieving revision 1.2 diff -u -p -r1.2 PLIST --- pkg/PLIST 28 Sep 2015 16:52:49 -0000 1.2 +++ pkg/PLIST 4 Oct 2016 21:35:16 -0000 @@ -38,6 +38,7 @@ include/lowfat/uint32.h include/lowfat/uint64.h include/lowfat/va_narg.h lib/libowfat.a +@lib lib/libowfat.so.${LIBowfat_VERSION} share/lowfat/ @mandir share/lowfat/man/ share/lowfat/man/array.3