update buildroot to 2017.02.11

This commit is contained in:
jbnadal
2018-05-22 15:35:47 +02:00
parent 4bf1f5e091
commit a3c10bd762
9257 changed files with 433426 additions and 1701 deletions

View File

@@ -0,0 +1,153 @@
From 086b5fa8fe4ba74404e92b5f838263dfcf9f173d Mon Sep 17 00:00:00 2001
From: Jim Klimov <jim@jimklimov.com>
Date: Thu, 7 Apr 2016 03:56:51 +0200
Subject: [PATCH] Allow to customize path to gdlib-config and net-snmp-config
programs
[yann.morin.1998@free.fr: backport]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
Backported from upstream commit 086b5fa8fe4ba74404e92b5f838263dfcf9f173d
---
docs/configure.txt | 14 ++++++++++++++
m4/nut_check_libgd.m4 | 29 +++++++++++++++++++++++------
m4/nut_check_libnetsnmp.m4 | 25 +++++++++++++++++++++----
3 files changed, 58 insertions(+), 10 deletions(-)
diff --git a/docs/configure.txt b/docs/configure.txt
index aff82c1..b3b542a 100644
--- a/docs/configure.txt
+++ b/docs/configure.txt
@@ -23,6 +23,13 @@ Note that you need to install the libusb development package or files.
Build and install the SNMP drivers (default: auto-detect)
Note that you need to install libsnmp development package or files.
+ --with-net-snmp-config
+
+In addition to the `--with-snmp` option above, this one allows to provide
+a custom program name (in `PATH`) or complete pathname to `net-snmp-config`.
+This may be needed on build systems which support multiple architectures,
+or in cases where your distribution names this program differently.
+
--with-neon
Build and install the XML drivers (default: auto-detect)
@@ -335,6 +342,13 @@ NOTE: the --with-gd switches are not necessary if you have gd 2.0.8
or higher installed properly. The gdlib-config script will be
detected and used by default in that situation.
+ --with-gdlib-config
+
+This option allows to provide a custom program name (in `PATH`) or
+a complete pathname to `gdlib-config`. This may be needed on build
+systems which support multiple architectures, or in cases where your
+distribution names this program differently.
+
--with-ssl-includes, --with-usb-includes, --with-snmp-includes,
--with-neon-includes, --with-libltdl-includes,
--with-powerman-includes="-I/foo/bar"
diff --git a/m4/nut_check_libgd.m4 b/m4/nut_check_libgd.m4
index 01cc882..73f4da7 100644
--- a/m4/nut_check_libgd.m4
+++ b/m4/nut_check_libgd.m4
@@ -19,8 +19,25 @@ if test -z "${nut_have_libgd_seen}"; then
LDFLAGS="-L/usr/X11R6/lib"
LIBS="-lgd -lpng -lz -ljpeg -lfreetype -lm -lXpm -lX11"
- AC_MSG_CHECKING(for gd version via gdlib-config)
- GD_VERSION=`gdlib-config --version 2>/dev/null`
+ dnl By default seek in PATH
+ GDLIB_CONFIG=gdlib-config
+ AC_ARG_WITH(gdlib-config,
+ AS_HELP_STRING([@<:@--with-gdlib-config=/path/to/gdlib-config@:>@],
+ [path to program that reports GDLIB configuration]),
+ [
+ case "${withval}" in
+ "") ;;
+ yes|no)
+ AC_MSG_ERROR(invalid option --with(out)-gdlib-config - see docs/configure.txt)
+ ;;
+ *)
+ GDLIB_CONFIG="${withval}"
+ ;;
+ esac
+ ])
+
+ AC_MSG_CHECKING(for gd version via ${GDLIB_CONFIG})
+ GD_VERSION=`${GDLIB_CONFIG} --version 2>/dev/null`
if test "$?" != "0" -o -z "${GD_VERSION}"; then
GD_VERSION="none"
fi
@@ -30,13 +47,13 @@ if test -z "${nut_have_libgd_seen}"; then
none)
;;
2.0.5 | 2.0.6 | 2.0.7)
- AC_MSG_WARN([[gd ${GD_VERSION} detected, unable to use gdlib-config script]])
+ AC_MSG_WARN([[gd ${GD_VERSION} detected, unable to use ${GDLIB_CONFIG} script]])
AC_MSG_WARN([[If gd detection fails, upgrade gd or use --with-gd-includes and --with-gd-libs]])
;;
*)
- CFLAGS="`gdlib-config --includes 2>/dev/null`"
- LDFLAGS="`gdlib-config --ldflags 2>/dev/null`"
- LIBS="`gdlib-config --libs 2>/dev/null`"
+ CFLAGS="`${GDLIB_CONFIG} --includes 2>/dev/null`"
+ LDFLAGS="`${GDLIB_CONFIG} --ldflags 2>/dev/null`"
+ LIBS="`${GDLIB_CONFIG} --libs 2>/dev/null`"
;;
esac
diff --git a/m4/nut_check_libnetsnmp.m4 b/m4/nut_check_libnetsnmp.m4
index e1c1426..83b2633 100644
--- a/m4/nut_check_libnetsnmp.m4
+++ b/m4/nut_check_libnetsnmp.m4
@@ -13,9 +13,26 @@ if test -z "${nut_have_libnetsnmp_seen}"; then
CFLAGS_ORIG="${CFLAGS}"
LIBS_ORIG="${LIBS}"
+ dnl By default seek in PATH
+ NET_SNMP_CONFIG=net-snmp-config
+ AC_ARG_WITH(net-snmp-config,
+ AS_HELP_STRING([@<:@--with-net-snmp-config=/path/to/net-snmp-config@:>@],
+ [path to program that reports Net-SNMP configuration]),
+ [
+ case "${withval}" in
+ "") ;;
+ yes|no)
+ AC_MSG_ERROR(invalid option --with(out)-net-snmp-config - see docs/configure.txt)
+ ;;
+ *)
+ NET_SNMP_CONFIG="${withval}"
+ ;;
+ esac
+ ])
+
dnl See which version of the Net-SNMP library (if any) is installed
- AC_MSG_CHECKING(for Net-SNMP version via net-snmp-config)
- SNMP_VERSION=`net-snmp-config --version 2>/dev/null`
+ AC_MSG_CHECKING(for Net-SNMP version via ${NET_SNMP_CONFIG})
+ SNMP_VERSION=`${NET_SNMP_CONFIG} --version 2>/dev/null`
if test "$?" != "0" -o -z "${SNMP_VERSION}"; then
SNMP_VERSION="none"
fi
@@ -33,7 +50,7 @@ if test -z "${nut_have_libnetsnmp_seen}"; then
CFLAGS="${withval}"
;;
esac
- ], [CFLAGS="`net-snmp-config --base-cflags 2>/dev/null`"])
+ ], [CFLAGS="`${NET_SNMP_CONFIG} --base-cflags 2>/dev/null`"])
AC_MSG_RESULT([${CFLAGS}])
AC_MSG_CHECKING(for Net-SNMP libs)
@@ -48,7 +65,7 @@ if test -z "${nut_have_libnetsnmp_seen}"; then
LIBS="${withval}"
;;
esac
- ], [LIBS="`net-snmp-config --libs 2>/dev/null`"])
+ ], [LIBS="`${NET_SNMP_CONFIG} --libs 2>/dev/null`"])
AC_MSG_RESULT([${LIBS}])
dnl Check if the Net-SNMP library is usable
--
2.7.4

