summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2016-06-07 17:57:11 +0000
committerjoerg <joerg@pkgsrc.org>2016-06-07 17:57:11 +0000
commitfad7212be6459e23046097cf5f026eb8ef523ec7 (patch)
tree670f448d269aef55f9c13026a36692d6237e71a8
parent5cfa9b5f100088b4a1a2bc1786b6f5dece0c0b0d (diff)
downloadpkgsrc-fad7212be6459e23046097cf5f026eb8ef523ec7.tar.gz
Libtoolify. Generalise curses use. Bump revision.
-rw-r--r--devel/stfl/Makefile32
-rw-r--r--devel/stfl/PLIST7
-rw-r--r--devel/stfl/distinfo6
-rw-r--r--devel/stfl/patches/patch-aa13
-rw-r--r--devel/stfl/patches/patch-ab66
5 files changed, 76 insertions, 48 deletions
diff --git a/devel/stfl/Makefile b/devel/stfl/Makefile
index d2bd75f5002..8309a20a575 100644
--- a/devel/stfl/Makefile
+++ b/devel/stfl/Makefile
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.1 2016/05/24 09:20:07 leot Exp $
+# $NetBSD: Makefile,v 1.2 2016/06/07 17:57:11 joerg Exp $
-MAJOR= 0
-MINOR= 24
-DISTNAME= stfl-${MAJOR}.${MINOR}
+DISTNAME= stfl-0.24
+PKGREVISION= 1
CATEGORIES= devel
MASTER_SITES= http://www.clifford.at/stfl/
@@ -13,30 +12,13 @@ LICENSE= gnu-lgpl-v3
NO_CONFIGURE= yes
USE_TOOLS+= gmake perl
-USE_GNU_ICONV= yes
+USE_LIBTOOL= yes
+USE_CURSES= wide
INSTALL_MAKE_FLAGS+= prefix=${PREFIX}
-# Makefile
-SUBST_CLASSES+= makefile
-SUBST_STAGE.makefile= pre-build
-SUBST_MESSAGE.makefile= Fixing distribution Makefile...
-SUBST_FILES.makefile= ${MAKE_FILE}
-SUBST_SED.makefile= -e "s|LDLIBS.*|& -liconv -Wl,-R${PREFIX}/lib|"
-
-.include "../../mk/bsd.prefs.mk"
-.if !empty(MACHINE_PLATFORM:MNetBSD-*-*)
-SUBST_CLASSES+= curses
-SUBST_STAGE.curses= pre-build
-SUBST_MESSAGE.curses= replacing ncursesw includes by native curses
-SUBST_FILES.curses= stfl.pc.in Makefile
-SUBST_SED.curses= -e "s|-lncursesw|-lcurses|g"
-.include "../../mk/curses.buildlink3.mk"
-.else
-.include "../../devel/ncursesw/buildlink3.mk"
-.endif
-
-PLIST_SUBST+= MAJOR=${MAJOR:Q} MINOR=${MINOR:Q}
+MAKE_ENV+= CURSES_LIB=${BUILDLINK_LDADD.curses}
.include "../../converters/libiconv/buildlink3.mk"
+.include "../../mk/curses.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/devel/stfl/PLIST b/devel/stfl/PLIST
index fb1227bdc0a..400efd9e7b3 100644
--- a/devel/stfl/PLIST
+++ b/devel/stfl/PLIST
@@ -1,7 +1,4 @@
-@comment $NetBSD: PLIST,v 1.1 2016/05/24 09:20:07 leot Exp $
+@comment $NetBSD: PLIST,v 1.2 2016/06/07 17:57:11 joerg Exp $
include/stfl.h
-lib/libstfl.a
-lib/libstfl.so
-lib/libstfl.so.${MAJOR}
-lib/libstfl.so.${MAJOR}.${MINOR}
+lib/libstfl.la
lib/pkgconfig/stfl.pc
diff --git a/devel/stfl/distinfo b/devel/stfl/distinfo
index 7f143013b70..d33caed8c4f 100644
--- a/devel/stfl/distinfo
+++ b/devel/stfl/distinfo
@@ -1,10 +1,10 @@
-$NetBSD: distinfo,v 1.1 2016/05/24 09:20:07 leot Exp $
+$NetBSD: distinfo,v 1.2 2016/06/07 17:57:11 joerg Exp $
SHA1 (stfl-0.24.tar.gz) = c770a20f719f5a7f0a691727098c51b43df9c33c
RMD160 (stfl-0.24.tar.gz) = 374ef95e6de3e77991a469ce75c1c972d8c8a3be
SHA512 (stfl-0.24.tar.gz) = 95df4574b1bc32d795751156dc5b93afbca3ba241607a3a55210c89dda61b9a26ad574bb5f729a0158c9052235dbf63d6c58b38e7f1061d14ab7062af6150fa0
Size (stfl-0.24.tar.gz) = 45585 bytes
-SHA1 (patch-aa) = fc6e09cdb31feaa59422222ebf6ea6ac788c8813
-SHA1 (patch-ab) = 3ef69d82bf1c2d1477332f79f5535a59ed87b89a
+SHA1 (patch-aa) = d7da2b2e561bc972a7ac976a9deb48805ed4a090
+SHA1 (patch-ab) = 8577547eed804983f4c09028bc4fc48e8f73661d
SHA1 (patch-ac) = dfaa67b489463ff4758161ffbf4bccad510f0d7f
SHA1 (patch-ad) = 3a92ae825c02ced62802630ca82affedeab88a03
diff --git a/devel/stfl/patches/patch-aa b/devel/stfl/patches/patch-aa
index 828d0900cb1..29dc83a1ffa 100644
--- a/devel/stfl/patches/patch-aa
+++ b/devel/stfl/patches/patch-aa
@@ -1,14 +1,15 @@
-$NetBSD: patch-aa,v 1.1 2016/05/24 09:20:07 leot Exp $
+$NetBSD: patch-aa,v 1.2 2016/06/07 17:57:11 joerg Exp $
Specify all needed linker flags.
---- stfl.pc.in.orig 2012-01-19 19:51:47.000000000 +0000
-+++ stfl.pc.in 2012-01-19 19:53:51.000000000 +0000
-@@ -8,6 +8,6 @@
+--- stfl.pc.in.orig 2009-03-30 18:33:37.000000000 +0000
++++ stfl.pc.in
+@@ -8,6 +8,6 @@ includedir=${prefix}/include
Name: STFL
Description: Structured Terminal Forms Language/Library
Version: @VERSION@
-Libs: -L${libdir} -lstfl
-+Libs: -Wl,-R${libdir} -L${libdir} -lstfl
- Libs.private: -lncursesw
+-Libs.private: -lncursesw
++Libs: @COMPILER_RPATH_FLAG@${libdir} -L${libdir} -lstfl
++Libs.private: @CURSES_LIB@
Cflags: -I${includedir}
diff --git a/devel/stfl/patches/patch-ab b/devel/stfl/patches/patch-ab
index 67a1a1055e1..977eeaf521c 100644
--- a/devel/stfl/patches/patch-ab
+++ b/devel/stfl/patches/patch-ab
@@ -1,14 +1,62 @@
-$NetBSD: patch-ab,v 1.1 2016/05/24 09:20:07 leot Exp $
+$NetBSD: patch-ab,v 1.2 2016/06/07 17:57:11 joerg Exp $
-Create a symbolic link also for the versioned SONAME.
+libtoolify.
---- Makefile.orig 2012-01-19 21:12:56.000000000 +0000
-+++ Makefile 2012-01-19 21:13:57.000000000 +0000
-@@ -65,6 +65,7 @@
+--- Makefile.orig 2015-02-12 13:14:33.000000000 +0000
++++ Makefile
+@@ -20,26 +20,23 @@
+
+ include Makefile.cfg
+
+-export CC = gcc -pthread
+-export CFLAGS += -I. -Wall -Os -ggdb -D_GNU_SOURCE -fPIC
+-export LDLIBS += -lncursesw
++export CFLAGS += -I. -Wall -D_GNU_SOURCE -pthread
++export LDLIBS += ${CURSES_LIB}
+
+-SONAME := libstfl.so.0
+-VERSION := 0.24
++.SUFFIXES: .c .lo
+
+-all: libstfl.so.$(VERSION) libstfl.a example
++.c.lo:
++ libtool --mode=compile ${CC} -o $@ -c ${CFLAGS} $<
++
++all: libstfl.la
+
+ example: libstfl.a example.o
+
+-libstfl.a: public.o base.o parser.o dump.o style.o binding.o iconv.o \
+- $(patsubst %.c,%.o,$(wildcard widgets/*.c))
+- rm -f $@
+- ar qc $@ $^
+- ranlib $@
+-
+-libstfl.so.$(VERSION): public.o base.o parser.o dump.o style.o binding.o iconv.o \
+- $(patsubst %.c,%.o,$(wildcard widgets/*.c))
+- $(CC) -shared -Wl,-soname,$(SONAME) -o $@ $(LDLIBS) $^
++libstfl.la: public.lo base.lo parser.lo dump.lo style.lo binding.lo iconv.lo \
++ $(patsubst %.c,%.lo,$(wildcard widgets/*.c))
++ libtool --mode=link ${CC} ${LDLIBS} -o libstfl.la -version-number 0:24 -rpath ${PREFIX}/lib \
++ public.lo base.lo parser.lo dump.lo style.lo binding.lo iconv.lo \
++ $(patsubst %.c,%.lo,$(wildcard widgets/*.c))
+
+ clean:
+ rm -f libstfl.a example core core.* *.o Makefile.deps
+@@ -60,14 +57,12 @@ Makefile.deps: *.c widgets/*.c *.h
+ install: all stfl.pc
+ mkdir -p $(DESTDIR)$(prefix)/$(libdir)/pkgconfig
+ mkdir -p $(DESTDIR)$(prefix)/include
+- install -m 644 libstfl.a $(DESTDIR)$(prefix)/$(libdir)
+ install -m 644 stfl.h $(DESTDIR)$(prefix)/include/
install -m 644 stfl.pc $(DESTDIR)$(prefix)/$(libdir)/pkgconfig/
- install -m 644 libstfl.so.$(VERSION) $(DESTDIR)$(prefix)/$(libdir)
- ln -fs libstfl.so.$(VERSION) $(DESTDIR)$(prefix)/$(libdir)/libstfl.so
-+ ln -fs libstfl.so.$(VERSION) $(DESTDIR)$(prefix)/$(libdir)/$(SONAME)
+- install -m 644 libstfl.so.$(VERSION) $(DESTDIR)$(prefix)/$(libdir)
+- ln -fs libstfl.so.$(VERSION) $(DESTDIR)$(prefix)/$(libdir)/libstfl.so
++ libtool --mode=install ${BSD_INSTALL_LIB} libstfl.la $(DESTDIR)$(prefix)/$(libdir)
stfl.pc: stfl.pc.in
- sed 's,@VERSION@,$(VERSION),g' < $< | sed 's,@PREFIX@,$(prefix),g' > $@
+- sed 's,@VERSION@,$(VERSION),g' < $< | sed 's,@PREFIX@,$(prefix),g' > $@
++ sed -e 's,@VERSION@,$(VERSION),g' -e 's,@PREFIX@,$(prefix),g' -e 's|@COMPILER_RPATH_FLAG@|${COMPILER_RPATH_FLAG}|g' -e 's,@CURSES_LIB@,${CURSES_LIB},g' > $@ < $<
+
+ ifeq ($(FOUND_SPL),1)
+ include spl/Makefile.snippet