aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorCory Fields <foss@atlastechnologiesinc.com>2012-10-10 14:10:23 -0700
committerCory Fields <foss@atlastechnologiesinc.com>2012-10-10 14:10:23 -0700
commitf28556b636bd1052868607e6321b313b5f34dc71 (patch)
tree18fce7ff7df51cfc4a2306df2375f5b97f508450 /tools
parentdbe719c4d18bf71c9f13f0c836bcb8452ed97f1d (diff)
parenta68f8fc094c0c89042106d2af02539bb6112179c (diff)
Merge pull request #1493 from theuni/egl-rewrite-master
Egl rewrite
Diffstat (limited to 'tools')
-rw-r--r--tools/android/depends/avahi/Makefile65
-rw-r--r--tools/android/depends/avahi/avahi-optional-ipv6.patch149
2 files changed, 214 insertions, 0 deletions
diff --git a/tools/android/depends/avahi/Makefile b/tools/android/depends/avahi/Makefile
new file mode 100644
index 0000000000..a8beb9cca4
--- /dev/null
+++ b/tools/android/depends/avahi/Makefile
@@ -0,0 +1,65 @@
+include ../Makefile.include
+DEPS= ../Makefile.include Makefile
+
+LIBNAME=avahi
+VERSION=0.6.31
+SOURCE=$(LIBNAME)-$(VERSION)
+ARCHIVE=$(SOURCE).tar.gz
+BASE_URL=http://www.avahi.org/download/
+
+# configuration settings
+CONFIGURE=cp -f $(CONFIG_SUB) $(CONFIG_GUESS) .; \
+ ./configure --prefix=$(PREFIX) --host=$(HOST) --disable-shared \
+ --disable-qt3 \
+ --disable-qt4 \
+ --disable-gdbm \
+ --disable-python-dbus \
+ --disable-pygtk \
+ --disable-gtk3 \
+ --disable-gtk \
+ --disable-mono \
+ --disable-monodoc \
+ --disable-stack-protector \
+ --disable-manpages \
+ --disable-autoipd \
+ --disable-glib \
+ --disable-gobject \
+ --disable-dbus \
+ --disable-libdaemon \
+ --with-distro=none \
+ --with-avahi-user=root \
+ --with-avahi-group=root \
+ --with-autoipd-user=default \
+ --with-autoipd-group=default \
+
+
+LIBDYLIB=$(PLATFORM)/avahi-common/.libs/libavahi-common.a
+
+CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
+
+all: .installed-$(PLATFORM)
+
+$(TARBALLS_LOCATION)/$(ARCHIVE):
+ $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
+
+$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
+ rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
+ $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
+ cd $(PLATFORM); patch -p1 < ../avahi-optional-ipv6.patch
+ cd $(PLATFORM); $(CONFIGURE)
+
+$(LIBDYLIB): $(PLATFORM)
+ $(MAKE) -C $(PLATFORM)
+ touch $@
+
+.installed-$(PLATFORM): $(LIBDYLIB)
+ $(MAKE) -C $(PLATFORM) install
+ touch $@
+
+clean:
+ $(MAKE) -C $(PLATFORM) clean
+ rm -f .installed-$(PLATFORM)
+
+distclean::
+ rm -rf $(PLATFORM) .installed-$(PLATFORM)
+
diff --git a/tools/android/depends/avahi/avahi-optional-ipv6.patch b/tools/android/depends/avahi/avahi-optional-ipv6.patch
new file mode 100644
index 0000000000..e4303b3c4b
--- /dev/null
+++ b/tools/android/depends/avahi/avahi-optional-ipv6.patch
@@ -0,0 +1,149 @@
+Below patch modified for android - Cory Fields
+
+[PATCH] avahi-core: make ipv6 support optional on uclibc 0.9.31+
+
+uClibc 0.9.31+ doesn't define the IPV6_* defines when IPv6 support isn't
+enabled, causing the avahi build to break. Detect this configuration, and
+comment out IPv6 code if so.
+
+Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
+---
+ avahi-core/socket.c | 28 +++++++++++++++++++++++-----
+ 1 file changed, 23 insertions(+), 5 deletions(-)
+
+Index: avahi-0.6.23/avahi-core/socket.c
+===================================================================
+--- avahi-0.6.23.orig/avahi-core/socket.c
++++ avahi-0.6.23/avahi-core/socket.c
+@@ -47,6 +47,11 @@
+ #include <net/if_dl.h>
+ #endif
+
++#include <features.h>
++#if defined(ANDROID)
++#define NO_IPV6
++#endif
++
+ #include "dns.h"
+ #include "fdutil.h"
+ #include "socket.h"
+@@ -75,6 +80,7 @@ static void mdns_mcast_group_ipv4(struct
+ inet_pton(AF_INET, AVAHI_IPV4_MCAST_GROUP, &ret_sa->sin_addr);
+ }
+
++#ifndef NO_IPV6
+ static void mdns_mcast_group_ipv6(struct sockaddr_in6 *ret_sa) {
+ assert(ret_sa);
+
+@@ -83,6 +89,7 @@ static void mdns_mcast_group_ipv6(struct
+ ret_sa->sin6_port = htons(AVAHI_MDNS_PORT);
+ inet_pton(AF_INET6, AVAHI_IPV6_MCAST_GROUP, &ret_sa->sin6_addr);
+ }
++#endif
+
+ static void ipv4_address_to_sockaddr(struct sockaddr_in *ret_sa, const AvahiIPv4Address *a, uint16_t port) {
+ assert(ret_sa);
+@@ -95,6 +102,7 @@ static void ipv4_address_to_sockaddr(str
+ memcpy(&ret_sa->sin_addr, a, sizeof(AvahiIPv4Address));
+ }
+
++#ifndef NO_IPV6
+ static void ipv6_address_to_sockaddr(struct sockaddr_in6 *ret_sa, const AvahiIPv6Address *a, uint16_t port) {
+ assert(ret_sa);
+ assert(a);
+@@ -105,6 +113,7 @@ static void ipv6_address_to_sockaddr(str
+ ret_sa->sin6_port = htons(port);
+ memcpy(&ret_sa->sin6_addr, a, sizeof(AvahiIPv6Address));
+ }
++#endif
+
+ int avahi_mdns_mcast_join_ipv4(int fd, const AvahiIPv4Address *a, int idx, int join) {
+ #ifdef HAVE_STRUCT_IP_MREQN
+@@ -143,6 +152,7 @@ int avahi_mdns_mcast_join_ipv4(int fd, c
+ }
+
+ int avahi_mdns_mcast_join_ipv6(int fd, const AvahiIPv6Address *a, int idx, int join) {
++#ifndef NO_IPV6
+ struct ipv6_mreq mreq6;
+ struct sockaddr_in6 sa6;
+
+@@ -164,6 +174,9 @@ int avahi_mdns_mcast_join_ipv6(int fd, c
+ }
+
+ return 0;
++#else
++ return -1;
++#endif
+ }
+
+ static int reuseaddr(int fd) {
+@@ -372,6 +385,7 @@ fail:
+ }
+
+ int avahi_open_socket_ipv6(int no_reuse) {
++#ifndef NO_IPV6
+ struct sockaddr_in6 sa, local;
+ int fd = -1, yes, r;
+ int ttl;
+@@ -437,7 +451,7 @@ int avahi_open_socket_ipv6(int no_reuse)
+ fail:
+ if (fd >= 0)
+ close(fd);
+-
++#endif
+ return -1;
+ }
+
+@@ -567,7 +581,7 @@ int avahi_send_dns_packet_ipv6(
+ const AvahiIPv6Address *src_address,
+ const AvahiIPv6Address *dst_address,
+ uint16_t dst_port) {
+-
++#ifndef NO_IPV6
+ struct sockaddr_in6 sa;
+ struct msghdr msg;
+ struct iovec io;
+@@ -620,6 +634,9 @@ int avahi_send_dns_packet_ipv6(
+ }
+
+ return sendmsg_loop(fd, &msg, 0);
++#else
++ return -1;
++#endif
+ }
+
+ AvahiDnsPacket *avahi_recv_dns_packet_ipv4(
+@@ -782,7 +799,7 @@ AvahiDnsPacket *avahi_recv_dns_packet_ip
+ AvahiIPv6Address *ret_dst_address,
+ AvahiIfIndex *ret_iface,
+ uint8_t *ret_ttl) {
+-
++#ifndef NO_IPV6
+ AvahiDnsPacket *p = NULL;
+ struct msghdr msg;
+ struct iovec io;
+@@ -889,7 +906,7 @@ AvahiDnsPacket *avahi_recv_dns_packet_ip
+ fail:
+ if (p)
+ avahi_dns_packet_free(p);
+-
++#endif
+ return NULL;
+ }
+
+@@ -934,6 +951,7 @@ fail:
+ }
+
+ int avahi_open_unicast_socket_ipv6(void) {
++#ifndef NO_IPV6
+ struct sockaddr_in6 local;
+ int fd = -1, yes;
+
+@@ -974,6 +992,6 @@ int avahi_open_unicast_socket_ipv6(void)
+ fail:
+ if (fd >= 0)
+ close(fd);
+-
++#endif
+ return -1;
+ }