View File

@@ -0,0 +1,29 @@
From da0969b26ad4bb839bcb88362c8f41aaf0eb8363 Mon Sep 17 00:00:00 2001
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
Date: Tue, 11 Oct 2016 12:05:36 +0200
Subject: [PATCH] client/ups: add missing include
struct timeval is declared in sys/time.h, so we need to #include it.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
Backported from upstream commit da0969b26ad4bb839bcb88362c8f41aaf0eb8363
---
clients/upsclient.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/clients/upsclient.c b/clients/upsclient.c
index 43c0e79..dfadd0d 100644
--- a/clients/upsclient.c
+++ b/clients/upsclient.c
@@ -37,6 +37,7 @@
#include <netinet/in.h>
#include <arpa/inet.h>
#include <fcntl.h>
+#include <sys/time.h>
#include "upsclient.h"
#include "common.h"
--
2.7.4

View File

@@ -0,0 +1,26 @@
comment "nut needs a toolchain w/ C++"
depends on BR2_USE_MMU
depends on !BR2_INSTALL_LIBSTDCPP
config BR2_PACKAGE_NUT
bool "nut"
depends on BR2_USE_MMU # fork()
depends on BR2_INSTALL_LIBSTDCPP
help
Network UPS tools
The primary goal of the Network UPS Tools (NUT) project is to provide
support for Power Devices, such as Uninterruptible Power Supplies,
Power Distribution Units and Solar Controllers.
http://www.networkupstools.org/
if BR2_PACKAGE_NUT
config BR2_PACKAGE_NUT_DRIVERS
string "drivers"
help
Select the individual drivers to enable, in a comma-separated list.
Leave empty for all.
endif # BR2_PACKAGE_NUT

