mirror of
https://github.com/MiyooCFW/buildroot.git
synced 2025-09-27 22:24:19 +03:00
Merge from bittboy/buildroot@db180c0
This commit is contained in:
19
package/haproxy/Config.in
Normal file
19
package/haproxy/Config.in
Normal file
@@ -0,0 +1,19 @@
|
||||
config BR2_PACKAGE_HAPROXY_ARCH_SUPPORTS
|
||||
bool
|
||||
default y
|
||||
# src/proto_http.c:6330:1: internal compiler error: Segmentation fault
|
||||
depends on !BR2_nios2
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60040
|
||||
depends on !(BR2_sh4 && !BR2_TOOLCHAIN_GCC_AT_LEAST_7)
|
||||
|
||||
config BR2_PACKAGE_HAPROXY
|
||||
bool "haproxy"
|
||||
depends on BR2_PACKAGE_HAPROXY_ARCH_SUPPORTS
|
||||
depends on BR2_USE_MMU # fork()
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4 # __sync_*_4 intrisics
|
||||
help
|
||||
HAProxy is a free, very fast and reliable solution offering
|
||||
high availability, load balancing, and proxying for TCP and
|
||||
HTTP-based applications.
|
||||
|
||||
http://www.haproxy.org
|
||||
5
package/haproxy/haproxy.hash
Normal file
5
package/haproxy/haproxy.hash
Normal file
@@ -0,0 +1,5 @@
|
||||
# Locally computed:
|
||||
sha256 ad46312fa1e38763863807d2c9304551c28ad91cff83f0c21a36756913c1c8e1 haproxy-1.9.1.tar.gz
|
||||
sha256 0717ca51fceaa25ac9e5ccc62e0c727dcf27796057201fb5fded56a25ff6ca28 LICENSE
|
||||
sha256 5df07007198989c622f5d41de8d703e7bef3d0e79d62e24332ee739a452af62a doc/lgpl.txt
|
||||
sha256 ddb9db7630752f8fdc6898f7c99a99eaeeac5213627ecb093df9c82f56175dc7 doc/gpl.txt
|
||||
88
package/haproxy/haproxy.mk
Normal file
88
package/haproxy/haproxy.mk
Normal file
@@ -0,0 +1,88 @@
|
||||
################################################################################
|
||||
#
|
||||
# haproxy
|
||||
#
|
||||
################################################################################
|
||||
|
||||
HAPROXY_VERSION_MAJOR = 1.9
|
||||
HAPROXY_VERSION = $(HAPROXY_VERSION_MAJOR).1
|
||||
HAPROXY_SITE = http://www.haproxy.org/download/$(HAPROXY_VERSION_MAJOR)/src
|
||||
HAPROXY_LICENSE = GPL-2.0+ and LGPL-2.1+ with exceptions
|
||||
HAPROXY_LICENSE_FILES = LICENSE doc/lgpl.txt doc/gpl.txt
|
||||
|
||||
HAPROXY_MAKE_OPTS = \
|
||||
LD=$(TARGET_CC) \
|
||||
PREFIX=/usr \
|
||||
TARGET=custom
|
||||
|
||||
ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
|
||||
HAPROXY_LIBS += -latomic
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
|
||||
# threads uses atomics on gcc >= 4.7 and sync otherwise (see
|
||||
# include/common/hathreads.h)
|
||||
ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_4_7):$(BR2_TOOLCHAIN_HAS_ATOMIC),y:y)
|
||||
HAPROXY_MAKE_OPTS += USE_THREAD=1
|
||||
else ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_4_7):$(BR2_TOOLCHAIN_HAS_SYNC_4),:y)
|
||||
HAPROXY_MAKE_OPTS += USE_THREAD=1
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LUA_5_3),y)
|
||||
HAPROXY_DEPENDENCIES += lua
|
||||
HAPROXY_MAKE_OPTS += \
|
||||
LUA_LIB_NAME=lua \
|
||||
USE_LUA=1
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
||||
HAPROXY_DEPENDENCIES += openssl
|
||||
HAPROXY_MAKE_OPTS += USE_OPENSSL=1
|
||||
ifeq ($(BR2_STATIC_LIBS),y)
|
||||
HAPROXY_LIBS += -lz
|
||||
endif
|
||||
endif
|
||||
|
||||
# pcre and pcre2 can't be enabled at the same time so prefer pcre2
|
||||
ifeq ($(BR2_PACKAGE_PCRE2),y)
|
||||
HAPROXY_DEPENDENCIES += pcre2
|
||||
HAPROXY_MAKE_OPTS += \
|
||||
PCRE2_CONFIG=$(STAGING_DIR)/usr/bin/pcre2-config \
|
||||
USE_PCRE2=1
|
||||
else ifeq ($(BR2_PACKAGE_PCRE),y)
|
||||
HAPROXY_DEPENDENCIES += pcre
|
||||
HAPROXY_MAKE_OPTS += \
|
||||
PCRE_CONFIG=$(STAGING_DIR)/usr/bin/pcre-config \
|
||||
USE_PCRE=1
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD),y)
|
||||
HAPROXY_DEPENDENCIES += systemd
|
||||
HAPROXY_MAKE_OPTS += USE_SYSTEMD=1
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_ZLIB),y)
|
||||
HAPROXY_DEPENDENCIES += zlib
|
||||
HAPROXY_MAKE_OPTS += USE_ZLIB=1
|
||||
endif
|
||||
|
||||
HAPROXY_MAKE_OPTS += ADDLIB="$(HAPROXY_LIBS)"
|
||||
|
||||
HAPROXY_CFLAGS = $(TARGET_CFLAGS)
|
||||
|
||||
ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_90620),y)
|
||||
HAPROXY_CFLAGS += -O0
|
||||
endif
|
||||
|
||||
define HAPROXY_BUILD_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
|
||||
$(HAPROXY_MAKE_OPTS) CFLAGS="$(HAPROXY_CFLAGS)" -C $(@D)
|
||||
endef
|
||||
|
||||
define HAPROXY_INSTALL_TARGET_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
|
||||
$(HAPROXY_MAKE_OPTS) -C $(@D) DESTDIR=$(TARGET_DIR) install
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
Reference in New Issue
Block a user