Merge pull request #8044 from diizzyy/libs-jsoncpp
authorTed Hess <thess@kitschensync.net>
Mon, 28 Jan 2019 14:23:23 +0000 (09:23 -0500)
committerGitHub <noreply@github.com>
Mon, 28 Jan 2019 14:23:23 +0000 (09:23 -0500)
jsoncpp: Add to repo

libs/libupnp/Makefile
libs/libupnp/patches/100-fix-pthread-detach.patch [new file with mode: 0644]
libs/libupnpp/Makefile

index 8dd2cea15f3ac7ea95b0907266d4080057e81727..a086394695ae8eab88660030b0a23bdd9350cb16 100644 (file)
@@ -1,12 +1,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libupnp
-PKG_VERSION:=1.6.25
+PKG_VERSION:=1.8.4
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=@SF/pupnp
-PKG_HASH:=c5a300b86775435c076d58a79cc0d5a977d76027d2a7d721590729b7f369fa43
+PKG_HASH:=188d3f786d92fe14191f17634d2d87847eee7d2b568a5257ea23262fec9973d6
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
 
 PKG_FIXUP:=autoreconf
@@ -45,18 +45,23 @@ define Package/libupnp-sample/description
 TVcontrolpoint & tvdevice sample applications run inside /etc/upnp-tvdevice/
 endef
 
+TARGET_CFLAGS += -flto
+TARGET_LDFLAGS += -flto
+
+CONFIGURE_VARS += ac_cv_lib_compat_ftime=no
+
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include
        $(CP) $(PKG_INSTALL_DIR)/usr/include/upnp $(1)/usr/include/
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{ixml,threadutil,upnp}.{a,so*,la} $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{ixml,upnp}.{a,so*,la} $(1)/usr/lib/
        $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libupnp.pc $(1)/usr/lib/pkgconfig/
 endef
 
 define Package/libupnp/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{ixml,threadutil,upnp}.so.* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{ixml,upnp}.so.* $(1)/usr/lib/
 endef
 
 define Package/libupnp-sample/install
diff --git a/libs/libupnp/patches/100-fix-pthread-detach.patch b/libs/libupnp/patches/100-fix-pthread-detach.patch
new file mode 100644 (file)
index 0000000..5e384d3
--- /dev/null
@@ -0,0 +1,24 @@
+From 386b7ed79146ecf7a3bba49f48cb8f41a9b49170 Mon Sep 17 00:00:00 2001
+From: Jean-Francois Dockes <jf@dockes.org>
+Date: Sun, 27 Jan 2019 10:44:17 +0100
+Subject: [PATCH] Do not try to detach detached thread, the result is
+ undefined. Fixes issue #102
+
+---
+ upnp/src/threadutil/ThreadPool.c | 5 -----
+ 1 file changed, 5 deletions(-)
+
+--- a/upnp/src/threadutil/ThreadPool.c
++++ b/upnp/src/threadutil/ThreadPool.c
+@@ -651,11 +651,6 @@ static int CreateWorker(
+       rc = ithread_create(&temp, &attr, WorkerThread, tp);
+       ithread_attr_destroy(&attr);
+       if (rc == 0) {
+-              rc = ithread_detach(temp);
+-              /* ithread_detach will return EINVAL if thread has been
+-               successfully detached by ithread_create */
+-              if (rc == EINVAL)
+-                      rc = 0;
+               tp->pendingWorkerThreadStart = 1;
+               /* wait until the new worker thread starts */
+               while (tp->pendingWorkerThreadStart) {
index 0e5751f606ea06c47fdf53af5aa58d9f164d1277..8848404adc8903110a2c275d56100b77fea2b936 100644 (file)
@@ -8,16 +8,17 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libupnpp
-PKG_VERSION:=0.14.0
+PKG_VERSION:=0.17.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.lesbonscomptes.com/upmpdcli/downloads
-PKG_HASH:=13027f8e2b5341d00370ccf34eb8845f1bce73ec58890c02a38dc639e9f91b13
+PKG_SOURCE_URL:=https://www.lesbonscomptes.com/upmpdcli/downloads
+PKG_HASH:=7035dda48207c254cbd8cd64e4e679a9e5f085a35d28c19bc2ddeba0deaff58b
 PKG_MAINTAINER:=Petko Bordjukov <bordjukov@gmail.com>
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
 
+PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
@@ -25,7 +26,7 @@ include $(INCLUDE_DIR)/package.mk
 define Package/libupnpp
   SECTION:=libs
   CATEGORY:=Libraries
-  URL:=http://www.lesbonscomptes.com/upmpdcli
+  URL:=https://www.lesbonscomptes.com/upmpdcli
   DEPENDS+= +libstdcpp +libexpat +librt +libcurl +libupnp
   TITLE:=The libupnpp C++ library wraps libupnp for easier use by upmpdcli and upplay
 endef
@@ -39,8 +40,9 @@ define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include
        $(CP) $(PKG_INSTALL_DIR)/usr/include/libupnpp $(1)/usr/include/
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libupnpp.so* $(1)/usr/lib/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libupnpp.la $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libupnpp.{la,so*} $(1)/usr/lib/
+       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libupnpp.pc $(1)/usr/lib/pkgconfig/
 endef
 
 define Package/libupnpp/install