View File

@@ -0,0 +1,2 @@
# From http://www.networkupstools.org/source/2.7/nut-2.7.2.tar.gz.sha256
sha256 980e82918c52d364605c0703a5dcf01f74ad2ef06e3d365949e43b7d406d25a7 nut-2.7.4.tar.gz

View File

@@ -0,0 +1,95 @@
################################################################################
#
# nut
#
################################################################################
NUT_VERSION_MAJOR = 2.7
NUT_VERSION = $(NUT_VERSION_MAJOR).4
NUT_SITE = http://www.networkupstools.org/source/$(NUT_VERSION_MAJOR)
NUT_LICENSE = GPLv2+, GPLv3+ (python scripts), GPL/Artistic (perl client)
NUT_LICENSE_FILES = COPYING LICENSE-GPL2 LICENSE-GPL3
NUT_DEPENDENCIES = host-pkgconf
# Our patch changes m4 macros, so we need to autoreconf
NUT_AUTORECONF = YES
# Race condition in tools generation
NUT_MAKE = $(MAKE1)
# Put the PID files in a read-write place (/var/run is a tmpfs)
# since the default location (/var/state/ups) maybe readonly.
NUT_CONF_OPTS = \
--with-altpidpath=/var/run/upsd \
--without-hal
# For uClibc-based toolchains, nut forgets to link with -lm
ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
NUT_CONF_ENV += LDFLAGS="$(TARGET_LDFLAGS) -lm"
endif
ifeq ($(call qstrip,$(BR2_PACKAGE_NUT_DRIVERS)),)
NUT_CONF_OPTS += --with-drivers=all
else
NUT_CONF_OPTS += --with-drivers=$(BR2_PACKAGE_NUT_DRIVERS)
endif
ifeq ($(BR2_PACKAGE_AVAHI)$(BR2_PACKAGE_DBUS),yy)
NUT_DEPENDENCIES += avahi dbus
NUT_CONF_OPTS += --with-avahi
else
NUT_CONF_OPTS += --without-avahi
endif
# gd with support for png is required for the CGI
ifeq ($(BR2_PACKAGE_GD)$(BR2_PACKAGE_LIBPNG),yy)
NUT_DEPENDENCIES += gd libpng
NUT_CONF_OPTS += \
--with-cgi \
--with-gdlib-config=$(STAGING_DIR)/usr/bin/gdlib-config
else
NUT_CONF_OPTS += --without-cgi
endif
# nut-scanner needs libltdl, which is a wrapper arounf dlopen/dlsym,
# so is not available for static-only builds.
# There is no flag to directly enable/disable nut-scanner, it's done
# via the --enable/disable-libltdl flag.
ifeq ($(BR2_STATIC_LIBS):$(BR2_PACKAGE_LIBTOOL),:y)
NUT_DEPENDENCIES += libtool
NUT_CONF_OPTS += --with-libltdl
else
NUT_CONF_OPTS += --without-libltdl
endif
ifeq ($(BR2_PACKAGE_LIBUSB_COMPAT),y)
NUT_DEPENDENCIES += libusb-compat
NUT_CONF_OPTS += --with-usb
else
NUT_CONF_OPTS += --without-usb
endif
ifeq ($(BR2_PACKAGE_NEON_EXPAT)$(BR2_PACKAGE_NEON_LIBXML2),y)
NUT_DEPENDENCIES += neon
NUT_CONF_OPTS += --with-neon
else
NUT_CONF_OPTS += --without-neon
endif
ifeq ($(BR2_PACKAGE_NETSNMP),y)
NUT_DEPENDENCIES += netsnmp
NUT_CONF_OPTS += \
--with-snmp \
--with-net-snmp-config=$(STAGING_DIR)/usr/bin/net-snmp-config
else
NUT_CONF_OPTS += --without-snmp
endif
ifeq ($(BR2_PACKAGE_OPENSSL),y)
NUT_DEPENDENCIES += openssl
NUT_CONF_OPTS += --with-ssl
else
NUT_CONF_OPTS += --without-ssl
endif
$(eval $(autotools-package))