diff --git a/network/haproxy/pcre-linking-fix.patch b/network/haproxy/pcre-linking-fix.patch new file mode 100644 index 000000000..5f56fcee4 --- /dev/null +++ b/network/haproxy/pcre-linking-fix.patch @@ -0,0 +1,46 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: package/.../haproxy/pcre-linking-fix.patch +# Copyright (C) 2009 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# --- SDE-COPYRIGHT-NOTE-END --- + +From: Christian Wiese +Date: Thu, 20 Nov 2008 14:47:04 +0100 +Subject: [PATCH] [BUILD] Fixed Makefile for linking pcre + +If both make parameters USE_PCRE and USE_STATIC_PCRE are set to 1 +while building haproxy, pcre gets linked in dynamically. + +Therefore we check if USE_STATIC_PCRE was explicitely enabled to +ommit the CFLAGS and LDFLAGS normally set if USE_PCRE is enabled. + +diff --git a/Makefile b/Makefile +index f9696df..e141c5f 100644 +--- a/Makefile ++++ b/Makefile +@@ -387,12 +387,14 @@ ifneq ($(USE_PCRE),) + ifeq ($(PCREDIR),) + PCREDIR := $(shell pcre-config --prefix 2>/dev/null || echo /usr/local) + endif ++ifneq ($(USE_STATIC_PCRE),1) + OPTIONS_CFLAGS += -DUSE_PCRE -I$(PCREDIR)/include + OPTIONS_LDFLAGS += -L$(PCREDIR)/lib -lpcreposix -lpcre ++endif + BUILD_OPTIONS += $(call ignore_implicit,USE_PCRE) + endif + +-ifneq ($(USE_STATIC_PCRE),) ++ifeq ($(USE_STATIC_PCRE),1) + # PCREDIR is the directory hosting include/pcre.h and lib/libpcre.*. It is + # automatically detected but can be forced if required. + ifeq ($(PCREDIR),)