pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/net/haproxy haproxy: Rework SunOS XOPEN_SOURCE handling.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5a6a6c9c3e24
branches:  trunk
changeset: 378309:5a6a6c9c3e24
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Thu Apr 05 09:18:39 2018 +0000

description:
haproxy: Rework SunOS XOPEN_SOURCE handling.

This package explicitly avoids C99-isms and fails to build in C99 mode with
older compilers, even though it works fine with newer compilers that default
to C99 mode.  So, we need to explicitly request XPG4_2 if and only if the
compiler does not default to C99, and must not require C99.

diffstat:

 net/haproxy/Makefile                    |   4 ++--
 net/haproxy/distinfo                    |   6 ++++--
 net/haproxy/patches/patch-Makefile      |   6 +++---
 net/haproxy/patches/patch-src_cli.c     |  16 ++++++++++++++++
 net/haproxy/patches/patch-src_haproxy.c |  16 ++++++++++++++++
 5 files changed, 41 insertions(+), 7 deletions(-)

diffs (94 lines):

diff -r e0521f570200 -r 5a6a6c9c3e24 net/haproxy/Makefile
--- a/net/haproxy/Makefile      Thu Apr 05 09:01:23 2018 +0000
+++ b/net/haproxy/Makefile      Thu Apr 05 09:18:39 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.40 2018/02/14 12:56:33 adam Exp $
+# $NetBSD: Makefile,v 1.41 2018/04/05 09:18:39 jperkin Exp $
 
 DISTNAME=      haproxy-1.8.4
 CATEGORIES=    net www
@@ -9,7 +9,7 @@
 COMMENT=       Reliable, high performance TCP/HTTP load balancer
 LICENSE=       gnu-gpl-v2
 
-USE_LANGUAGES=         c99
+USE_LANGUAGES=         c
 USE_TOOLS+=            gmake
 BUILD_MAKE_FLAGS+=     ADDLIB=${COMPILER_RPATH_FLAG}${PREFIX}/lib
 BUILD_MAKE_FLAGS+=     TARGET=${TARGET}
diff -r e0521f570200 -r 5a6a6c9c3e24 net/haproxy/distinfo
--- a/net/haproxy/distinfo      Thu Apr 05 09:01:23 2018 +0000
+++ b/net/haproxy/distinfo      Thu Apr 05 09:18:39 2018 +0000
@@ -1,7 +1,9 @@
-$NetBSD: distinfo,v 1.34 2018/02/14 12:56:33 adam Exp $
+$NetBSD: distinfo,v 1.35 2018/04/05 09:18:39 jperkin Exp $
 
 SHA1 (haproxy-1.8.4.tar.gz) = c8c2cd0a9832a64150ce63dd3638bfa989172b57
 RMD160 (haproxy-1.8.4.tar.gz) = 0cb99777fa787ca09e68f87091053ab4120a4d00
 SHA512 (haproxy-1.8.4.tar.gz) = 618a03062e832260249610d90b3a9ebd171d8a1b0921903f5f3447484bab552ef9399e431417cf3cf4927ac345fe4d2a345ee8513e209b22e0700f5b1edbf86c
 Size (haproxy-1.8.4.tar.gz) = 2049789 bytes
-SHA1 (patch-Makefile) = f82960b3ef0f4a2752fa06a04ad3b94a2d9908ae
+SHA1 (patch-Makefile) = d146acadbb16fe00d7c8a92ef706e8d8f73e5da6
+SHA1 (patch-src_cli.c) = f540a2e5a9374df29398d84529911bb5ad95bab5
+SHA1 (patch-src_haproxy.c) = 2de3aa4b05528933d39e63506eb7d09448a2b9e8
diff -r e0521f570200 -r 5a6a6c9c3e24 net/haproxy/patches/patch-Makefile
--- a/net/haproxy/patches/patch-Makefile        Thu Apr 05 09:01:23 2018 +0000
+++ b/net/haproxy/patches/patch-Makefile        Thu Apr 05 09:18:39 2018 +0000
@@ -1,6 +1,6 @@
-$NetBSD: patch-Makefile,v 1.3 2018/02/08 19:12:50 jperkin Exp $
+$NetBSD: patch-Makefile,v 1.4 2018/04/05 09:18:39 jperkin Exp $
 
-Specify C99.
+Do not hardcode _XOPEN_SOURCE.
 Skip installing unnecessary documentation.
 
 --- Makefile.orig      2017-12-30 17:13:19.000000000 +0000
@@ -10,7 +10,7 @@
    # We also enable getaddrinfo() which works since solaris 8.
    USE_POLL       = implicit
 -  TARGET_CFLAGS  = -fomit-frame-pointer -DFD_SETSIZE=65536 -D_REENTRANT -D_XOPEN_SOURCE=500 -D__EXTENSIONS__
-+  TARGET_CFLAGS  = -DFD_SETSIZE=65536 -D_REENTRANT -D_XOPEN_SOURCE=600 -D__EXTENSIONS__
++  TARGET_CFLAGS  = -DFD_SETSIZE=65536 -D_REENTRANT -D__EXTENSIONS__ -D_XOPEN_SOURCE_EXTENDED=1
    TARGET_LDFLAGS = -lnsl -lsocket
    USE_TPROXY     = implicit
    USE_LIBCRYPT    = implicit
diff -r e0521f570200 -r 5a6a6c9c3e24 net/haproxy/patches/patch-src_cli.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/haproxy/patches/patch-src_cli.c       Thu Apr 05 09:18:39 2018 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-src_cli.c,v 1.1 2018/04/05 09:18:39 jperkin Exp $
+
+Special handling for XPG4_2 on SunOS.
+
+--- src/cli.c.orig     2018-02-08 13:05:15.000000000 +0000
++++ src/cli.c
+@@ -11,6 +11,9 @@
+  *
+  */
+ 
++#if defined(__sun) && !defined(_XOPEN_SOURCE) && (__STDC_VERSION__-0 < 199901L)
++#define _XOPEN_SOURCE
++#endif
+ #include <ctype.h>
+ #include <errno.h>
+ #include <fcntl.h>
diff -r e0521f570200 -r 5a6a6c9c3e24 net/haproxy/patches/patch-src_haproxy.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/haproxy/patches/patch-src_haproxy.c   Thu Apr 05 09:18:39 2018 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-src_haproxy.c,v 1.1 2018/04/05 09:18:39 jperkin Exp $
+
+Special handling for XPG4_2 on SunOS.
+
+--- src/haproxy.c.orig 2018-02-08 13:05:15.000000000 +0000
++++ src/haproxy.c
+@@ -26,6 +26,9 @@
+  */
+ 
+ #define _GNU_SOURCE
++#if defined(__sun) && !defined(_XOPEN_SOURCE) && (__STDC_VERSION__-0 < 199901L)
++#define _XOPEN_SOURCE
++#endif
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>



Home | Main Index | Thread Index | Old Index