* [Buildroot] [PATCH 1/2] libupnp: bump to version 1.6.17 @ 2012-04-11 14:36 Gustavo Zacarias 2012-04-11 14:36 ` [Buildroot] [PATCH 2/2] ushare: new package Gustavo Zacarias ` (2 more replies) 0 siblings, 3 replies; 10+ messages in thread From: Gustavo Zacarias @ 2012-04-11 14:36 UTC (permalink / raw) To: buildroot Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> --- package/libupnp/libupnp-1.6.14-no-ipv6.patch | 23 ---------------- package/libupnp/libupnp-1.6.17-no-ipv6.patch | 37 ++++++++++++++++++++++++++ package/libupnp/libupnp.mk | 2 +- 3 files changed, 38 insertions(+), 24 deletions(-) delete mode 100644 package/libupnp/libupnp-1.6.14-no-ipv6.patch create mode 100644 package/libupnp/libupnp-1.6.17-no-ipv6.patch diff --git a/package/libupnp/libupnp-1.6.14-no-ipv6.patch b/package/libupnp/libupnp-1.6.14-no-ipv6.patch deleted file mode 100644 index 929c309..0000000 --- a/package/libupnp/libupnp-1.6.14-no-ipv6.patch +++ /dev/null @@ -1,23 +0,0 @@ -Fix missing knob to properly disable IPv6 support when headers lack it. - -Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> - -diff -Nura libupnp-1.6.15/upnp/src/ssdp/ssdp_device.c libupnp-1.6.15-noipv6/upnp/src/ssdp/ssdp_device.c ---- libupnp-1.6.15/upnp/src/ssdp/ssdp_device.c 2011-11-04 19:33:59.000000000 -0300 -+++ libupnp-1.6.15-noipv6/upnp/src/ssdp/ssdp_device.c 2012-03-20 21:00:26.274098343 -0300 -@@ -199,6 +199,7 @@ - setsockopt(ReplySock, IPPROTO_IP, IP_MULTICAST_TTL, - (char *)&ttl, sizeof(int)); - socklen = sizeof(struct sockaddr_in); -+#ifdef UPNP_ENABLE_IPV6 - } else if (DestAddr->sa_family == AF_INET6) { - inet_ntop(AF_INET6, - &((struct sockaddr_in6 *)DestAddr)->sin6_addr, -@@ -207,6 +208,7 @@ - (char *)&gIF_INDEX, sizeof(gIF_INDEX)); - setsockopt(ReplySock, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, - (char *)&hops, sizeof(hops)); -+#endif - } else { - UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__, - "Invalid destination address specified."); diff --git a/package/libupnp/libupnp-1.6.17-no-ipv6.patch b/package/libupnp/libupnp-1.6.17-no-ipv6.patch new file mode 100644 index 0000000..67b3895 --- /dev/null +++ b/package/libupnp/libupnp-1.6.17-no-ipv6.patch @@ -0,0 +1,37 @@ +From 812bdabc2c293173ea943059a577d480884a6cc1 Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias <gustavo@zacarias.com.ar> +Date: Wed, 11 Apr 2012 11:17:45 -0300 +Subject: [PATCH] ssdp_device: exclude IPv6 stuff when there's no IPv6 + +Add an additional INET_IPV6 exclusion around IPV6_MULTICAST_HOPS since +the definition isn't guaranteed to exist when the toolchain lacks IPv6 +support. + +Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> +--- + upnp/src/ssdp/ssdp_device.c | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/upnp/src/ssdp/ssdp_device.c b/upnp/src/ssdp/ssdp_device.c +index d3517cc..a439005 100644 +--- a/upnp/src/ssdp/ssdp_device.c ++++ b/upnp/src/ssdp/ssdp_device.c +@@ -210,6 +210,7 @@ static int NewRequestHandler( + (char *)&ttl, sizeof(int)); + socklen = sizeof(struct sockaddr_in); + break; ++#ifdef INET_IPV6 + case AF_INET6: + inet_ntop(AF_INET6, + &((struct sockaddr_in6 *)DestAddr)->sin6_addr, +@@ -219,6 +220,7 @@ static int NewRequestHandler( + setsockopt(ReplySock, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, + (char *)&hops, sizeof(hops)); + break; ++#endif + default: + UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__, + "Invalid destination address specified."); +-- +1.7.3.4 + diff --git a/package/libupnp/libupnp.mk b/package/libupnp/libupnp.mk index 5ac68c3..a6028e1 100644 --- a/package/libupnp/libupnp.mk +++ b/package/libupnp/libupnp.mk @@ -4,7 +4,7 @@ # ############################################################# -LIBUPNP_VERSION = 1.6.14 +LIBUPNP_VERSION = 1.6.17 LIBUPNP_SOURCE = libupnp-$(LIBUPNP_VERSION).tar.bz2 LIBUPNP_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/project/pupnp/pupnp/libUPnP%20$(LIBUPNP_VERSION) LIBUPNP_CONF_ENV = ac_cv_lib_compat_ftime=no -- 1.7.3.4 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 2/2] ushare: new package 2012-04-11 14:36 [Buildroot] [PATCH 1/2] libupnp: bump to version 1.6.17 Gustavo Zacarias @ 2012-04-11 14:36 ` Gustavo Zacarias 2012-04-15 13:38 ` Peter Korsgaard 2012-04-14 14:08 ` [Buildroot] [PATCH 1/2] libupnp: bump to version 1.6.17 Sagaert Johan 2012-04-14 21:51 ` Peter Korsgaard 2 siblings, 1 reply; 10+ messages in thread From: Gustavo Zacarias @ 2012-04-11 14:36 UTC (permalink / raw) To: buildroot UPnP media streamer. TODO: Add DLNA support (libdlna) if there's interest. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> --- package/Config.in | 1 + package/ushare/Config.in | 13 ++ package/ushare/ushare-compile-fixes.patch | 206 +++++++++++++++++++++++++++++ package/ushare/ushare.mk | 31 +++++ 4 files changed, 251 insertions(+), 0 deletions(-) create mode 100644 package/ushare/Config.in create mode 100644 package/ushare/ushare-compile-fixes.patch create mode 100644 package/ushare/ushare.mk diff --git a/package/Config.in b/package/Config.in index aee6fc9..486ddf5 100644 --- a/package/Config.in +++ b/package/Config.in @@ -528,6 +528,7 @@ source "package/tn5250/Config.in" source "package/transmission/Config.in" source "package/ttcp/Config.in" source "package/udpcast/Config.in" +source "package/ushare/Config.in" source "package/vpnc/Config.in" source "package/vsftpd/Config.in" source "package/vtun/Config.in" diff --git a/package/ushare/Config.in b/package/ushare/Config.in new file mode 100644 index 0000000..a714fa0 --- /dev/null +++ b/package/ushare/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_USHARE + bool "ushare" + depends on BR2_LARGEFILE + select BR2_PACKAGE_LIBUPNP + help + uShare is a UPnP (TM) A/V & DLNA Media Server. + It implements the server component that provides UPnP media devices + with information on available multimedia files. + + http://ushare.geexbox.org/ + +comment "ushare requires a toolchain with LARGEFILE support" + depends on !BR2_LARGEFILE diff --git a/package/ushare/ushare-compile-fixes.patch b/package/ushare/ushare-compile-fixes.patch new file mode 100644 index 0000000..cfdf5e3 --- /dev/null +++ b/package/ushare/ushare-compile-fixes.patch @@ -0,0 +1,206 @@ +Patch nixed from OpenWRT svn to fix build breakage. + +Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> + +--- a/src/cds.c ++++ b/src/cds.c +@@ -20,6 +20,8 @@ + */ + + #include <stdlib.h> ++#include <stdio.h> ++#include <string.h> + #include <upnp/upnp.h> + #include <upnp/upnptools.h> + +--- a/src/http.c ++++ b/src/http.c +@@ -25,6 +25,7 @@ + #include <errno.h> + #include <stdio.h> + #include <stdlib.h> ++#include <string.h> + #include <unistd.h> + #include <errno.h> + +@@ -77,8 +78,7 @@ set_info_file (struct File_Info *info, c + info->content_type = ixmlCloneDOMString (content_type); + } + +-static int +-http_get_info (const char *filename, struct File_Info *info) ++int http_get_info (const char *filename, struct File_Info *info) + { + extern struct ushare_t *ut; + struct upnp_entry_t *entry = NULL; +@@ -197,8 +197,7 @@ get_file_memory (const char *fullpath, c + return ((UpnpWebFileHandle) file); + } + +-static UpnpWebFileHandle +-http_open (const char *filename, enum UpnpOpenFileMode mode) ++UpnpWebFileHandle http_open (const char *filename, enum UpnpOpenFileMode mode) + { + extern struct ushare_t *ut; + struct upnp_entry_t *entry = NULL; +@@ -251,8 +250,7 @@ http_open (const char *filename, enum Up + return ((UpnpWebFileHandle) file); + } + +-static int +-http_read (UpnpWebFileHandle fh, char *buf, size_t buflen) ++int http_read (UpnpWebFileHandle fh, char *buf, size_t buflen) + { + struct web_file_t *file = (struct web_file_t *) fh; + ssize_t len = -1; +@@ -286,8 +284,7 @@ http_read (UpnpWebFileHandle fh, char *b + return len; + } + +-static int +-http_write (UpnpWebFileHandle fh __attribute__((unused)), ++int http_write (UpnpWebFileHandle fh __attribute__((unused)), + char *buf __attribute__((unused)), + size_t buflen __attribute__((unused))) + { +@@ -296,8 +293,7 @@ http_write (UpnpWebFileHandle fh __attri + return 0; + } + +-static int +-http_seek (UpnpWebFileHandle fh, off_t offset, int origin) ++int http_seek (UpnpWebFileHandle fh, off_t offset, int origin) + { + struct web_file_t *file = (struct web_file_t *) fh; + off_t newpos = -1; +@@ -371,8 +367,7 @@ http_seek (UpnpWebFileHandle fh, off_t o + return 0; + } + +-static int +-http_close (UpnpWebFileHandle fh) ++int http_close (UpnpWebFileHandle fh) + { + struct web_file_t *file = (struct web_file_t *) fh; + +@@ -402,13 +397,3 @@ http_close (UpnpWebFileHandle fh) + + return 0; + } +- +-struct UpnpVirtualDirCallbacks virtual_dir_callbacks = +- { +- http_get_info, +- http_open, +- http_read, +- http_write, +- http_seek, +- http_close +- }; +--- a/src/http.h ++++ b/src/http.h +@@ -25,6 +25,18 @@ + #include <upnp/upnp.h> + #include <upnp/upnptools.h> + +-struct UpnpVirtualDirCallbacks virtual_dir_callbacks; ++int http_get_info (const char *filename, struct File_Info *info); ++ ++UpnpWebFileHandle http_open (const char *filename, enum UpnpOpenFileMode mode); ++ ++int http_read (UpnpWebFileHandle fh, char *buf, size_t buflen); ++ ++int http_seek (UpnpWebFileHandle fh, off_t offset, int origin); ++ ++int http_write (UpnpWebFileHandle fh __attribute__((unused)), ++ char *buf __attribute__((unused)), ++ size_t buflen __attribute__((unused))); ++ ++int http_close (UpnpWebFileHandle fh); + + #endif /* _HTTP_H_ */ +--- a/src/ushare.c ++++ b/src/ushare.c +@@ -188,7 +188,7 @@ handle_action_request (struct Upnp_Actio + if (strcmp (request->DevUDN + 5, ut->udn)) + return; + +- ip = request->CtrlPtIPAddr.s_addr; ++ ip = (*(struct sockaddr_in *)&request->CtrlPtIPAddr).sin_addr.s_addr; + ip = ntohl (ip); + sprintf (val, "%d.%d.%d.%d", + (ip >> 24) & 0xFF, (ip >> 16) & 0xFF, (ip >> 8) & 0xFF, ip & 0xFF); +@@ -348,13 +348,23 @@ init_upnp (struct ushare_t *ut) + + UpnpEnableWebserver (TRUE); + +- res = UpnpSetVirtualDirCallbacks (&virtual_dir_callbacks); +- if (res != UPNP_E_SUCCESS) +- { +- log_error (_("Cannot set virtual directory callbacks\n")); +- free (description); +- return -1; +- } ++#define upnp_set_callback(cb, func) \ ++ do { \ ++ res = UpnpVirtualDir_set_##cb##Callback(func); \ ++ if (res != UPNP_E_SUCCESS) \ ++ { \ ++ log_error (_("Cannot set virtual directory callbacks\n")); \ ++ free (description); \ ++ return -1; \ ++ } \ ++ } while(0) ++ ++ upnp_set_callback(GetInfo, http_get_info); ++ upnp_set_callback(Open, http_open); ++ upnp_set_callback(Read, http_read); ++ upnp_set_callback(Seek, http_seek); ++ upnp_set_callback(Write, http_write); ++ upnp_set_callback(Close, http_close); + + res = UpnpAddVirtualDir (VIRTUAL_DIR); + if (res != UPNP_E_SUCCESS) +--- a/src/cms.c ++++ b/src/cms.c +@@ -20,6 +20,8 @@ + */ + + #include <stdlib.h> ++#include <stdio.h> ++#include <string.h> + #include <upnp/upnp.h> + #include <upnp/upnptools.h> + +--- a/src/mime.c ++++ b/src/mime.c +@@ -20,6 +20,7 @@ + */ + + #include <stdlib.h> ++#include <stdio.h> + #include <string.h> + + #include "mime.h" +--- a/src/presentation.c ++++ b/src/presentation.c +@@ -19,6 +19,8 @@ + */ + + #include <stdlib.h> ++#include <stdio.h> ++#include <string.h> + + #if HAVE_LANGINFO_CODESET + # include <langinfo.h> +--- a/src/services.c ++++ b/src/services.c +@@ -20,6 +20,8 @@ + */ + + #include <stdlib.h> ++#include <stdio.h> ++#include <string.h> + #include <upnp/upnp.h> + #include <upnp/upnptools.h> + diff --git a/package/ushare/ushare.mk b/package/ushare/ushare.mk new file mode 100644 index 0000000..b61b525 --- /dev/null +++ b/package/ushare/ushare.mk @@ -0,0 +1,31 @@ +############################################################# +# +# ushare +# +############################################################# + +USHARE_VERSION = 1.1a +USHARE_SOURCE = ushare-$(USHARE_VERSION).tar.bz2 +USHARE_SITE = http://ushare.geexbox.org/releases +USHARE_DEPENDENCIES = host-pkg-config libupnp + +define USHARE_CONFIGURE_CMDS + (cd $(@D); \ + $(TARGET_CONFIGURE_OPTS) \ + ./configure --prefix=/usr $(DISABLE_NLS) --cross-compile \ + --cross-prefix="$(TARGET_CROSS)" --sysconfdir=/etc \ + --disable-strip --disable-debug \ + ) +endef + +define USHARE_BUILD_CMDS + $(MAKE) -C $(@D) +endef + +define USHARE_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install + rm -f $(TARGET_DIR)/etc/init.d/ushare +endef + +# Even though configure is called it's not autoconf +$(eval $(call GENTARGETS)) -- 1.7.3.4 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 2/2] ushare: new package 2012-04-11 14:36 ` [Buildroot] [PATCH 2/2] ushare: new package Gustavo Zacarias @ 2012-04-15 13:38 ` Peter Korsgaard 2012-04-15 13:49 ` Gustavo Zacarias 0 siblings, 1 reply; 10+ messages in thread From: Peter Korsgaard @ 2012-04-15 13:38 UTC (permalink / raw) To: buildroot >>>>> "Gustavo" == Gustavo Zacarias <gustavo@zacarias.com.ar> writes: Gustavo> UPnP media streamer. Gustavo> TODO: Add DLNA support (libdlna) if there's interest. Gustavo> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Gustavo> +++ b/package/ushare/ushare.mk Gustavo> @@ -0,0 +1,31 @@ Gustavo> +############################################################# Gustavo> +# Gustavo> +# ushare Gustavo> +# Gustavo> +############################################################# Gustavo> + Gustavo> +USHARE_VERSION = 1.1a Gustavo> +USHARE_SOURCE = ushare-$(USHARE_VERSION).tar.bz2 Gustavo> +USHARE_SITE = http://ushare.geexbox.org/releases Gustavo> +USHARE_DEPENDENCIES = host-pkg-config libupnp Gustavo> + Gustavo> +define USHARE_CONFIGURE_CMDS Gustavo> + (cd $(@D); \ Gustavo> + $(TARGET_CONFIGURE_OPTS) \ Gustavo> + ./configure --prefix=/usr $(DISABLE_NLS) --cross-compile \ Gustavo> + --cross-prefix="$(TARGET_CROSS)" --sysconfdir=/etc \ Gustavo> + --disable-strip --disable-debug \ --disable-debug should only be passed if BR2_ENABLE_DEBUG isn't enabled. Gustavo> + ) Gustavo> +endef Gustavo> + Gustavo> +define USHARE_BUILD_CMDS Gustavo> + $(MAKE) -C $(@D) Gustavo> +endef Gustavo> + Gustavo> +define USHARE_INSTALL_TARGET_CMDS Gustavo> + $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install Gustavo> + rm -f $(TARGET_DIR)/etc/init.d/ushare You don't provide an alternative init script. Could this one not be used (renamed to SXXushare)? -- Bye, Peter Korsgaard ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 2/2] ushare: new package 2012-04-15 13:38 ` Peter Korsgaard @ 2012-04-15 13:49 ` Gustavo Zacarias 2012-04-15 21:06 ` Peter Korsgaard 0 siblings, 1 reply; 10+ messages in thread From: Gustavo Zacarias @ 2012-04-15 13:49 UTC (permalink / raw) To: buildroot On 2012-04-15 10:38, Peter Korsgaard wrote: > --disable-debug should only be passed if BR2_ENABLE_DEBUG isn't > enabled. Ok, let's kill it then. > You don't provide an alternative init script. Could this one not be > used > (renamed to SXXushare)? The shipped script is pretty much LSB so it won't work for us. Also ushare would share some directory (non-standard) with media files, which directory would you suggest for a default? I don't think we have one in the skeleton for that purpose. Regards. ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 2/2] ushare: new package 2012-04-15 13:49 ` Gustavo Zacarias @ 2012-04-15 21:06 ` Peter Korsgaard 0 siblings, 0 replies; 10+ messages in thread From: Peter Korsgaard @ 2012-04-15 21:06 UTC (permalink / raw) To: buildroot >>>>> "Gustavo" == Gustavo Zacarias <gustavo@zacarias.com.ar> writes: Gustavo> On 2012-04-15 10:38, Peter Korsgaard wrote: >> --disable-debug should only be passed if BR2_ENABLE_DEBUG isn't >> enabled. Gustavo> Ok, let's kill it then. Ok, done. >> You don't provide an alternative init script. Could this one not be >> used >> (renamed to SXXushare)? Gustavo> The shipped script is pretty much LSB so it won't work for us. Gustavo> Also ushare would share some directory (non-standard) with media Gustavo> files, which directory would you suggest for a default? Gustavo> I don't think we have one in the skeleton for that purpose. Gustavo> Regards. Maybe /mnt/media, but let's just drop the init script for now. Committed, thanks. -- Bye, Peter Korsgaard ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 1/2] libupnp: bump to version 1.6.17 2012-04-11 14:36 [Buildroot] [PATCH 1/2] libupnp: bump to version 1.6.17 Gustavo Zacarias 2012-04-11 14:36 ` [Buildroot] [PATCH 2/2] ushare: new package Gustavo Zacarias @ 2012-04-14 14:08 ` Sagaert Johan 2012-04-14 21:51 ` Peter Korsgaard 2 siblings, 0 replies; 10+ messages in thread From: Sagaert Johan @ 2012-04-14 14:08 UTC (permalink / raw) To: buildroot Hi Just have rebuild my app. against the 1.6.17 and it works just fine ! Thanks -----Oorspronkelijk bericht----- Van: buildroot-bounces at busybox.net [mailto:buildroot-bounces at busybox.net] Namens Gustavo Zacarias Verzonden: woensdag 11 april 2012 16:36 Aan: buildroot at busybox.net Onderwerp: [Buildroot] [PATCH 1/2] libupnp: bump to version 1.6.17 Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> --- package/libupnp/libupnp-1.6.14-no-ipv6.patch | 23 ---------------- package/libupnp/libupnp-1.6.17-no-ipv6.patch | 37 ++++++++++++++++++++++++++ package/libupnp/libupnp.mk | 2 +- 3 files changed, 38 insertions(+), 24 deletions(-) delete mode 100644 package/libupnp/libupnp-1.6.14-no-ipv6.patch create mode 100644 package/libupnp/libupnp-1.6.17-no-ipv6.patch diff --git a/package/libupnp/libupnp-1.6.14-no-ipv6.patch b/package/libupnp/libupnp-1.6.14-no-ipv6.patch deleted file mode 100644 index 929c309..0000000 --- a/package/libupnp/libupnp-1.6.14-no-ipv6.patch +++ /dev/null @@ -1,23 +0,0 @@ -Fix missing knob to properly disable IPv6 support when headers lack it. - -Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> - -diff -Nura libupnp-1.6.15/upnp/src/ssdp/ssdp_device.c libupnp-1.6.15-noipv6/upnp/src/ssdp/ssdp_device.c ---- libupnp-1.6.15/upnp/src/ssdp/ssdp_device.c 2011-11-04 19:33:59.000000000 -0300 -+++ libupnp-1.6.15-noipv6/upnp/src/ssdp/ssdp_device.c 2012-03-20 21:00:26.274098343 -0300 -@@ -199,6 +199,7 @@ - setsockopt(ReplySock, IPPROTO_IP, IP_MULTICAST_TTL, - (char *)&ttl, sizeof(int)); - socklen = sizeof(struct sockaddr_in); -+#ifdef UPNP_ENABLE_IPV6 - } else if (DestAddr->sa_family == AF_INET6) { - inet_ntop(AF_INET6, - &((struct sockaddr_in6 *)DestAddr)->sin6_addr, -@@ -207,6 +208,7 @@ - (char *)&gIF_INDEX, sizeof(gIF_INDEX)); - setsockopt(ReplySock, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, - (char *)&hops, sizeof(hops)); -+#endif - } else { - UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__, - "Invalid destination address specified."); diff --git a/package/libupnp/libupnp-1.6.17-no-ipv6.patch b/package/libupnp/libupnp-1.6.17-no-ipv6.patch new file mode 100644 index 0000000..67b3895 --- /dev/null +++ b/package/libupnp/libupnp-1.6.17-no-ipv6.patch @@ -0,0 +1,37 @@ +From 812bdabc2c293173ea943059a577d480884a6cc1 Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias <gustavo@zacarias.com.ar> +Date: Wed, 11 Apr 2012 11:17:45 -0300 +Subject: [PATCH] ssdp_device: exclude IPv6 stuff when there's no IPv6 + +Add an additional INET_IPV6 exclusion around IPV6_MULTICAST_HOPS since +the definition isn't guaranteed to exist when the toolchain lacks IPv6 +support. + +Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> +--- + upnp/src/ssdp/ssdp_device.c | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/upnp/src/ssdp/ssdp_device.c b/upnp/src/ssdp/ssdp_device.c +index d3517cc..a439005 100644 +--- a/upnp/src/ssdp/ssdp_device.c ++++ b/upnp/src/ssdp/ssdp_device.c +@@ -210,6 +210,7 @@ static int NewRequestHandler( + (char *)&ttl, sizeof(int)); + socklen = sizeof(struct sockaddr_in); + break; ++#ifdef INET_IPV6 + case AF_INET6: + inet_ntop(AF_INET6, + &((struct sockaddr_in6 *)DestAddr)->sin6_addr, @@ -219,6 +220,7 +@@ static int NewRequestHandler( + setsockopt(ReplySock, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, + (char *)&hops, sizeof(hops)); + break; ++#endif + default: + UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__, + "Invalid destination address specified."); +-- +1.7.3.4 + diff --git a/package/libupnp/libupnp.mk b/package/libupnp/libupnp.mk index 5ac68c3..a6028e1 100644 --- a/package/libupnp/libupnp.mk +++ b/package/libupnp/libupnp.mk @@ -4,7 +4,7 @@ # ############################################################# -LIBUPNP_VERSION = 1.6.14 +LIBUPNP_VERSION = 1.6.17 LIBUPNP_SOURCE = libupnp-$(LIBUPNP_VERSION).tar.bz2 LIBUPNP_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/project/pupnp/pupnp/libUPnP%20$(LIBUPNP_VERSION) LIBUPNP_CONF_ENV = ac_cv_lib_compat_ftime=no -- 1.7.3.4 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot ^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 1/2] libupnp: bump to version 1.6.17 2012-04-11 14:36 [Buildroot] [PATCH 1/2] libupnp: bump to version 1.6.17 Gustavo Zacarias 2012-04-11 14:36 ` [Buildroot] [PATCH 2/2] ushare: new package Gustavo Zacarias 2012-04-14 14:08 ` [Buildroot] [PATCH 1/2] libupnp: bump to version 1.6.17 Sagaert Johan @ 2012-04-14 21:51 ` Peter Korsgaard 2 siblings, 0 replies; 10+ messages in thread From: Peter Korsgaard @ 2012-04-14 21:51 UTC (permalink / raw) To: buildroot >>>>> "Gustavo" == Gustavo Zacarias <gustavo@zacarias.com.ar> writes: Gustavo> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Committed, thanks. -- Bye, Peter Korsgaard ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 1/2] libupnp: move to version 1.6.14 @ 2012-03-21 12:02 Gustavo Zacarias 2012-03-21 12:02 ` [Buildroot] [PATCH 2/2] ushare: new package Gustavo Zacarias 0 siblings, 1 reply; 10+ messages in thread From: Gustavo Zacarias @ 2012-03-21 12:02 UTC (permalink / raw) To: buildroot As pointed by Sagaert Johan in the mailing list and further testing version 1.6.15 has some issues. So move to version 1.6.14 which is far more stable and compliant. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> --- ...-no-ipv6.patch => libupnp-1.6.14-no-ipv6.patch} | 0 package/libupnp/libupnp.mk | 2 +- 2 files changed, 1 insertions(+), 1 deletions(-) rename package/libupnp/{libupnp-1.6.15-no-ipv6.patch => libupnp-1.6.14-no-ipv6.patch} (100%) diff --git a/package/libupnp/libupnp-1.6.15-no-ipv6.patch b/package/libupnp/libupnp-1.6.14-no-ipv6.patch similarity index 100% rename from package/libupnp/libupnp-1.6.15-no-ipv6.patch rename to package/libupnp/libupnp-1.6.14-no-ipv6.patch diff --git a/package/libupnp/libupnp.mk b/package/libupnp/libupnp.mk index 1fa07ca..5ac68c3 100644 --- a/package/libupnp/libupnp.mk +++ b/package/libupnp/libupnp.mk @@ -4,7 +4,7 @@ # ############################################################# -LIBUPNP_VERSION = 1.6.15 +LIBUPNP_VERSION = 1.6.14 LIBUPNP_SOURCE = libupnp-$(LIBUPNP_VERSION).tar.bz2 LIBUPNP_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/project/pupnp/pupnp/libUPnP%20$(LIBUPNP_VERSION) LIBUPNP_CONF_ENV = ac_cv_lib_compat_ftime=no -- 1.7.3.4 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 2/2] ushare: new package 2012-03-21 12:02 [Buildroot] [PATCH 1/2] libupnp: move to version 1.6.14 Gustavo Zacarias @ 2012-03-21 12:02 ` Gustavo Zacarias 2012-03-21 13:04 ` Peter Korsgaard 0 siblings, 1 reply; 10+ messages in thread From: Gustavo Zacarias @ 2012-03-21 12:02 UTC (permalink / raw) To: buildroot UPnP media streamer. TODO: Add DLNA support (libdlna) if there's interest. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> --- package/Config.in | 1 + package/ushare/Config.in | 13 ++ package/ushare/ushare-compile-fixes.patch | 206 +++++++++++++++++++++++++++++ package/ushare/ushare.mk | 26 ++++ 4 files changed, 246 insertions(+), 0 deletions(-) create mode 100644 package/ushare/Config.in create mode 100644 package/ushare/ushare-compile-fixes.patch create mode 100644 package/ushare/ushare.mk diff --git a/package/Config.in b/package/Config.in index e4bb0e1..b7516ec 100644 --- a/package/Config.in +++ b/package/Config.in @@ -524,6 +524,7 @@ source "package/tn5250/Config.in" source "package/transmission/Config.in" source "package/ttcp/Config.in" source "package/udpcast/Config.in" +source "package/ushare/Config.in" source "package/vpnc/Config.in" source "package/vsftpd/Config.in" source "package/vtun/Config.in" diff --git a/package/ushare/Config.in b/package/ushare/Config.in new file mode 100644 index 0000000..a714fa0 --- /dev/null +++ b/package/ushare/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_USHARE + bool "ushare" + depends on BR2_LARGEFILE + select BR2_PACKAGE_LIBUPNP + help + uShare is a UPnP (TM) A/V & DLNA Media Server. + It implements the server component that provides UPnP media devices + with information on available multimedia files. + + http://ushare.geexbox.org/ + +comment "ushare requires a toolchain with LARGEFILE support" + depends on !BR2_LARGEFILE diff --git a/package/ushare/ushare-compile-fixes.patch b/package/ushare/ushare-compile-fixes.patch new file mode 100644 index 0000000..cfdf5e3 --- /dev/null +++ b/package/ushare/ushare-compile-fixes.patch @@ -0,0 +1,206 @@ +Patch nixed from OpenWRT svn to fix build breakage. + +Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> + +--- a/src/cds.c ++++ b/src/cds.c +@@ -20,6 +20,8 @@ + */ + + #include <stdlib.h> ++#include <stdio.h> ++#include <string.h> + #include <upnp/upnp.h> + #include <upnp/upnptools.h> + +--- a/src/http.c ++++ b/src/http.c +@@ -25,6 +25,7 @@ + #include <errno.h> + #include <stdio.h> + #include <stdlib.h> ++#include <string.h> + #include <unistd.h> + #include <errno.h> + +@@ -77,8 +78,7 @@ set_info_file (struct File_Info *info, c + info->content_type = ixmlCloneDOMString (content_type); + } + +-static int +-http_get_info (const char *filename, struct File_Info *info) ++int http_get_info (const char *filename, struct File_Info *info) + { + extern struct ushare_t *ut; + struct upnp_entry_t *entry = NULL; +@@ -197,8 +197,7 @@ get_file_memory (const char *fullpath, c + return ((UpnpWebFileHandle) file); + } + +-static UpnpWebFileHandle +-http_open (const char *filename, enum UpnpOpenFileMode mode) ++UpnpWebFileHandle http_open (const char *filename, enum UpnpOpenFileMode mode) + { + extern struct ushare_t *ut; + struct upnp_entry_t *entry = NULL; +@@ -251,8 +250,7 @@ http_open (const char *filename, enum Up + return ((UpnpWebFileHandle) file); + } + +-static int +-http_read (UpnpWebFileHandle fh, char *buf, size_t buflen) ++int http_read (UpnpWebFileHandle fh, char *buf, size_t buflen) + { + struct web_file_t *file = (struct web_file_t *) fh; + ssize_t len = -1; +@@ -286,8 +284,7 @@ http_read (UpnpWebFileHandle fh, char *b + return len; + } + +-static int +-http_write (UpnpWebFileHandle fh __attribute__((unused)), ++int http_write (UpnpWebFileHandle fh __attribute__((unused)), + char *buf __attribute__((unused)), + size_t buflen __attribute__((unused))) + { +@@ -296,8 +293,7 @@ http_write (UpnpWebFileHandle fh __attri + return 0; + } + +-static int +-http_seek (UpnpWebFileHandle fh, off_t offset, int origin) ++int http_seek (UpnpWebFileHandle fh, off_t offset, int origin) + { + struct web_file_t *file = (struct web_file_t *) fh; + off_t newpos = -1; +@@ -371,8 +367,7 @@ http_seek (UpnpWebFileHandle fh, off_t o + return 0; + } + +-static int +-http_close (UpnpWebFileHandle fh) ++int http_close (UpnpWebFileHandle fh) + { + struct web_file_t *file = (struct web_file_t *) fh; + +@@ -402,13 +397,3 @@ http_close (UpnpWebFileHandle fh) + + return 0; + } +- +-struct UpnpVirtualDirCallbacks virtual_dir_callbacks = +- { +- http_get_info, +- http_open, +- http_read, +- http_write, +- http_seek, +- http_close +- }; +--- a/src/http.h ++++ b/src/http.h +@@ -25,6 +25,18 @@ + #include <upnp/upnp.h> + #include <upnp/upnptools.h> + +-struct UpnpVirtualDirCallbacks virtual_dir_callbacks; ++int http_get_info (const char *filename, struct File_Info *info); ++ ++UpnpWebFileHandle http_open (const char *filename, enum UpnpOpenFileMode mode); ++ ++int http_read (UpnpWebFileHandle fh, char *buf, size_t buflen); ++ ++int http_seek (UpnpWebFileHandle fh, off_t offset, int origin); ++ ++int http_write (UpnpWebFileHandle fh __attribute__((unused)), ++ char *buf __attribute__((unused)), ++ size_t buflen __attribute__((unused))); ++ ++int http_close (UpnpWebFileHandle fh); + + #endif /* _HTTP_H_ */ +--- a/src/ushare.c ++++ b/src/ushare.c +@@ -188,7 +188,7 @@ handle_action_request (struct Upnp_Actio + if (strcmp (request->DevUDN + 5, ut->udn)) + return; + +- ip = request->CtrlPtIPAddr.s_addr; ++ ip = (*(struct sockaddr_in *)&request->CtrlPtIPAddr).sin_addr.s_addr; + ip = ntohl (ip); + sprintf (val, "%d.%d.%d.%d", + (ip >> 24) & 0xFF, (ip >> 16) & 0xFF, (ip >> 8) & 0xFF, ip & 0xFF); +@@ -348,13 +348,23 @@ init_upnp (struct ushare_t *ut) + + UpnpEnableWebserver (TRUE); + +- res = UpnpSetVirtualDirCallbacks (&virtual_dir_callbacks); +- if (res != UPNP_E_SUCCESS) +- { +- log_error (_("Cannot set virtual directory callbacks\n")); +- free (description); +- return -1; +- } ++#define upnp_set_callback(cb, func) \ ++ do { \ ++ res = UpnpVirtualDir_set_##cb##Callback(func); \ ++ if (res != UPNP_E_SUCCESS) \ ++ { \ ++ log_error (_("Cannot set virtual directory callbacks\n")); \ ++ free (description); \ ++ return -1; \ ++ } \ ++ } while(0) ++ ++ upnp_set_callback(GetInfo, http_get_info); ++ upnp_set_callback(Open, http_open); ++ upnp_set_callback(Read, http_read); ++ upnp_set_callback(Seek, http_seek); ++ upnp_set_callback(Write, http_write); ++ upnp_set_callback(Close, http_close); + + res = UpnpAddVirtualDir (VIRTUAL_DIR); + if (res != UPNP_E_SUCCESS) +--- a/src/cms.c ++++ b/src/cms.c +@@ -20,6 +20,8 @@ + */ + + #include <stdlib.h> ++#include <stdio.h> ++#include <string.h> + #include <upnp/upnp.h> + #include <upnp/upnptools.h> + +--- a/src/mime.c ++++ b/src/mime.c +@@ -20,6 +20,7 @@ + */ + + #include <stdlib.h> ++#include <stdio.h> + #include <string.h> + + #include "mime.h" +--- a/src/presentation.c ++++ b/src/presentation.c +@@ -19,6 +19,8 @@ + */ + + #include <stdlib.h> ++#include <stdio.h> ++#include <string.h> + + #if HAVE_LANGINFO_CODESET + # include <langinfo.h> +--- a/src/services.c ++++ b/src/services.c +@@ -20,6 +20,8 @@ + */ + + #include <stdlib.h> ++#include <stdio.h> ++#include <string.h> + #include <upnp/upnp.h> + #include <upnp/upnptools.h> + diff --git a/package/ushare/ushare.mk b/package/ushare/ushare.mk new file mode 100644 index 0000000..6238f64 --- /dev/null +++ b/package/ushare/ushare.mk @@ -0,0 +1,26 @@ +############################################################# +# +# ushare +# +############################################################# + +USHARE_VERSION = 1.1a +USHARE_SOURCE = ushare-$(USHARE_VERSION).tar.bz2 +USHARE_SITE = http://ushare.geexbox.org/releases +USHARE_DEPENDENCIES = host-pkg-config libupnp + +define USHARE_CONFIGURE_CMDS + (cd $(@D); \ + $(TARGET_CONFIGURE_OPTS) \ + ./configure --prefix=/usr $(DISABLE_NLS) --cross-compile \ + --cross-prefix="$(TARGET_CROSS)" --sysconfdir=/etc \ + --disable-strip --disable-debug \ + ) +endef + +define USHARE_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install + rm -f $(TARGET_DIR)/etc/init.d/ushare +endef + +$(eval $(call AUTOTARGETS)) -- 1.7.3.4 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 2/2] ushare: new package 2012-03-21 12:02 ` [Buildroot] [PATCH 2/2] ushare: new package Gustavo Zacarias @ 2012-03-21 13:04 ` Peter Korsgaard 2012-03-21 13:11 ` Gustavo Zacarias 0 siblings, 1 reply; 10+ messages in thread From: Peter Korsgaard @ 2012-03-21 13:04 UTC (permalink / raw) To: buildroot >>>>> "Gustavo" == Gustavo Zacarias <gustavo@zacarias.com.ar> writes: Gustavo> UPnP media streamer. Gustavo> TODO: Add DLNA support (libdlna) if there's interest. Gustavo> +############################################################# Gustavo> + Gustavo> +USHARE_VERSION = 1.1a Gustavo> +USHARE_SOURCE = ushare-$(USHARE_VERSION).tar.bz2 Gustavo> +USHARE_SITE = http://ushare.geexbox.org/releases Gustavo> +USHARE_DEPENDENCIES = host-pkg-config libupnp Gustavo> + Gustavo> +define USHARE_CONFIGURE_CMDS Gustavo> + (cd $(@D); \ Gustavo> + $(TARGET_CONFIGURE_OPTS) \ Gustavo> + ./configure --prefix=/usr $(DISABLE_NLS) --cross-compile \ Gustavo> + --cross-prefix="$(TARGET_CROSS)" --sysconfdir=/etc \ Gustavo> + --disable-strip --disable-debug \ Gustavo> + ) Gustavo> +endef Gustavo> + Gustavo> +define USHARE_INSTALL_TARGET_CMDS Gustavo> + $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install Gustavo> + rm -f $(TARGET_DIR)/etc/init.d/ushare Gustavo> +endef Why the custom configure and install steps? Gustavo> + Gustavo> +$(eval $(call AUTOTARGETS)) -- Bye, Peter Korsgaard ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 2/2] ushare: new package 2012-03-21 13:04 ` Peter Korsgaard @ 2012-03-21 13:11 ` Gustavo Zacarias 0 siblings, 0 replies; 10+ messages in thread From: Gustavo Zacarias @ 2012-03-21 13:11 UTC (permalink / raw) To: buildroot On 2012-03-21 10:04, Peter Korsgaard wrote: > Gustavo> +define USHARE_CONFIGURE_CMDS > Gustavo> + (cd $(@D); \ > Gustavo> + $(TARGET_CONFIGURE_OPTS) \ > Gustavo> + ./configure --prefix=/usr $(DISABLE_NLS) --cross-compile > \ > Gustavo> + --cross-prefix="$(TARGET_CROSS)" --sysconfdir=/etc \ > Gustavo> + --disable-strip --disable-debug \ > Gustavo> + ) > Gustavo> +endef > Gustavo> + > Gustavo> +define USHARE_INSTALL_TARGET_CMDS > Gustavo> + $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install > Gustavo> + rm -f $(TARGET_DIR)/etc/init.d/ushare > Gustavo> +endef > > Why the custom configure and install steps? It's not autoconf and it'll bail out on unknown options. So basically s/AUTOTARGETS/GENTARGETS/ :) Regards. ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2012-04-15 21:06 UTC | newest] Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2012-04-11 14:36 [Buildroot] [PATCH 1/2] libupnp: bump to version 1.6.17 Gustavo Zacarias 2012-04-11 14:36 ` [Buildroot] [PATCH 2/2] ushare: new package Gustavo Zacarias 2012-04-15 13:38 ` Peter Korsgaard 2012-04-15 13:49 ` Gustavo Zacarias 2012-04-15 21:06 ` Peter Korsgaard 2012-04-14 14:08 ` [Buildroot] [PATCH 1/2] libupnp: bump to version 1.6.17 Sagaert Johan 2012-04-14 21:51 ` Peter Korsgaard -- strict thread matches above, loose matches on Subject: below -- 2012-03-21 12:02 [Buildroot] [PATCH 1/2] libupnp: move to version 1.6.14 Gustavo Zacarias 2012-03-21 12:02 ` [Buildroot] [PATCH 2/2] ushare: new package Gustavo Zacarias 2012-03-21 13:04 ` Peter Korsgaard 2012-03-21 13:11 ` Gustavo Zacarias
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.