Skip to contentSkip to conversation

package/libmdnsresponder: new package

PATCH New Bernd Kuhls 2 participants 4 messages Jun 26, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 package/libmdnsresponder: new package

Needed for mdnsembedded in Kodi.

---
 package/Config.in                                  |   1 +
 .../libmdnsresponder/0001-android-embedded.patch   | 413 +++++++++++++++++++++
 package/libmdnsresponder/0002-makefile.patch       |  93 +++++
 package/libmdnsresponder/Config.in                 |  11 +
 package/libmdnsresponder/libmdnsresponder.hash     |   2 +
 package/libmdnsresponder/libmdnsresponder.mk       |  31 ++
 6 files changed, 551 insertions(+)
 create mode 100644 package/libmdnsresponder/0001-android-embedded.patch
 create mode 100644 package/libmdnsresponder/0002-makefile.patch
 create mode 100644 package/libmdnsresponder/Config.in
 create mode 100644 package/libmdnsresponder/libmdnsresponder.hash
 create mode 100644 package/libmdnsresponder/libmdnsresponder.mk
package/Config.in +1 -0
index a2a02a8..16d40e3 100644
@@ -1155,6 +1155,7 @@ menu "Networking"
 	source "package/libiscsi/Config.in"
 	source "package/libldns/Config.in"
 	source "package/libmbus/Config.in"
+	source "package/libmdnsresponder/Config.in"
 	source "package/libmemcached/Config.in"
 	source "package/libmicrohttpd/Config.in"
 	source "package/libmnl/Config.in"
package/libmdnsresponder/0001-android-embedded.patch new file +413 -0

413 lines not on this page · raw message

package/libmdnsresponder/0002-makefile.patch new file +93 -0

93 lines not on this page · raw message

package/libmdnsresponder/Config.in new file +11 -0
new file mode 100644
index 0000000..afce52a
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_LIBMDNSRESPONDER
+	bool "libmdnsresponder"
+	depends on !BR2_STATIC_LIBS
+	help
+	  The mDNSResponder project is a component of Bonjour,
+	  Apple's ease-of-use IP networking initiative:
+
+	  http://developer.apple.com/bonjour
+
+comment "libmdnsresponder needs a toolchain w/ dynamic library"
+	depends on BR2_STATIC_LIBS
package/libmdnsresponder/libmdnsresponder.hash new file +2 -0
new file mode 100644
index 0000000..3a4fe26
@@ -0,0 +1,2 @@
+# Locally computed
+sha256	8efdd7d57445f4defdb450217c31afc5c5d258822764bb02f4e8282430b33119	mDNSResponder-625.41.2.tar.gz
package/libmdnsresponder/libmdnsresponder.mk new file +31 -0
new file mode 100644
index 0000000..05c54ff
@@ -0,0 +1,31 @@
+################################################################################
+#
+# libmdnsresponder
+#
+################################################################################
+
+LIBMDNSRESPONDER_VERSION = 625.41.2
+LIBMDNSRESPONDER_SITE = https://opensource.apple.com/tarballs/mDNSResponder
+LIBMDNSRESPONDER_SOURCE = mDNSResponder-$(LIBMDNSRESPONDER_VERSION).tar.gz
+LIBMDNSRESPONDER_LICENSE = \
+	Apache-2.0, BSD-3c (shared library), GPLv2 (mDnsEmbedded.h), \
+	NICTA Public Software Licence
+LIBMDNSRESPONDER_LICENSE_FILES = LICENSE
+LIBMDNSRESPONDER_INSTALL_STAGING = YES
+
+define LIBMDNSRESPONDER_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
+		$(TARGET_CONFIGURE_OPTS)
+endef
+
+define LIBMDNSRESPONDER_INSTALL_STAGING_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
+		PREFIX=$(STAGING_DIR)/usr install -C $(@D)
+endef
+
+define LIBLIBMDNSRESPONDER_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
+		PREFIX=$(TARGET_DIR)/usr install -C $(@D)
+endef
+
+$(eval $(generic-package))
Signature · 1 line
2.8.1
#1 lore raw

PATCH 2/2 package/kodi: add optional support for libmdnsresponder

---
 ...S.cpp-add-header-to-fix-compile-with-gcc-.patch | 37 ++++++++++++++++++++++
 package/kodi/Config.in                             |  6 ++++
 package/kodi/kodi.mk                               |  7 ++++
 3 files changed, 50 insertions(+)
 create mode 100644 package/kodi/0009-ZeroconfMDNS.cpp-add-header-to-fix-compile-with-gcc-.patch
