# Locally computed:
-sha256 c5a300b86775435c076d58a79cc0d5a977d76027d2a7d721590729b7f369fa43 libupnp-1.6.25.tar.bz2
-sha256 0375955c8a79d6e8fa0792d45d00fc4e7710d7ac95bcbd27f9225a83f5c946fd LICENSE
+sha256 ecb23d4291968c8a7bdd4eb16fc2250dbacc16b354345a13342d67f571d35ceb libupnp-1.14.0.tar.bz2
+sha256 c8b99423cad48bb44e2cf52a496361404290865eac259a82da6d1e4331ececb3 COPYING
#
################################################################################
-LIBUPNP_VERSION = 1.6.25
+LIBUPNP_VERSION = 1.14.0
LIBUPNP_SOURCE = libupnp-$(LIBUPNP_VERSION).tar.bz2
-LIBUPNP_SITE = http://downloads.sourceforge.net/project/pupnp/pupnp/libUPnP%20$(LIBUPNP_VERSION)
+LIBUPNP_SITE = \
+ http://downloads.sourceforge.net/project/pupnp/pupnp/libupnp-$(LIBUPNP_VERSION)
LIBUPNP_CONF_ENV = ac_cv_lib_compat_ftime=no
LIBUPNP_INSTALL_STAGING = YES
LIBUPNP_LICENSE = BSD-3-Clause
-LIBUPNP_LICENSE_FILES = LICENSE
+LIBUPNP_LICENSE_FILES = COPYING
LIBUPNP_CPE_ID_VALID = YES
+LIBUPNP_DEPENDENCIES = host-pkgconf
+
+# Bind the internal miniserver socket with reuseaddr to allow clean restarts.
+LIBUPNP_CONF_OPTS += --enable-reuseaddr
+
+ifeq ($(BR2_PACKAGE_OPENSSL),y)
+LIBUPNP_CONF_OPTS += --enable-open-ssl
+LIBUPNP_DEPENDENCIES += openssl
+else
+LIBUPNP_CONF_OPTS += --disable-open-ssl
+endif
$(eval $(autotools-package))