[vlc-devel] commit: contrib: Build fat binary using binary contrib on Mac OS X. ( Pierre d'Herbemont )

git version control git at videolan.org
Fri Jan 1 18:44:22 CET 2010


vlc | branch: master | Pierre d'Herbemont <pdherbemont at free.fr> | Thu Dec 31 19:30:49 2009 +0100| [2e024847e1bbfad3ddf4aa9fcb01c90c0e41c854] | committer: Pierre d'Herbemont 

contrib: Build fat binary using binary contrib on Mac OS X.

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

 extras/contrib/Makefile |   23 +++++++++++++++++++++--
 1 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/extras/contrib/Makefile b/extras/contrib/Makefile
index 7ccc993..73d132c 100644
--- a/extras/contrib/Makefile
+++ b/extras/contrib/Makefile
@@ -29,7 +29,7 @@ include ./config.mak
 BUILDDIRS = hosts build
 
 ifdef HAVE_DARWIN_OS
-TARGETALL=using-bin
+TARGETALL=fat-bin
 else
 TARGETALL=using-src
 endif
@@ -70,10 +70,29 @@ ifdef HAVE_DARWIN_10
 	(cd $(PREFIX)/lib && sed -e 's%/usr/lib/libiconv.la%$(PREFIX)/lib/libiconv.la%g' -i.orig *.la && rm -f *.la.orig)
 	(cd src && $(MAKE) .iconv)
 endif
-	touch hosts/$(HOST)/.$(CONTRIBREV)
+	touch $@
 
 using-bin: hosts/$(HOST)/.$(CONTRIBREV) 
 
+hosts/fat/.$(CONTRIBREV)-from-archs:
+	@if test -d tmp; then \
+		echo "Move away ./tmp, it's in the way" ; \
+		exit 1 ; \
+	fi
+	# FIXME - Doing this without rerunning bootstrap & make would be nicer
+	./bootstrap i686-apple-darwin10 && make && \
+	./bootstrap x86_64-apple-darwin10 && make && \
+	mkdir tmp;
+	cp -R hosts/x86_64-apple-darwin10/ tmp;
+	(cd tmp/lib && find . -name "*.dylib" -or -name "*.a") | while read lib; do rm tmp/lib/$$lib \
+	   lipo -create hosts/x86_64-apple-darwin10/lib/$$lib hosts/i686-apple-darwin10/lib/$$lib -output tmp/lib/$$lib; \
+	done;
+	rm -Rf hosts/fat && \
+	mv tmp hosts/fat && \
+	touch $@
+        
+fat-bin: hosts/fat/.$(CONTRIBREV)-from-archs
+
 endif
 
 clean-src:




More information about the vlc-devel mailing list