package/kodi/0009-ZeroconfMDNS.cpp-add-header-to-fix-compile-with-gcc-.patch new file +37 -0
new file mode 100644
index 0000000..cde8203
@@ -0,0 +1,37 @@
+From 97bca0f515db32eb57804370c5fa810c8a1d47dc Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <[email protected]>
+Date: Sun, 26 Jun 2016 13:49:05 +0200
+Subject: [PATCH 1/1] ZeroconfMDNS.cpp: add header to fix compile with gcc 4.9
+ & uClibc
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Without the patch compilation fails with
+ZeroconfMDNS.cpp:133:139: error: ?htons? was not declared in this scope
+
+Infos about the toolchain used:
+gcc version 4.9.3 (Buildroot 2016.05-00002-g5dabb45), uClibc-NG 1.0.15
+
+Patch sent upstream: https://github.com/xbmc/xbmc/pull/10035
+
+Signed-off-by: Bernd Kuhls <[email protected]>
+---
+ xbmc/network/mdns/ZeroconfMDNS.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/xbmc/network/mdns/ZeroconfMDNS.cpp b/xbmc/network/mdns/ZeroconfMDNS.cpp
+index 00d02c5..8bfd7df 100644
+--- a/xbmc/network/mdns/ZeroconfMDNS.cpp
++++ b/xbmc/network/mdns/ZeroconfMDNS.cpp
+@@ -19,6 +19,7 @@
+  */
+ 
+ #include "ZeroconfMDNS.h"
++#include <arpa/inet.h>
+ 
+ #include <string>
+ #include <sstream>
+-- 
+2.8.1
+
package/kodi/Config.in +6 -0
index a44ef5a..b9ca403 100644
@@ -173,6 +173,12 @@ config BR2_PACKAGE_KODI_LIBNFS
 comment "nfs support needs a toolchain w/ threads support"
 	depends on !(BR2_TOOLCHAIN_HAS_THREADS || BR2_TOOLCHAIN_HAS_NATIVE_RPC)
 
+config BR2_PACKAGE_KODI_MDNSEMBEDDED
+	bool "mDNSEmbedded"
+	select BR2_PACKAGE_LIBMDNSRESPONDER
+	help
+	  Enable mDNSEmbedded support
+
 config BR2_PACKAGE_KODI_RTMPDUMP
 	bool "rtmp"
 	select BR2_PACKAGE_RTMPDUMP
package/kodi/kodi.mk +7 -0
index 90c50c3..78f55a8 100644
@@ -127,6 +127,13 @@ else
 KODI_CONF_OPTS += --disable-nfs
 endif
 
+ifeq ($(BR2_PACKAGE_KODI_MDNSEMBEDDED),y)
+KODI_DEPENDENCIES += libmdnsresponder
+KODI_CONF_OPTS += --enable-mdnsembedded
+else
+KODI_CONF_OPTS += --disable-mdnsembedded
+endif
+
 ifeq ($(BR2_PACKAGE_KODI_RTMPDUMP),y)
 KODI_DEPENDENCIES += rtmpdump
 KODI_CONF_OPTS += --enable-rtmp
Signature · 1 line
2.8.1
#2 lore raw

PATCH 1/2 package/libmdnsresponder: new package

In reply to Bernd Kuhls

Hello,

package/libmdnsresponder/0001-android-embedded.patch line 6

Quoted 12 lines · Bernd Kuhls
package/libmdnsresponder/0001-android-embedded.patch new file +6 -0
new file mode 100644
index 0000000..e82c352
@@ -0,0 +1,413 @@
+Add wrapper for mDNSEmbeddedAPI with Bonjour.
+
+Downloaded from Kodi:
+https://github.com/xbmc/xbmc/blob/master/tools/depends/target/mdnsresponder/01-android-embedded.patch
+
+Signed-off-by: Bernd Kuhls <[email protected]>

This looks like a feature patch... somewhat annoying to have in Buildroot. Is there any chance of getting this upstream?

Quoted 8 lines
package/libmdnsresponder/libmdnsresponder.mk new file +2 -0
new file mode 100644
index 0000000..05c54ff
@@ -0,0 +1,31 @@
+################################################################################
+#

package/libmdnsresponder/libmdnsresponder.mk line 12

Quoted 10 lines
package/libmdnsresponder/libmdnsresponder.mk new file +10 -0
+# libmdnsresponder
+#
+################################################################################
+
+LIBMDNSRESPONDER_VERSION = 625.41.2
+LIBMDNSRESPONDER_SITE = https://opensource.apple.com/tarballs/mDNSResponder
+LIBMDNSRESPONDER_SOURCE = mDNSResponder-$(LIBMDNSRESPONDER_VERSION).tar.gz
+LIBMDNSRESPONDER_LICENSE = \
+	Apache-2.0, BSD-3c (shared library), GPLv2 (mDnsEmbedded.h), \
+	NICTA Public Software Licence

This is a somewhat odd combination of licenses. Especially using GPLv2 for a header, when the library itself is BSD-3c.

The main concern is really the feature patch. The rest looks fine.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH 1/2 package/libmdnsresponder: new package

Am Sun, 26 Jun 2016 15:44:02 +0200 schrieb Thomas Petazzoni:

Quoted 2 lines

This looks like a feature patch... somewhat annoying to have in Buildroot. Is there any chance of getting this upstream?

Hi Thomas,

while searching for the history of this patch to answer your question I found out that the mdnsembedded code is used by Kodi only on Android:
http://forum.kodi.tv/showthread.php?tid=230714&pid=2040676#pid2040676

Therefore I marked both patches as rejected in patchworks.

Sorry for the noise ;)

Regards, Bernd