diff options
author | jperkin <jperkin@pkgsrc.org> | 2016-08-25 18:30:33 +0000 |
---|---|---|
committer | jperkin <jperkin@pkgsrc.org> | 2016-08-25 18:30:33 +0000 |
commit | f3f0aacbbda7cb7b86661e1bd9d4edf21eca080f (patch) | |
tree | c672ee313f772e292fa2c20f1516d1edf7f84824 /www | |
parent | ce6ef96b4cab8831a67015f81f5d82e8784ce65d (diff) | |
download | pkgsrc-f3f0aacbbda7cb7b86661e1bd9d4edf21eca080f.tar.gz |
Use libtool for the build and install. Fixes various issues with the
package which meant it only worked on NetBSD. Bump PKGREVISION.
Diffstat (limited to 'www')
-rw-r--r-- | www/http-parser/Makefile | 20 | ||||
-rw-r--r-- | www/http-parser/PLIST | 5 | ||||
-rw-r--r-- | www/http-parser/distinfo | 3 | ||||
-rw-r--r-- | www/http-parser/patches/patch-Makefile | 46 |
4 files changed, 21 insertions, 53 deletions
diff --git a/www/http-parser/Makefile b/www/http-parser/Makefile index 2a87038455e..429caa8f7d9 100644 --- a/www/http-parser/Makefile +++ b/www/http-parser/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.3 2016/06/09 06:23:41 wiz Exp $ +# $NetBSD: Makefile,v 1.4 2016/08/25 18:30:33 jperkin Exp $ DISTNAME= http-parser-2.7.0 +PKGREVISION= 1 CATEGORIES= www MASTER_SITES= ${MASTER_SITE_GITHUB:=nodejs/} GITHUB_TAG= v${PKGVERSION_NOREV} @@ -11,8 +12,23 @@ COMMENT= Parser for HTTP messages written in C LICENSE= mit USE_LANGUAGES= c +USE_LIBTOOL= yes USE_TOOLS+= gmake -BUILD_TARGET= library + +INSTALLATION_DIRS= include lib + BUILDLINK_TRANSFORM+= rm:-Werror +do-build: + cd ${WRKSRC} && ${LIBTOOL} --mode=compile --tag=CC ${CC} ${CFLAGS} \ + -c http_parser.c + cd ${WRKSRC} && ${LIBTOOL} --mode=link --tag=CC ${CC} ${LDFLAGS} \ + ${LIBS} -o libhttp_parser.la http_parser.lo \ + -version-info 2:7:0 -rpath ${PREFIX}/lib + +do-install: + cd ${WRKSRC} && ${LIBTOOL} --mode=install ${INSTALL_LIB} \ + -c libhttp_parser.la ${DESTDIR}${PREFIX}/lib/libhttp_parser.la + ${INSTALL_DATA} ${WRKSRC}/http_parser.h ${DESTDIR}${PREFIX}/include + .include "../../mk/bsd.pkg.mk" diff --git a/www/http-parser/PLIST b/www/http-parser/PLIST index feab96104c5..e53fb8aa884 100644 --- a/www/http-parser/PLIST +++ b/www/http-parser/PLIST @@ -1,4 +1,3 @@ -@comment $NetBSD: PLIST,v 1.2 2016/05/29 14:17:48 wiz Exp $ +@comment $NetBSD: PLIST,v 1.3 2016/08/25 18:30:33 jperkin Exp $ include/http_parser.h -lib/libhttp_parser.so -lib/libhttp_parser.so.2.7.0 +lib/libhttp_parser.la diff --git a/www/http-parser/distinfo b/www/http-parser/distinfo index c3063605744..2220bc42af5 100644 --- a/www/http-parser/distinfo +++ b/www/http-parser/distinfo @@ -1,7 +1,6 @@ -$NetBSD: distinfo,v 1.2 2016/05/29 14:17:48 wiz Exp $ +$NetBSD: distinfo,v 1.3 2016/08/25 18:30:33 jperkin Exp $ SHA1 (http-parser-2.7.0.tar.gz) = f24bd35cf6d663e2b9f916708d82a96f562bc78b RMD160 (http-parser-2.7.0.tar.gz) = 910c4bb7cf4c5463ad2a54eb82b78d1bc20de877 SHA512 (http-parser-2.7.0.tar.gz) = 1fe13b5366e9d161dbce2f6ad340890713413e4c5865d2567cb5ccf5601a52bc03682ecc43bc4e2c5ee9c4f152993a658d87fd43373070da67530c58ad577ee1 Size (http-parser-2.7.0.tar.gz) = 48523 bytes -SHA1 (patch-Makefile) = d2563f8f1e7d85e3b7d7e1dc53ae20089a0e8cab diff --git a/www/http-parser/patches/patch-Makefile b/www/http-parser/patches/patch-Makefile deleted file mode 100644 index 8ec275e7ffb..00000000000 --- a/www/http-parser/patches/patch-Makefile +++ /dev/null @@ -1,46 +0,0 @@ -$NetBSD: patch-Makefile,v 1.1 2016/05/28 23:09:30 schnoebe Exp $ - -Correctly(?) include DESTDIR; - -Correct the usage of $(INSTALL) to create the directories as needed -and create a short, relative symbolic link for the shared library. - -$(INSTALL) is assumed to be NetBSD's pkgsrc install. - -Remove redundant install-strip target. - ---- Makefile.orig 2016-04-19 14:41:48.000000000 +0000 -+++ Makefile -@@ -56,8 +56,8 @@ LDFLAGS_LIB = $(LDFLAGS) -shared - - INSTALL ?= install - PREFIX ?= $(DESTDIR)/usr/local --LIBDIR = $(PREFIX)/lib --INCLUDEDIR = $(PREFIX)/include -+LIBDIR = $(DESTDIR)/$(PREFIX)/lib -+INCLUDEDIR = $(DESTDIR)/$(PREFIX)/include - - ifneq (darwin,$(PLATFORM)) - # TODO(bnoordhuis) The native SunOS linker expects -h rather than -soname... -@@ -122,15 +122,12 @@ parsertrace_g: http_parser_g.o contrib/p - tags: http_parser.c http_parser.h test.c - ctags $^ - --install: library -- $(INSTALL) -D http_parser.h $(INCLUDEDIR)/http_parser.h -- $(INSTALL) -D $(SONAME) $(LIBDIR)/$(SONAME) -- ln -s $(LIBDIR)/$(SONAME) $(LIBDIR)/libhttp_parser.$(SOEXT) -- --install-strip: library -- $(INSTALL) -D http_parser.h $(INCLUDEDIR)/http_parser.h -- $(INSTALL) -D -s $(SONAME) $(LIBDIR)/$(SONAME) -- ln -s $(LIBDIR)/$(SONAME) $(LIBDIR)/libhttp_parser.$(SOEXT) -+install install-strip: library -+ $(INSTALL) -d $(INCLUDEDIR) -+ $(INSTALL) http_parser.h $(INCLUDEDIR)/http_parser.h -+ $(INSTALL) -d $(LIBDIR) -+ $(INSTALL) $(SONAME) $(LIBDIR)/$(SONAME) -+ cd $(LIBDIR) && $(INSTALL) -l s $(SONAME) libhttp_parser.$(SOEXT) - - uninstall: - rm $(INCLUDEDIR)/http_parser.h |