[vlc-commits] Contribs: fix android compilation and build only the library

Jean-Baptiste Kempf git at videolan.org
Mon Aug 20 11:14:53 CEST 2012


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon Aug 20 11:13:53 2012 +0200| [ba1a4be18a0fb217ee5daa7e29f1bd968d02a1be] | committer: Jean-Baptiste Kempf

Contribs: fix android compilation and build only the library

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ba1a4be18a0fb217ee5daa7e29f1bd968d02a1be
---

 contrib/src/live555/android.patch |   52 +++++++++++--------------------------
 contrib/src/live555/rules.mak     |    6 ++---
 2 files changed, 18 insertions(+), 40 deletions(-)

diff --git a/contrib/src/live555/android.patch b/contrib/src/live555/android.patch
index b75af73..3918a76 100644
--- a/contrib/src/live555/android.patch
+++ b/contrib/src/live555/android.patch
@@ -1,43 +1,21 @@
-diff -ur live.orig/groupsock/GroupsockHelper.cpp live/groupsock/GroupsockHelper.cpp
---- live.orig/groupsock/GroupsockHelper.cpp	2012-01-19 16:56:57.026348234 -0500
-+++ live/groupsock/GroupsockHelper.cpp	2012-01-19 16:57:10.470348233 -0500
-@@ -466,9 +466,9 @@
+diff -ruN live/groupsock/GroupsockHelper.cpp live.n/groupsock/GroupsockHelper.cpp
+--- live/groupsock/GroupsockHelper.cpp	2012-08-20 09:33:31.000000000 +0200
++++ live.n/groupsock/GroupsockHelper.cpp	2012-08-20 10:58:28.598217212 +0200
+@@ -466,7 +466,7 @@
    if (!IsMulticastAddress(groupAddress)) return True; // ignore this case
  
    struct ip_mreq_source imr;
--  imr.imr_multiaddr.s_addr = groupAddress;
--  imr.imr_sourceaddr.s_addr = sourceFilterAddr;
--  imr.imr_interface.s_addr = ReceivingInterfaceAddr;
-+  imr.imr_multiaddr = groupAddress;
-+  imr.imr_sourceaddr = sourceFilterAddr;
-+  imr.imr_interface = ReceivingInterfaceAddr;
-   if (setsockopt(socket, IPPROTO_IP, IP_ADD_SOURCE_MEMBERSHIP,
- 		 (const char*)&imr, sizeof (struct ip_mreq_source)) < 0) {
-     socketErr(env, "setsockopt(IP_ADD_SOURCE_MEMBERSHIP) error: ");
-@@ -484,9 +484,9 @@
+-#ifdef ANDROID
++#ifdef __ANDROID__
+     imr.imr_multiaddr = groupAddress;
+     imr.imr_sourceaddr = sourceFilterAddr;
+     imr.imr_interface = ReceivingInterfaceAddr;
+@@ -490,7 +490,7 @@
    if (!IsMulticastAddress(groupAddress)) return True; // ignore this case
  
    struct ip_mreq_source imr;
--  imr.imr_multiaddr.s_addr = groupAddress;
--  imr.imr_sourceaddr.s_addr = sourceFilterAddr;
--  imr.imr_interface.s_addr = ReceivingInterfaceAddr;
-+  imr.imr_multiaddr = groupAddress;
-+  imr.imr_sourceaddr = sourceFilterAddr;
-+  imr.imr_interface = ReceivingInterfaceAddr;
-   if (setsockopt(socket, IPPROTO_IP, IP_DROP_SOURCE_MEMBERSHIP,
- 		 (const char*)&imr, sizeof (struct ip_mreq_source)) < 0) {
-     return False;
-diff -ur live.orig/Makefile.tail live/Makefile.tail
---- live.orig/Makefile.tail	2012-01-19 16:56:57.038348232 -0500
-+++ live/Makefile.tail	2012-01-19 16:57:10.470348233 -0500
-@@ -14,8 +14,8 @@
- 	cd $(GROUPSOCK_DIR) ; $(MAKE)
- 	cd $(USAGE_ENVIRONMENT_DIR) ; $(MAKE)
- 	cd $(BASIC_USAGE_ENVIRONMENT_DIR) ; $(MAKE)
--	cd $(TESTPROGS_DIR) ; $(MAKE)
--	cd $(MEDIA_SERVER_DIR) ; $(MAKE)
-+#	cd $(TESTPROGS_DIR) ; $(MAKE)
-+#	cd $(MEDIA_SERVER_DIR) ; $(MAKE)
- 
- clean:
- 	cd $(LIVEMEDIA_DIR) ; $(MAKE) clean
+-#ifdef ANDROID
++#ifdef __ANDROID__
+     imr.imr_multiaddr = groupAddress;
+     imr.imr_sourceaddr = sourceFilterAddr;
+     imr.imr_interface = ReceivingInterfaceAddr;
diff --git a/contrib/src/live555/rules.mak b/contrib/src/live555/rules.mak
index 7456204..b7cc1e8 100644
--- a/contrib/src/live555/rules.mak
+++ b/contrib/src/live555/rules.mak
@@ -54,7 +54,7 @@ endif
 
 .live555: live555
 	cd $< && ./genMakefiles $(LIVE_TARGET)
-	cd $< && $(MAKE) $(HOSTVARS)
+	cd $< && $(MAKE) $(HOSTVARS) groupsock liveMedia UsageEnvironment BasicUsageEnvironment
 	mkdir -p -- "$(PREFIX)/lib" "$(PREFIX)/include"
 	cp \
 		$</groupsock/libgroupsock.a \
@@ -66,7 +66,7 @@ endif
 		$</groupsock/include/*.hh \
 		$</groupsock/include/*.h \
 		$</liveMedia/include/*.hh \
-        	$</UsageEnvironment/include/*.hh \
-        	$</BasicUsageEnvironment/include/*.hh \
+		$</UsageEnvironment/include/*.hh \
+		$</BasicUsageEnvironment/include/*.hh \
 		"$(PREFIX)/include/"
 	touch $@



More information about the vlc-commits mailing list