[vlc-devel] [PATCH] contrib: fix protobuf build on Android

Thomas Guillem thomas.guillem at gmail.com
Wed Oct 1 18:09:09 CEST 2014


---
 contrib/src/protobuf/rules.mak | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/contrib/src/protobuf/rules.mak b/contrib/src/protobuf/rules.mak
index 9fbd339..dbc2338 100644
--- a/contrib/src/protobuf/rules.mak
+++ b/contrib/src/protobuf/rules.mak
@@ -7,6 +7,13 @@ ifeq ($(call need_pkg,"protobuf"),)
 PKGS_FOUND += protobuf
 endif
 
+ifdef HAVE_ANDROID
+HOSTVARS_EXTRA := \
+	LIBS="$(ANDROID_NDK)/sources/cxx-stl/gnu-libstdc++/$(GCCVER)/libs/$(ANDROID_ABI)/libgnustl_static.a"
+else
+HOSTVARS_EXTRA :=
+endif
+
 $(TARBALLS)/protobuf-$(PROTOBUF_VERSION).tar.bz2:
 	$(call download,$(PROTOBUF_URL))
 
@@ -28,6 +35,6 @@ ifdef HAVE_CROSS_COMPILE
 	cd $< && ./configure --prefix="$(PREFIX)" && $(MAKE) install
 	cd $< && $(MAKE) clean
 endif
-	cd $< && $(HOSTVARS) ./configure $(HOSTCONF) --with-protoc=protoc
+	cd $< && $(HOSTVARS) $(HOSTVARS_EXTRA) ./configure $(HOSTCONF) --with-protoc=protoc
 	cd $< && $(MAKE) install
 	touch $@
-- 
2.1.0




More information about the vlc-devel mailing list