pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/www/http-parser Use libtool for the build and install....



details:   https://anonhg.NetBSD.org/pkgsrc/rev/7881ea68e1ee
branches:  trunk
changeset: 351701:7881ea68e1ee
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Thu Aug 25 18:30:33 2016 +0000

description:
Use libtool for the build and install.  Fixes various issues with the
package which meant it only worked on NetBSD.  Bump PKGREVISION.

diffstat:

 www/http-parser/Makefile               |  20 +++++++++++++-
 www/http-parser/PLIST                  |   5 +--
 www/http-parser/distinfo               |   3 +-
 www/http-parser/patches/patch-Makefile |  46 ----------------------------------
 4 files changed, 21 insertions(+), 53 deletions(-)

diffs (109 lines):

diff -r 13c7cf5b179b -r 7881ea68e1ee www/http-parser/Makefile
--- a/www/http-parser/Makefile  Thu Aug 25 14:15:29 2016 +0000
+++ b/www/http-parser/Makefile  Thu Aug 25 18:30:33 2016 +0000
@@ -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 @@
 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 -r 13c7cf5b179b -r 7881ea68e1ee www/http-parser/PLIST
--- a/www/http-parser/PLIST     Thu Aug 25 14:15:29 2016 +0000
+++ b/www/http-parser/PLIST     Thu Aug 25 18:30:33 2016 +0000
@@ -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 -r 13c7cf5b179b -r 7881ea68e1ee www/http-parser/distinfo
--- a/www/http-parser/distinfo  Thu Aug 25 14:15:29 2016 +0000
+++ b/www/http-parser/distinfo  Thu Aug 25 18:30:33 2016 +0000
@@ -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 -r 13c7cf5b179b -r 7881ea68e1ee www/http-parser/patches/patch-Makefile
--- a/www/http-parser/patches/patch-Makefile    Thu Aug 25 14:15:29 2016 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -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



Home | Main Index | Thread Index | Old Index