Import of pkgsrc-2015Q1

This commit is contained in:
2015-04-22 14:34:26 +02:00
committed by Lionel Sambuc
parent 9a8c06dafb
commit 4af1cdf7a9
25114 changed files with 870550 additions and 795435 deletions

View File

@@ -1,9 +1,8 @@
# $NetBSD: Makefile,v 1.10 2014/02/20 00:37:46 rodent Exp $
# $NetBSD: Makefile,v 1.19 2015/03/14 20:36:23 rodent Exp $
DISTNAME= haproxy-1.4.24
PKGREVISION= 1
DISTNAME= haproxy-1.5.11
CATEGORIES= net www
MASTER_SITES= http://haproxy.1wt.eu/download/1.4/src/
MASTER_SITES= http://haproxy.1wt.eu/download/1.5/src/
MAINTAINER= morr@NetBSD.org
HOMEPAGE= http://haproxy.1wt.eu/
@@ -11,15 +10,17 @@ COMMENT= Reliable, high performance TCP/HTTP load balancer
LICENSE= gnu-gpl-v2
USE_TOOLS+= gmake
BUILD_MAKE_FLAGS+= TARGET=${TARGET}
BUILD_MAKE_FLAGS+= TARGET=${TARGET} ADDLIB=${COMPILER_RPATH_FLAG}${PREFIX}/lib USE_ZLIB=1
INSTALL_MAKE_FLAGS+= TARGET=${TARGET}
INSTALL_MAKE_FLAGS+= PREFIX=${PREFIX}
INSTALL_MAKE_FLAGS+= DOCDIR=${PREFIX}/share/doc/${PKGBASE}
INSTALL_MAKE_FLAGS+= MANDIR=${PREFIX}/${PKGMANDIR}
.include "options.mk"
RCD_SCRIPTS= haproxy
EGDIR= ${PREFIX}/share/examples/${PKGBASE}
INSTALLATION_DIRS= ${EGDIR} share/examples/rc.d
INSTALLATION_DIRS+= ${EGDIR}
.include "../../mk/bsd.prefs.mk"
@@ -40,6 +41,8 @@ TARGET=linux24e
. else
TARGET=linux24
. endif
. else
TARGET=generic
. endif
.else
TARGET=generic
@@ -50,4 +53,5 @@ LIBS.SunOS+= -lxnet
post-install:
${INSTALL_DATA} ${WRKSRC}/examples/haproxy.cfg ${DESTDIR}${EGDIR}/
.include "../../devel/zlib/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

View File

@@ -1,6 +1,7 @@
@comment $NetBSD: PLIST,v 1.4 2014/03/11 14:05:08 jperkin Exp $
@comment $NetBSD: PLIST,v 1.5 2014/07/14 15:30:10 fhajny Exp $
man/man1/haproxy.1
sbin/haproxy
sbin/haproxy-systemd-wrapper
share/doc/haproxy/architecture.txt
share/doc/haproxy/configuration.txt
share/doc/haproxy/haproxy-en.txt

View File

@@ -1,7 +1,7 @@
$NetBSD: distinfo,v 1.6 2013/06/20 21:36:28 morr Exp $
$NetBSD: distinfo,v 1.14 2015/03/14 20:36:23 rodent Exp $
SHA1 (haproxy-1.4.24.tar.gz) = 0c5104d029d8d58d39b0d94179edd84c661306d1
RMD160 (haproxy-1.4.24.tar.gz) = b176de6feb19aec40f1808d81c10e0ff3f229e16
Size (haproxy-1.4.24.tar.gz) = 836768 bytes
SHA1 (patch-aa) = b2cb2fd29427acf4e679bac90acb4a5dc9d29f11
SHA1 (patch-ab) = 10e051618f1fc561f5e5c87af576a87e1c3a884b
SHA1 (haproxy-1.5.11.tar.gz) = 6774c9d0517cd74cff799ef19a559424145f2ea0
RMD160 (haproxy-1.5.11.tar.gz) = 7b94bd7102b7c436204eb66623e98d16445759ca
Size (haproxy-1.5.11.tar.gz) = 1340429 bytes
SHA1 (patch-aa) = be43fca3478d170620607cfe7f4b9ed30f341651
SHA1 (patch-standard_h) = 08ef71d48cd846d16b7427e6dd133bb4a02d431c

View File

@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: haproxy.sh,v 1.1.1.1 2011/10/31 23:34:07 morr Exp $
# $NetBSD: haproxy.sh,v 1.2 2014/04/27 01:28:01 rodent Exp $
#
# PROVIDE: haproxy
@@ -10,10 +10,21 @@ $_rc_subr_loaded . /etc/rc.subr
name="haproxy"
rcvar=$name
command="/usr/pkg/sbin/${name}"
conf_file="/usr/pkg/etc/${name}.cfg"
command="@PREFIX@/sbin/${name}"
conf_file="@PKG_SYSCONFDIR@/${name}.cfg"
required_files="${conf_file}"
command_args="-f $conf_file"
command_args="-f ${conf_file}"
extra_commands="configtest"
configtest_cmd="haproxy_configtest"
haproxy_configtest()
{
if [ ! -f ${conf_file} ]; then
warn "${conf_file} does not exist."
return 1;
fi
${command} -c -f ${conf_file}
}
load_rc_config $name
run_rc_command "$1"

23
net/haproxy/options.mk Normal file
View File

