* [Buildroot] [PATCH 1/7] package/libupnpp: add patch to get pkg-config file
2016-09-14 11:41 [Buildroot] [PATCH 0/7] package/upmpdcli: fix build issues Jörg Krause
@ 2016-09-14 11:41 ` Jörg Krause
2016-09-14 11:41 ` [Buildroot] [PATCH 2/7] package/upmpdcli: requires GCC 4.7 Jörg Krause
` (5 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Jörg Krause @ 2016-09-14 11:41 UTC (permalink / raw)
To: buildroot
Apply a patch from upstream to install a pkg-config file for libupnpp.
The pkg-config file is needed to fix a build issue with upmpdcli.
Fetch from:
https://github.com/medoc92/libupnpp/commit/9f03bb0e7b47e2843edea6f25ed9eabbfb6412df
Signed-off-by: J?rg Krause <joerg.krause@embedded.rocks>
---
package/libupnpp/0002-Add-pkg-config-file.patch | 63 +++++++++++++++++++++++++
package/libupnpp/libupnpp.mk | 4 +-
2 files changed, 66 insertions(+), 1 deletion(-)
create mode 100644 package/libupnpp/0002-Add-pkg-config-file.patch
diff --git a/package/libupnpp/0002-Add-pkg-config-file.patch b/package/libupnpp/0002-Add-pkg-config-file.patch
new file mode 100644
index 0000000..377b5e0
--- /dev/null
+++ b/package/libupnpp/0002-Add-pkg-config-file.patch
@@ -0,0 +1,63 @@
+From 22ec8e3a2b54a4e1fd1340a592f49829d6cde735 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?J=C3=B6rg=20Krause?= <joerg.krause@embedded.rocks>
+Date: Sun, 11 Sep 2016 22:26:33 +0200
+Subject: [PATCH] Add pkg-config file
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Add a pkg-config file.
+
+Fetched from:
+https://github.com/medoc92/libupnpp/commit/9f03bb0e7b47e2843edea6f25ed9eabbfb6412df
+
+Signed-off-by: J?rg Krause <joerg.krause@embedded.rocks>
+---
+ Makefile.am | 3 +++
+ configure.ac | 1 +
+ libupnpp.pc.in | 12 ++++++++++++
+ 3 files changed, 16 insertions(+)
+ create mode 100644 libupnpp.pc.in
+
+diff --git a/Makefile.am b/Makefile.am
+index 2d20b9b..39559e9 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -112,3 +112,6 @@ nobase_include_HEADERS = \
+ libupnpp_la_LDFLAGS = -version-info $(VERSION_INFO)
+
+ libupnpp_la_LIBADD = $(LIBUPNPP_LIBS)
++
++pkgconfigdir = $(libdir)/pkgconfig
++pkgconfig_DATA = libupnpp.pc
+diff --git a/configure.ac b/configure.ac
+index 9ff2058..89525b3 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -90,4 +90,5 @@ AC_SUBST(LIBUPNPP_LIBS)
+ AC_SUBST(VERSION_INFO)
+
+ AC_CONFIG_FILES([Makefile])
++AC_CONFIG_FILES([libupnpp.pc])
+ AC_OUTPUT
+diff --git a/libupnpp.pc.in b/libupnpp.pc.in
+new file mode 100644
+index 0000000..90f4b2b
+--- /dev/null
++++ b/libupnpp.pc.in
+@@ -0,0 +1,12 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: @PACKAGE_NAME@
++Description: C++ wrapper for libupnp
++Version: @PACKAGE_VERSION@
++Requires: libcurl libupnp
++Libs: -L${libdir} -lupnpp
++Libs.private: -lexpat -lpthread -lrt
++Cflags: -I${includedir}
+--
+2.9.3
+
diff --git a/package/libupnpp/libupnpp.mk b/package/libupnpp/libupnpp.mk
index ab1ce8b..d712c21 100644
--- a/package/libupnpp/libupnpp.mk
+++ b/package/libupnpp/libupnpp.mk
@@ -10,7 +10,9 @@ LIBUPNPP_LICENSE = GPLv2+
LIBUPNPP_LICENSE_FILES = COPYING
LIBUPNPP_INSTALL_STAGING = YES
LIBUPNPP_DEPENDENCIES = expat libcurl libupnp
-# touching configure.ac in 0001-Check-for-std-future.patch
+# touching configure.ac in:
+# 0001-Check-for-std-future.patch
+# 0002-Add-pkg-config-file.patch
LIBUPNPP_AUTORECONF = YES
# configure script fails to link against the dependencies of libupnp
--
2.9.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 2/7] package/upmpdcli: requires GCC 4.7
2016-09-14 11:41 [Buildroot] [PATCH 0/7] package/upmpdcli: fix build issues Jörg Krause
2016-09-14 11:41 ` [Buildroot] [PATCH 1/7] package/libupnpp: add patch to get pkg-config file Jörg Krause
@ 2016-09-14 11:41 ` Jörg Krause
2016-09-14 11:41 ` [Buildroot] [PATCH 3/7] package/upmpdcli: fix missing dependencies Jörg Krause
` (4 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Jörg Krause @ 2016-09-14 11:41 UTC (permalink / raw)
To: buildroot
upmpdcli now uses C++11 features, meaning the minimum usable GCC version
is 4.7.
Signed-off-by: J?rg Krause <joerg.krause@embedded.rocks>
---
package/upmpdcli/Config.in | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/package/upmpdcli/Config.in b/package/upmpdcli/Config.in
index e17330c..b075d7a 100644
--- a/package/upmpdcli/Config.in
+++ b/package/upmpdcli/Config.in
@@ -3,7 +3,7 @@ config BR2_PACKAGE_UPMPDCLI
depends on BR2_USE_MMU # fork()
depends on BR2_INSTALL_LIBSTDCPP
depends on BR2_TOOLCHAIN_HAS_THREADS # libupnpp -> libupnp
- depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
+ depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 # C++11
select BR2_PACKAGE_LIBMPDCLIENT
select BR2_PACKAGE_LIBUPNPP
help
@@ -13,6 +13,6 @@ config BR2_PACKAGE_UPMPDCLI
http://www.lesbonscomptes.com/upmpdcli/
-comment "upmpdcli needs a toolchain w/ C++, threads, gcc >= 4.6"
+comment "upmpdcli needs a toolchain w/ C++, threads, gcc >= 4.7"
depends on BR2_USE_MMU
- depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
+ depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
--
2.9.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 3/7] package/upmpdcli: fix missing dependencies
2016-09-14 11:41 [Buildroot] [PATCH 0/7] package/upmpdcli: fix build issues Jörg Krause
2016-09-14 11:41 ` [Buildroot] [PATCH 1/7] package/libupnpp: add patch to get pkg-config file Jörg Krause
2016-09-14 11:41 ` [Buildroot] [PATCH 2/7] package/upmpdcli: requires GCC 4.7 Jörg Krause
@ 2016-09-14 11:41 ` Jörg Krause
2016-09-14 11:41 ` [Buildroot] [PATCH 4/7] package/upmpdcli: add patch to fix jsoncpp detection Jörg Krause
` (3 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Jörg Krause @ 2016-09-14 11:41 UTC (permalink / raw)
To: buildroot
Starting with version 1.2 upmpdcli depends on libmicrohttpd and jsoncpp.
libmicrohttpd needs threads, jsoncpp needs C++ and gcc >= 4.7. These
dependencies are already met by upmpdcli.
Signed-off-by: J?rg Krause <joerg.krause@embedded.rocks>
---
package/upmpdcli/Config.in | 2 ++
package/upmpdcli/upmpdcli.mk | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/package/upmpdcli/Config.in b/package/upmpdcli/Config.in
index b075d7a..9fb6285 100644
--- a/package/upmpdcli/Config.in
+++ b/package/upmpdcli/Config.in
@@ -6,6 +6,8 @@ config BR2_PACKAGE_UPMPDCLI
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 # C++11
select BR2_PACKAGE_LIBMPDCLIENT
select BR2_PACKAGE_LIBUPNPP
+ select BR2_PACKAGE_LIBMICROHTTPD
+ select BR2_PACKAGE_JSONCPP
help
upmpdcli is a UPnP Media Renderer front-end for MPD, the Music
Player Daemon. It supports UPnP gapless track transitions and
diff --git a/package/upmpdcli/upmpdcli.mk b/package/upmpdcli/upmpdcli.mk
index a7b98c9..85b78fe 100644
--- a/package/upmpdcli/upmpdcli.mk
+++ b/package/upmpdcli/upmpdcli.mk
@@ -8,7 +8,7 @@ UPMPDCLI_VERSION = 1.2.2
UPMPDCLI_SITE = http://www.lesbonscomptes.com/upmpdcli/downloads
UPMPDCLI_LICENSE = GPLv2+
UPMPDCLI_LICENSE_FILES = COPYING
-UPMPDCLI_DEPENDENCIES = libmpdclient libupnpp
+UPMPDCLI_DEPENDENCIES = libmpdclient libupnpp libmicrohttpd jsoncpp
ifeq ($(BR2_STATIC_LIBS),y)
# Upmpdcli forgets to take the dependencies of libupnpp into
--
2.9.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 4/7] package/upmpdcli: add patch to fix jsoncpp detection
2016-09-14 11:41 [Buildroot] [PATCH 0/7] package/upmpdcli: fix build issues Jörg Krause
` (2 preceding siblings ...)
2016-09-14 11:41 ` [Buildroot] [PATCH 3/7] package/upmpdcli: fix missing dependencies Jörg Krause
@ 2016-09-14 11:41 ` Jörg Krause
2016-09-14 11:41 ` [Buildroot] [PATCH 5/7] package/upmpdcli: add patch to fix unsafe header path Jörg Krause
` (2 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Jörg Krause @ 2016-09-14 11:41 UTC (permalink / raw)
To: buildroot
Although jsoncpp is present, the build system of upmpdcli does not detect it.
The default installation path for the header files of jsoncpp is
{prefix}/json, but some systems (Debian) prefers to install the headers
in {prefix}/jsoncpp/json.
The build system only checks for the header files in
{prefix}/jsoncpp/json, so jsoncpp is not found.
This patch from upstream handles both cases now when checking for the jsoncpp
library.
The patch is squashed of two commits from upstream:
1/ aba96db0cfe8a2e5c825f4448c0ad184e21b50e1
2/ ce144f19a8c2e8c1e0ec3fe53699e874e5eb43fe
Fixes:
http://autobuild.buildroot.net/results/5bc6c558fccea0e1e1936894ce372f2b7b8ecac2
http://autobuild.buildroot.net/results/9c2d3892f17c240c44f7255d821d66acbed361f0
http://autobuild.buildroot.net/results/4d22729535ca4e6acbb48a25145611bb49c10149
http://autobuild.buildroot.net/results/fda321774c3eb225f966dd9f83def5329b703a03
http://autobuild.buildroot.net/results/f5eb306b0032e830f7f72ce80e318aa11774a5d1
.. and many more!
Signed-off-by: J?rg Krause <joerg.krause@embedded.rocks>
---
package/upmpdcli/0001-fix-jsoncpp-detection.patch | 90 +++++++++++++++++++++++
package/upmpdcli/upmpdcli.mk | 3 +
2 files changed, 93 insertions(+)
create mode 100644 package/upmpdcli/0001-fix-jsoncpp-detection.patch
diff --git a/package/upmpdcli/0001-fix-jsoncpp-detection.patch b/package/upmpdcli/0001-fix-jsoncpp-detection.patch
new file mode 100644
index 0000000..69a9a0e
--- /dev/null
+++ b/package/upmpdcli/0001-fix-jsoncpp-detection.patch
@@ -0,0 +1,90 @@
+From 25762953c019ca0c5a047a5fa28f1fe6c78c731a Mon Sep 17 00:00:00 2001
+From: Jean-Francois Dockes <jf@dockes.org>
+Date: Sun, 11 Sep 2016 13:43:28 +0200
+Subject: [PATCH] fix jsoncpp detection
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The default installation path for the header files is {prefix}/json, but some
+system prefers to install the headers in {prefix}/jsoncpp/json.
+
+This patch from upstream handles both cases now when checking for the jsoncpp
+library.
+
+The patch is squashed of two commits from upstream:
+1/ aba96db0cfe8a2e5c825f4448c0ad184e21b50e1
+2/ ce144f19a8c2e8c1e0ec3fe53699e874e5eb43fe
+
+Signed-off-by: J?rg Krause <joerg.krause@embedded.rocks>
+---
+ configure.ac | 8 +++++++-
+ src/config.h.in | 6 ++++++
+ src/mediaserver/cdplugins/plgwithslave.cxx | 5 +++++
+ 3 files changed, 18 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index f191ad7..108dcce 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -43,9 +43,15 @@ SCCTL_LIBS=$LIBS
+ AC_CHECK_LIB([microhttpd], [MHD_queue_response], [], [])
+
+ AC_LANG_PUSH([C++])
++
++AC_CHECK_HEADERS(json/json.h jsoncpp/json/json.h)
+ LIBS="$LIBS -ljsoncpp"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM(
+- [#include <jsoncpp/json/json.h>], [Json::Features dummy])],
++ [[#ifdef HAVE_JSONCPP_JSON_JSON_H
++ #include <jsoncpp/json/json.h>
++ #else
++ #include <json/json.h>
++ #endif]], [Json::Features dummy])],
+ [HAVE_JSONCPP=1],
+ [AC_MSG_ERROR([libjsoncpp not found.])])
+ AC_LANG_POP
+diff --git a/src/config.h.in b/src/config.h.in
+index 1350308..0a33e15 100644
+--- a/src/config.h.in
++++ b/src/config.h.in
+@@ -3,6 +3,12 @@
+ /* Define to 1 if you have the <inttypes.h> header file. */
+ #undef HAVE_INTTYPES_H
+
++/* Define to 1 if you have the <jsoncpp/json/json.h> header file. */
++#undef HAVE_JSONCPP_JSON_JSON_H
++
++/* Define to 1 if you have the <json/json.h> header file. */
++#undef HAVE_JSON_JSON_H
++
+ /* Define to 1 if you have the `microhttpd' library (-lmicrohttpd). */
+ #undef HAVE_LIBMICROHTTPD
+
+diff --git a/src/mediaserver/cdplugins/plgwithslave.cxx b/src/mediaserver/cdplugins/plgwithslave.cxx
+index 04f0544..545805c 100644
+--- a/src/mediaserver/cdplugins/plgwithslave.cxx
++++ b/src/mediaserver/cdplugins/plgwithslave.cxx
+@@ -14,6 +14,7 @@
+ * Free Software Foundation, Inc.,
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
++#include "config.h"
+
+ #include "plgwithslave.hxx"
+
+@@ -25,7 +26,11 @@
+ #include <string.h>
+ #include <upnp/upnp.h>
+ #include <microhttpd.h>
++#ifdef HAVE_JSONCPP_JSON_JSON_H
+ #include <jsoncpp/json/json.h>
++#else
++#include <json/json.h>
++#endif
+
+ #include "cmdtalk.h"
+ #include "pathut.h"
+--
+2.9.3
+
diff --git a/package/upmpdcli/upmpdcli.mk b/package/upmpdcli/upmpdcli.mk
index 85b78fe..b70f413 100644
--- a/package/upmpdcli/upmpdcli.mk
+++ b/package/upmpdcli/upmpdcli.mk
@@ -9,6 +9,9 @@ UPMPDCLI_SITE = http://www.lesbonscomptes.com/upmpdcli/downloads
UPMPDCLI_LICENSE = GPLv2+
UPMPDCLI_LICENSE_FILES = COPYING
UPMPDCLI_DEPENDENCIES = libmpdclient libupnpp libmicrohttpd jsoncpp
+# touching configure.ac in
+# 0001-fix-jsoncpp-detection.patch
+UPMPDCLI_AUTORECONF = YES
ifeq ($(BR2_STATIC_LIBS),y)
# Upmpdcli forgets to take the dependencies of libupnpp into
--
2.9.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 5/7] package/upmpdcli: add patch to fix unsafe header path
2016-09-14 11:41 [Buildroot] [PATCH 0/7] package/upmpdcli: fix build issues Jörg Krause
` (3 preceding siblings ...)
2016-09-14 11:41 ` [Buildroot] [PATCH 4/7] package/upmpdcli: add patch to fix jsoncpp detection Jörg Krause
@ 2016-09-14 11:41 ` Jörg Krause
2016-09-14 11:41 ` [Buildroot] [PATCH 6/7] package/upmpdcli: add patch to fix include path of log Jörg Krause
2016-09-14 11:41 ` [Buildroot] [PATCH 7/7] package/upmpdcli: use pkg-config for libupnpp Jörg Krause
6 siblings, 0 replies; 10+ messages in thread
From: Jörg Krause @ 2016-09-14 11:41 UTC (permalink / raw)
To: buildroot
Building upmpdcli aborts because of an unsafe header inclusion of
`/usr/include/libupnpp`. Using `{prefix}` to get the header path is
wrong for cross-compilation.
Instead of hard-coding the flags for libupnpp use pkg-config to get the
correct ones.
Note that this add the host-pkgconfig dependency unconditionally.
Upstream-status: https://github.com/medoc92/upmpdcli/pull/49
Signed-off-by: J?rg Krause <joerg.krause@embedded.rocks>
---
| 48 ++++++++++++++++++++++
package/upmpdcli/upmpdcli.mk | 4 +-
2 files changed, 50 insertions(+), 2 deletions(-)
create mode 100644 package/upmpdcli/0002-Fix-unsafe-header-path-when-cross-compiling.patch
--git a/package/upmpdcli/0002-Fix-unsafe-header-path-when-cross-compiling.patch b/package/upmpdcli/0002-Fix-unsafe-header-path-when-cross-compiling.patch
new file mode 100644
index 0000000..44d9814
--- /dev/null
+++ b/package/upmpdcli/0002-Fix-unsafe-header-path-when-cross-compiling.patch
@@ -0,0 +1,48 @@
+From 0cf81723bf5de00723ec149bcfa4f2050a4c3a04 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?J=C3=B6rg=20Krause?= <joerg.krause@embedded.rocks>
+Date: Wed, 14 Sep 2016 11:43:21 +0200
+Subject: [PATCH] Fix unsafe header path when cross-compiling
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Building upmpdcli aborts because of an unsafe header inclusion of
+`/usr/include/libupnpp`. Using `{prefix}` to get the header path is wrong for
+cross-compilation. Instead of hard-coding the flags for libupnpp use pkg-config
+to get the correct ones.
+
+Upstream-status: https://github.com/medoc92/upmpdcli/pull/49
+
+Signed-off-by: J?rg Krause <joerg.krause@embedded.rocks>
+---
+ Makefile.am | 2 +-
+ configure.ac | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index d0c10a4..5c83aa1 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,5 +1,5 @@
+ AM_CPPFLAGS = -DDEBUG -g -Wall \
+- -I${prefix}/include/libupnpp \
++ $(upnpp_CFLAGS) \
+ -I$(top_srcdir)/src \
+ -DDATADIR=\"${pkgdatadir}\" -DCONFIGDIR=\"${sysconfdir}\"
+
+diff --git a/configure.ac b/configure.ac
+index 108dcce..1c3985e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -35,7 +35,7 @@ dnl AC_CHECK_LIB([upnp], [UpnpInit], [], AC_MSG_ERROR([libupnp not found]))
+ dnl AC_CHECK_LIB([curl], [curl_easy_init], [],AC_MSG_ERROR([libcurl not found]))
+ dnl AC_CHECK_LIB([expat], [XML_ParserCreate], [],AC_MSG_ERROR([libexpat not found]))
+
+-AC_CHECK_LIB([upnpp], [getsyshwaddr], [], [AC_MSG_ERROR([libupnpp])])
++PKG_CHECK_MODULES([upnpp], [libupnpp], [], [AC_MSG_ERROR([libupnpp])])
+ AC_CHECK_LIB([mpdclient], [mpd_connection_new], [],
+ AC_MSG_ERROR([libmpdclient not found]))
+ SCCTL_LIBS=$LIBS
+--
+2.9.3
+
diff --git a/package/upmpdcli/upmpdcli.mk b/package/upmpdcli/upmpdcli.mk
index b70f413..3f521cf 100644
--- a/package/upmpdcli/upmpdcli.mk
+++ b/package/upmpdcli/upmpdcli.mk
@@ -8,9 +8,10 @@ UPMPDCLI_VERSION = 1.2.2
UPMPDCLI_SITE = http://www.lesbonscomptes.com/upmpdcli/downloads
UPMPDCLI_LICENSE = GPLv2+
UPMPDCLI_LICENSE_FILES = COPYING
-UPMPDCLI_DEPENDENCIES = libmpdclient libupnpp libmicrohttpd jsoncpp
+UPMPDCLI_DEPENDENCIES = host-pkgconf libmpdclient libupnpp libmicrohttpd jsoncpp
# touching configure.ac in
# 0001-fix-jsoncpp-detection.patch
+# 0002-Fix-unsafe-header-path-when-cross-compiling
UPMPDCLI_AUTORECONF = YES
ifeq ($(BR2_STATIC_LIBS),y)
@@ -20,7 +21,6 @@ ifeq ($(BR2_STATIC_LIBS),y)
# handle the dependencies here.
# The build system doesn't expand LIBS from the configure step, so
# manually pass it to make.
-UPMPDCLI_DEPENDENCIES += host-pkgconf
UPMPDCLI_MAKE_OPTS = \
LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs expat libcurl libupnp`"
endif
--
2.9.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 6/7] package/upmpdcli: add patch to fix include path of log
2016-09-14 11:41 [Buildroot] [PATCH 0/7] package/upmpdcli: fix build issues Jörg Krause
` (4 preceding siblings ...)
2016-09-14 11:41 ` [Buildroot] [PATCH 5/7] package/upmpdcli: add patch to fix unsafe header path Jörg Krause
@ 2016-09-14 11:41 ` Jörg Krause
2016-09-14 11:41 ` [Buildroot] [PATCH 7/7] package/upmpdcli: use pkg-config for libupnpp Jörg Krause
6 siblings, 0 replies; 10+ messages in thread
From: Jörg Krause @ 2016-09-14 11:41 UTC (permalink / raw)
To: buildroot
The "log.{h,hxx}" header files are included from libupnpp.
As we are using the pkg-config file of libupnpp to get the header
include path,
instead of the hardcoded `{prefix}/include/libupnpp` these files are not
found.
Upstream-status: https://github.com/medoc92/upmpdcli/issues/46
Signed-off-by: J?rg Krause <joerg.krause@embedded.rocks>
---
| 110 +++++++++++++++++++++
1 file changed, 110 insertions(+)
create mode 100644 package/upmpdcli/0003-Fix-including-header-file-log.h-from-libupnpp.patch
--git a/package/upmpdcli/0003-Fix-including-header-file-log.h-from-libupnpp.patch b/package/upmpdcli/0003-Fix-including-header-file-log.h-from-libupnpp.patch
new file mode 100644
index 0000000..29e6492
--- /dev/null
+++ b/package/upmpdcli/0003-Fix-including-header-file-log.h-from-libupnpp.patch
@@ -0,0 +1,110 @@
+From 366e726821abce305ef2887effea443a24043511 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?J=C3=B6rg=20Krause?= <joerg.krause@embedded.rocks>
+Date: Wed, 14 Sep 2016 11:46:22 +0200
+Subject: [PATCH] Fix including header file log.h from libupnpp
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The "log.{h,hxx}" header files are included from libupnpp.
+
+As we are using the pkg-config file of libupnpp to get the header include path,
+instead of the hardcoded `{prefix}/include/libupnpp` these files are not found.
+
+Upstream-status: https://github.com/medoc92/upmpdcli/issues/46
+
+Signed-off-by: J?rg Krause <joerg.krause@embedded.rocks>
+---
+ src/conftree.cpp | 2 +-
+ src/execmd.cpp | 4 ++--
+ src/mediaserver/cdplugins/cmdtalk.cpp | 2 +-
+ src/mediaserver/cdplugins/plgwithslave.cxx | 2 +-
+ src/netcon.cpp | 4 ++--
+ 5 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/src/conftree.cpp b/src/conftree.cpp
+index 12eb4b5..8a79812 100644
+--- a/src/conftree.cpp
++++ b/src/conftree.cpp
+@@ -42,7 +42,7 @@
+
+ #include "pathut.h"
+ #include "smallut.h"
+-#include "log.h"
++#include "libupnpp/log.h"
+
+ using namespace std;
+
+diff --git a/src/execmd.cpp b/src/execmd.cpp
+index 0db9032..9bf2971 100644
+--- a/src/execmd.cpp
++++ b/src/execmd.cpp
+@@ -53,7 +53,7 @@
+ #include "netcon.h"
+ #include "closefrom.h"
+ #include "smallut.h"
+-#include "log.h"
++#include "libupnpp/log.h"
+
+ using namespace std;
+
+@@ -1135,7 +1135,7 @@ void ReExec::reexec()
+ #include <sstream>
+ #include <vector>
+
+-#include "log.h"
++#include "libupnpp/log.h"
+
+ #include "execmd.h"
+ #ifdef BUILDING_RECOLL
+diff --git a/src/mediaserver/cdplugins/cmdtalk.cpp b/src/mediaserver/cdplugins/cmdtalk.cpp
+index eddd68f..e19f7ea 100644
+--- a/src/mediaserver/cdplugins/cmdtalk.cpp
++++ b/src/mediaserver/cdplugins/cmdtalk.cpp
+@@ -24,7 +24,7 @@
+
+ #include "smallut.h"
+ #include "execmd.h"
+-#include "log.h"
++#include "libupnpp/log.h"
+
+ using namespace std;
+
+diff --git a/src/mediaserver/cdplugins/plgwithslave.cxx b/src/mediaserver/cdplugins/plgwithslave.cxx
+index 545805c..1ad44ef 100644
+--- a/src/mediaserver/cdplugins/plgwithslave.cxx
++++ b/src/mediaserver/cdplugins/plgwithslave.cxx
+@@ -35,7 +35,7 @@
+ #include "cmdtalk.h"
+ #include "pathut.h"
+ #include "smallut.h"
+-#include "log.hxx"
++#include "libupnpp/log.hxx"
+ #include "main.hxx"
+ #include "conftree.h"
+
+diff --git a/src/netcon.cpp b/src/netcon.cpp
+index 5674cf3..193d1cd 100644
+--- a/src/netcon.cpp
++++ b/src/netcon.cpp
+@@ -47,7 +47,7 @@
+
+ #include <map>
+
+-#include "log.h"
++#include "libupnpp/log.h"
+
+ using namespace std;
+
+@@ -1031,7 +1031,7 @@ NetconServLis::checkperms(void *cl, int)
+ #include <signal.h>
+ #include <string.h>
+
+-#include "log.h"
++#include "libupnpp/log.h"
+
+ #include "netcon.h"
+
+--
+2.9.3
+
--
2.9.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 7/7] package/upmpdcli: use pkg-config for libupnpp
2016-09-14 11:41 [Buildroot] [PATCH 0/7] package/upmpdcli: fix build issues Jörg Krause
` (5 preceding siblings ...)
2016-09-14 11:41 ` [Buildroot] [PATCH 6/7] package/upmpdcli: add patch to fix include path of log Jörg Krause
@ 2016-09-14 11:41 ` Jörg Krause
2016-09-14 12:05 ` Thomas Petazzoni
6 siblings, 1 reply; 10+ messages in thread
From: Jörg Krause @ 2016-09-14 11:41 UTC (permalink / raw)
To: buildroot
Use the provided pkg-config file of libupnpp to get the correct LIBS.
Signed-off-by: J?rg Krause <joerg.krause@embedded.rocks>
---
package/upmpdcli/upmpdcli.mk | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/package/upmpdcli/upmpdcli.mk b/package/upmpdcli/upmpdcli.mk
index 3f521cf..208aa8f 100644
--- a/package/upmpdcli/upmpdcli.mk
+++ b/package/upmpdcli/upmpdcli.mk
@@ -17,12 +17,10 @@ UPMPDCLI_AUTORECONF = YES
ifeq ($(BR2_STATIC_LIBS),y)
# Upmpdcli forgets to take the dependencies of libupnpp into
# consideration, breaking static linking, so help it.
-# Libupnpp unfortunately doesn't provide a .pc file, so manually
-# handle the dependencies here.
# The build system doesn't expand LIBS from the configure step, so
# manually pass it to make.
UPMPDCLI_MAKE_OPTS = \
- LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs expat libcurl libupnp`"
+ LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs libupnpp`"
endif
# Upmpdcli only runs if user upmpdcli exists
--
2.9.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 7/7] package/upmpdcli: use pkg-config for libupnpp
2016-09-14 11:41 ` [Buildroot] [PATCH 7/7] package/upmpdcli: use pkg-config for libupnpp Jörg Krause
@ 2016-09-14 12:05 ` Thomas Petazzoni
2016-09-14 12:46 ` Jörg Krause
0 siblings, 1 reply; 10+ messages in thread
From: Thomas Petazzoni @ 2016-09-14 12:05 UTC (permalink / raw)
To: buildroot
Hello,
On Wed, 14 Sep 2016 13:41:46 +0200, J?rg Krause wrote:
> Use the provided pkg-config file of libupnpp to get the correct LIBS.
>
> Signed-off-by: J?rg Krause <joerg.krause@embedded.rocks>
> ---
> package/upmpdcli/upmpdcli.mk | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/package/upmpdcli/upmpdcli.mk b/package/upmpdcli/upmpdcli.mk
> index 3f521cf..208aa8f 100644
> --- a/package/upmpdcli/upmpdcli.mk
> +++ b/package/upmpdcli/upmpdcli.mk
> @@ -17,12 +17,10 @@ UPMPDCLI_AUTORECONF = YES
> ifeq ($(BR2_STATIC_LIBS),y)
> # Upmpdcli forgets to take the dependencies of libupnpp into
> # consideration, breaking static linking, so help it.
> -# Libupnpp unfortunately doesn't provide a .pc file, so manually
> -# handle the dependencies here.
> # The build system doesn't expand LIBS from the configure step, so
> # manually pass it to make.
> UPMPDCLI_MAKE_OPTS = \
> - LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs expat libcurl libupnp`"
> + LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs libupnpp`"
> endif
Thanks to your patches, upmpdcli now uses pkg-config, so why do we
still need to pass this custom LIBS value ?
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 7/7] package/upmpdcli: use pkg-config for libupnpp
2016-09-14 12:05 ` Thomas Petazzoni
@ 2016-09-14 12:46 ` Jörg Krause
0 siblings, 0 replies; 10+ messages in thread
From: Jörg Krause @ 2016-09-14 12:46 UTC (permalink / raw)
To: buildroot
On Wed, 2016-09-14 at 14:05 +0200, Thomas Petazzoni wrote:
> Hello,
>
> On Wed, 14 Sep 2016 13:41:46 +0200, J?rg Krause wrote:
> >
> > Use the provided pkg-config file of libupnpp to get the correct
> > LIBS.
> >
> > Signed-off-by: J?rg Krause <joerg.krause@embedded.rocks>
> > ---
> > ?package/upmpdcli/upmpdcli.mk | 4 +---
> > ?1 file changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/package/upmpdcli/upmpdcli.mk
> > b/package/upmpdcli/upmpdcli.mk
> > index 3f521cf..208aa8f 100644
> > --- a/package/upmpdcli/upmpdcli.mk
> > +++ b/package/upmpdcli/upmpdcli.mk
> > @@ -17,12 +17,10 @@ UPMPDCLI_AUTORECONF = YES
> > ?ifeq ($(BR2_STATIC_LIBS),y)
> > ?# Upmpdcli forgets to take the dependencies of libupnpp into
> > ?# consideration, breaking static linking, so help it.
> > -# Libupnpp unfortunately doesn't provide a .pc file, so manually
> > -# handle the dependencies here.
> > ?# The build system doesn't expand LIBS from the configure step, so
> > ?# manually pass it to make.
> > ?UPMPDCLI_MAKE_OPTS = \
> > - LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs expat libcurl
> > libupnp`"
> > + LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs libupnpp`"
> > ?endif
>
> Thanks to your patches, upmpdcli now uses pkg-config, so why do we
> still need to pass this custom LIBS value ?
Right, this is not needed anymore. Thanks!
J?rg
^ permalink raw reply [flat|nested] 10+ messages in thread