pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/net/ucspi-tools ucspi: Fix build on NetBSD.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/390934c915b2
branches:  trunk
changeset: 442782:390934c915b2
user:      nia <nia%pkgsrc.org@localhost>
date:      Mon Nov 30 12:41:41 2020 +0000

description:
ucspi: Fix build on NetBSD.

- Don't override CFLAGS from pkgsrc, don't build with -g.
- Make sure strlcpy gets defined, use _NETBSD_SOURCE.
- Honor LDFLAGS so pkgsrc library paths are found.

diffstat:

 net/ucspi-tools/Makefile                |   5 ++++-
 net/ucspi-tools/distinfo                |   5 +++--
 net/ucspi-tools/patches/patch-Makefile  |  18 ++++++++++++++++--
 net/ucspi-tools/patches/patch-config.mk |  12 ++++++++++++
 4 files changed, 35 insertions(+), 5 deletions(-)

diffs (90 lines):

diff -r 866ec0c5862b -r 390934c915b2 net/ucspi-tools/Makefile
--- a/net/ucspi-tools/Makefile  Mon Nov 30 12:38:20 2020 +0000
+++ b/net/ucspi-tools/Makefile  Mon Nov 30 12:41:41 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2020/11/27 13:48:25 schmonz Exp $
+# $NetBSD: Makefile,v 1.6 2020/11/30 12:41:41 nia Exp $
 
 DISTNAME=              ucspi-tools-1.6
 PKGREVISION=           2
@@ -12,6 +12,9 @@
 COMMENT=               SOCKS proxy and TLS support for UCSPI
 LICENSE=               isc
 
+# strlcpy
+CFLAGS.NetBSD+=                -D_NETBSD_SOURCE
+
 USE_TOOLS+=            gmake pkg-config
 MAKE_FILE=             GNUmakefile
 
diff -r 866ec0c5862b -r 390934c915b2 net/ucspi-tools/distinfo
--- a/net/ucspi-tools/distinfo  Mon Nov 30 12:38:20 2020 +0000
+++ b/net/ucspi-tools/distinfo  Mon Nov 30 12:41:41 2020 +0000
@@ -1,10 +1,11 @@
-$NetBSD: distinfo,v 1.3 2020/11/27 13:48:25 schmonz Exp $
+$NetBSD: distinfo,v 1.4 2020/11/30 12:41:41 nia Exp $
 
 SHA1 (ucspi-tools-1.6-1aa21e6bd85ec45a6bce9b570548b6f4a5b1a9ed.tar.gz) = 9c090e9105e9211e89b033b11a804999c1de06c1
 RMD160 (ucspi-tools-1.6-1aa21e6bd85ec45a6bce9b570548b6f4a5b1a9ed.tar.gz) = 634ff34878c201bb9d8d72dca5ff544c717beb83
 SHA512 (ucspi-tools-1.6-1aa21e6bd85ec45a6bce9b570548b6f4a5b1a9ed.tar.gz) = 
f9d241dc63b2c8aa3f1b51a8c9f85c9408e6f888e1d02a7504c8654eb8fa2161842319683325c0a0f74c4ca0247584dd293aa07ffbcb1e4b81c02c63058c6dec
 Size (ucspi-tools-1.6-1aa21e6bd85ec45a6bce9b570548b6f4a5b1a9ed.tar.gz) = 21718 bytes
-SHA1 (patch-Makefile) = 934a3edd61edc23562172ea721e6eceba0a75d65
+SHA1 (patch-Makefile) = 03cb1edea0b8fa182833b3c411c35f3ecc74e74b
+SHA1 (patch-config.mk) = d846758b9e3449b469c1b8a110bd9650ccda8321
 SHA1 (patch-fdprintf.c) = 665c1c8c99a6dd31bc227aa1f9ab4abb75fb693d
 SHA1 (patch-fdprintf.h) = 68d57e66c0ce75bd0a9cdec9c5135474ff7b4cfe
 SHA1 (patch-httppc.c) = 4c2c36a8b7ad4755aba2be2aaea0c9e4c045aa45
diff -r 866ec0c5862b -r 390934c915b2 net/ucspi-tools/patches/patch-Makefile
--- a/net/ucspi-tools/patches/patch-Makefile    Mon Nov 30 12:38:20 2020 +0000
+++ b/net/ucspi-tools/patches/patch-Makefile    Mon Nov 30 12:41:41 2020 +0000
@@ -1,6 +1,7 @@
-$NetBSD: patch-Makefile,v 1.3 2020/11/27 13:48:25 schmonz Exp $
+$NetBSD: patch-Makefile,v 1.4 2020/11/30 12:41:41 nia Exp $
 
 Make sure openssl headers get found.
+Use LDFLAGS so pkgsrc library paths are picked up.
 Not all systems have dprintf(); use ours for portability.
 
 --- Makefile.orig      2016-09-21 22:05:29.000000000 +0000
@@ -24,7 +25,7 @@
  
  # SOCKS 5
  sockc: sockc.o
-@@ -28,8 +30,8 @@ http_parser.o: http_parser.h
+@@ -28,18 +30,18 @@ http_parser.o: http_parser.h
  httpc: httpc.o http_parser.o
        $(CC) -o $@ httpc.o http_parser.o
  
@@ -35,3 +36,16 @@
  
  # SSL/TLS
  tlsc: tlsc.o
+-      $(CC) -o tlsc tlsc.o $(LIBS_TLS) $(LIBS_BSD)
++      $(CC) $(LDFLAGS) -o tlsc tlsc.o $(LIBS_TLS) $(LIBS_BSD)
+ 
+ tlss: tlss.o
+-      $(CC) -o tlss tlss.o $(LIBS_TLS) $(LIBS_BSD)
++      $(CC) $(LDFLAGS) -o tlss tlss.o $(LIBS_TLS) $(LIBS_BSD)
+ 
+ sslc: sslc.o
+-      $(CC) -o sslc sslc.o $(LIBS_SSL) $(LIBS_BSD)
++      $(CC) $(LDFLAGS) -o sslc sslc.o $(LIBS_SSL) $(LIBS_BSD)
+ 
+ sslc.o: sslc.c
+       $(CC) $(CFLAGS) $(DEFINES) `pkg-config --cflags libssl` -o $@ -c sslc.c
diff -r 866ec0c5862b -r 390934c915b2 net/ucspi-tools/patches/patch-config.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/ucspi-tools/patches/patch-config.mk   Mon Nov 30 12:41:41 2020 +0000
@@ -0,0 +1,12 @@
+$NetBSD: patch-config.mk,v 1.1 2020/11/30 12:41:41 nia Exp $
+
+Honor CFLAGS from pkgsrc.
+
+--- config.mk.orig     2016-09-21 22:05:29.000000000 +0000
++++ config.mk
+@@ -8,4 +8,4 @@ VERSION = 1.5
+ 
+ # compiler
+ CC        = cc
+-CFLAGS            = -std=c99 -pedantic -Wall -Wextra -g
++CFLAGS           += -std=c99 -pedantic -Wall -Wextra



Home | Main Index | Thread Index | Old Index