@@ -0,0 +1,23 @@
# $NetBSD: options.mk,v 1.2 2015/03/14 20:36:23 rodent Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.haproxy
PKG_SUPPORTED_OPTIONS= pcre ssl
PKG_SUGGESTED_OPTIONS= pcre ssl
.include "../../mk/bsd.options.mk"
###
### Use libpcre rather than libc for header processing regexp
###
.if !empty(PKG_OPTIONS:Mpcre)
. include "../../devel/pcre/buildlink3.mk"
BUILD_MAKE_FLAGS+= USE_PCRE=1
.endif
###
### Support OpenSSL for termination.
###
.if !empty(PKG_OPTIONS:Mssl)
. include "../../security/openssl/buildlink3.mk"
BUILD_MAKE_FLAGS+= USE_OPENSSL=1
.endif

View File

@@ -1,19 +1,20 @@
$NetBSD: patch-aa,v 1.3 2013/04/17 19:55:37 morr Exp $
$NetBSD: patch-aa,v 1.5 2014/07/14 15:30:10 fhajny Exp $
Add support for NetBSD.
Remove -fomit-frame-pointer on SunOS.
--- Makefile.orig 2013-04-03 00:33:32.000000000 +0000
--- Makefile.orig 2014-07-12 14:40:52.000000000 +0000
+++ Makefile
@@ -73,7 +73,7 @@ DOCDIR = $(PREFIX)/doc/haproxy
@@ -89,7 +89,7 @@ DOCDIR = $(PREFIX)/doc/haproxy
# Use TARGET=<target_name> to optimize for a specifc target OS among the
# following list (use the default "generic" if uncertain) :
# generic, linux22, linux24, linux24e, linux26, solaris,
-# freebsd, openbsd, cygwin, custom, aix52
+# freebsd, netbsd, openbsd, cygwin, custom, aix52
-# freebsd, openbsd, cygwin, custom, aix51, aix52
+# freebsd, netbsd, openbsd, cygwin, custom, aix51, aix52
TARGET =
#### TARGET CPU
@@ -91,7 +91,6 @@ ARCH =
@@ -107,7 +107,6 @@ ARCH =
#### Toolchain options.
# GCC is normally used both for compiling and linking.
@@ -21,7 +22,16 @@ Add support for NetBSD.
LD = $(CC)
#### Debug flags (typically "-g").
@@ -252,6 +251,12 @@ ifeq ($(TARGET),osx)
@@ -267,7 +266,7 @@ ifeq ($(TARGET),solaris)
# This is for Solaris 8
# We also enable getaddrinfo() which works since solaris 8.
USE_POLL = implicit
- TARGET_CFLAGS = -fomit-frame-pointer -DFD_SETSIZE=65536 -D_REENTRANT
+ TARGET_CFLAGS = -DFD_SETSIZE=65536 -D_REENTRANT
TARGET_LDFLAGS = -lnsl -lsocket
USE_TPROXY = implicit
USE_LIBCRYPT = implicit
@@ -288,6 +287,12 @@ ifeq ($(TARGET),osx)
USE_TPROXY = implicit
USE_LIBCRYPT = implicit
else
@@ -34,15 +44,15 @@ Add support for NetBSD.
ifeq ($(TARGET),openbsd)
# This is for OpenBSD >= 3.0
USE_POLL = implicit
@@ -274,6 +279,7 @@ ifeq ($(TARGET),cygwin)
endif # cygwin
@@ -318,6 +323,7 @@ endif # cygwin
endif # aix52
endif # aix51
endif # openbsd
+endif # netbsd
endif # osx
endif # freebsd
endif # solaris
@@ -510,7 +516,7 @@ all:
@@ -634,7 +640,7 @@ all:
@echo "Please choose the target among the following supported list :"
@echo
@echo " linux2628, linux26, linux24, linux24e, linux22, solaris"

View File

@@ -1,19 +0,0 @@
$NetBSD: patch-ab,v 1.2 2013/04/17 19:55:37 morr Exp $
--- src/haproxy.c.orig 2013-04-03 00:33:32.000000000 +0000
+++ src/haproxy.c
@@ -101,10 +101,10 @@ int relative_pid = 1; /* process id st
/* global options */
struct global global = {
- logfac1 : -1,
- logfac2 : -1,
- loglev1 : 7, /* max syslog level : debug */
- loglev2 : 7,
+ .logfac1 = -1,
+ .logfac2 = -1,
+ .loglev1 = 7, /* max syslog level : debug */
+ .loglev2 = 7,
.stats_sock = {
.maxconn = 10, /* 10 concurrent stats connections */
.perm = {

View File

@@ -0,0 +1,30 @@
$NetBSD: patch-standard_h,v 1.1 2014/07/14 15:30:10 fhajny Exp $
Remove local version of popcount(3), conflicts w/ libc.
--- include/common/standard.h.orig 2014-07-12 14:40:52.000000000 +0000
+++ include/common/standard.h
@@ -24,6 +24,7 @@
#include <limits.h>
#include <string.h>
+#include <strings.h>
#include <time.h>
#include <sys/types.h>
#include <sys/socket.h>
@@ -565,6 +566,7 @@ static inline unsigned int div64_32(unsi
return result;
}
+#if !defined(__NetBSD__)
/* Simple popcount implementation. It returns the number of ones in a word */
static inline unsigned int popcount(unsigned long a)
{
@@ -575,6 +577,7 @@ static inline unsigned int popcount(unsi
}
return cnt;
}
+#endif
/* Build a word with the <bits> lower bits set (reverse of popcount) */
static inline unsigned long nbits(int bits)