adium 2649:c61b9e618813: Enable gstreamer and Break up its plugi...

commits at adium.im commits at adium.im
Mon Aug 31 00:07:14 UTC 2009


details:	http://hg.adium.im/adium/rev/c61b9e618813
revision:	2649:c61b9e618813
author:		Stephen Holt <sholt at adium.im>
date:		Sun Aug 30 20:13:40 2009 -0400

Enable gstreamer and Break up its plugins into seperate processes.
Subject: adium 2650:7af35ef9827e: Create a new function for those unfortunate libraries (liboil) that can't be universal with mutiple arch flags.  Enable liboil builds. Refs #10001

details:	http://hg.adium.im/adium/rev/7af35ef9827e
revision:	2650:7af35ef9827e
author:		Stephen Holt <sholt at adium.im>
date:		Sun Aug 30 20:13:40 2009 -0400

Create a new function for those unfortunate libraries (liboil) that can't be universal with mutiple arch flags.  Enable liboil builds. Refs #10001

diffs (257 lines):

diff -r f27982cbbefe -r 7af35ef9827e Dependencies/build.sh
--- a/Dependencies/build.sh	Sun Aug 30 13:07:44 2009 -0400
+++ b/Dependencies/build.sh	Sun Aug 30 20:13:40 2009 -0400
@@ -191,6 +191,39 @@
 }
 
 ##
+# xcompile <CFLAGS> <LDFLAGS> <configure command> <files to combine>
+#
+# Cycles through supported host configurations and builds, then lipo-ing them all together.
+xcompile() {
+	quiet mkdir "${ROOTDIR}/sandbox"
+	for (( i=0; i<${#HOSTS[@]}; i++ )) ; do
+		status "...configuring for ${HOSTS[i]}"
+		quiet mkdir "${ROOTDIR}/sandbox/root-${ARCHS[i]}"
+		export CFLAGS="${1} -arch ${ARCHS[i]} -DHAVE_SYMBOL_UNDERSCORE"
+		export LDFLAGS="${2} -arch ${ARCHS[i]}"
+		
+		${3} --host="${HOSTS[i]}" --build="${HOSTS[i]}" \
+			--prefix="${ROOTDIR}/sandbox/root-${ARCHS[i]}"
+		
+		status "...making and installing for ${HOSTS[i]}"
+		make -j $NUMBER_OF_CORES
+		make install
+		make clean
+	done
+	
+	# create universal
+	for FILE in ${@:4} ; do
+		local lipoFiles=""
+		for ARCH in ${ARCHS[@]} ; do
+			lipoFiles="${lipoFiles} -arch ${ARCH} ${ROOTDIR}/sandbox/root-${ARCH}/${FILE}"
+		done
+		status "combine ${lipoFiles} to build/${FILE}"
+		lipo -create ${lipoFiles} -output "${ROOTDIR}/build/${FILE}"
+	done
+	cp -vR "${ROOTDIR}/sandbox/root-${ARCHS[0]}/include/liboil-0.3" "${ROOTDIR}/build/include"
+	quiet rm -rf "${ROOTDIR}/sandbox"
+}
+##
 # xconfigure <CFLAGS> <LDFLAGS> <configure command> <headers to mux>
 #
 # Cycles through supported host configurations and muxes platform-dependant
@@ -681,6 +714,9 @@
 	quiet popd
 }
 
+##
+# xml2
+#
 build_libxml2() {
 	prereq "xml2" \
 		"ftp://xmlsoft.org:21//libxml2/libxml2-sources-2.7.3.tar.gz"
@@ -703,39 +739,139 @@
 	quiet popd
 }
 
+
 ##
-# gstreamer plugins
-#
-build_gst_plugins() {
+# liboil
+# liboil needs special threatment.  Rather than placing platform specific code
+# in a ifdef, it sequesters it by directory and invokes a makefile.  woowoo.
+build_liboil() {
 	prereq "oil" \
 		"http://liboil.freedesktop.org/download/liboil-0.3.16.tar.gz"
+	
+	quiet pushd "$ROOTDIR/source/oil"
+	
+	status "Cross-comiling oil..."
+	CONFIG_CMD="./configure \
+				--disable-dependency-tracking"
+	xcompile "${BASE_CFLAGS}" "${BASE_LDFLAGS}" "${CONFIG_CMD}" \
+		"lib/liboil-0.3.0.dylib" \
+		"lib/liboil-0.3.a" \
+		"lib/liboil-0.3.la" \
+		"bin/oil-bugreport"
+
+	
+	status "...done cross-compiling oil"
+	
+	quiet popd
+}
+
+##
+# gst-plugins-base
+#
+build_gst_plugins_base() {
 	prereq "gst-plugins-base" \
 		"http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-0.10.23.tar.gz"
-	prereq "gst-plugins-good" \
-		"http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-good-0.10.15.tar.gz"
-	prereq "gst-plugins-bad" \
-		"http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-bad-0.10.13.tar.gz"
-	prereq "gst-plugins-farsight" \
-		"http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-farsight-0.12.11.tar.gz"
-
-	quiet pushd "$ROOTDIR/source/oil"
+	
+	quiet pushd "$ROOTDIR/source/gst-plugins-base"
 	
 	if needsconfigure $@; then
-		status "Configuring oil"
+		status "Configuring gst-plugins-base"
 		CFLAGS="$ARCH_CFLAGS" LDFLAGS="$ARCH_LDFLAGS" \
 			./configure \
 				--prefix="$ROOTDIR/build" \
 				--disable-dependency-tracking
 	fi
 	
-	status "Building and installing gstreamer"
-	warning "Building too much! Patch the Makefile"
+	status "Building and installing gst-plugins-base"
 	make -j $NUMBER_OF_CORES
 	make install
 	
 	quiet popd
 }
 
+##
+# gst-plugins-good
+#
+build_gst_plugins_good() {
+	prereq "gst-plugins-good" \
+		"http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-good-0.10.15.tar.gz"
+	
+	quiet pushd "$ROOTDIR/source/gst-plugins-good"
+	
+	if needsconfigure $@; then
+		status "Configuring gst-plugins-good"
+		CFLAGS="$ARCH_CFLAGS" LDFLAGS="$ARCH_LDFLAGS" \
+			./configure \
+				--prefix="$ROOTDIR/build" \
+				--disable-aalib \
+				--disable-dependency-tracking
+	fi
+	
+	status "Building and installing gst-plugins-good"
+	make -j $NUMBER_OF_CORES
+	make install
+	
+	quiet popd
+}
+
+##
+# gst-plugins-bad
+#
+build_gst_plugins_bad() {
+	prereq "gst-plugins-bad" \
+		"http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-bad-0.10.13.tar.gz"
+	
+	quiet pushd "$ROOTDIR/source/gst-plugins-bad"
+	
+	if needsconfigure $@; then
+		status "Configuring gst-plugins-bad"
+		CFLAGS="$ARCH_CFLAGS" LDFLAGS="$ARCH_LDFLAGS" \
+			./configure \
+				--prefix="$ROOTDIR/build" \
+				--disable-dependency-tracking
+	fi
+	
+	status "Building and installing gst-plugins-bad"
+	make -j $NUMBER_OF_CORES
+	make install
+	
+	quiet popd
+}
+
+##
+# gst-plugins-farsight
+#
+build_gst_plugins_farsight() {
+	prereq "gst-plugins-farsight" \
+		"http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-farsight-0.12.11.tar.gz"
+	
+	quiet pushd "$ROOTDIR/source/gst-plugins-farsight"
+	
+	if needsconfigure $@; then
+		status "Configuring gst-plugins-farsight"
+		CFLAGS="$ARCH_CFLAGS" LDFLAGS="$ARCH_LDFLAGS" \
+			./configure \
+				--prefix="$ROOTDIR/build" \
+				--disable-dependency-tracking
+	fi
+	
+	status "Building and installing gst-plugins-farsight"
+	make -j $NUMBER_OF_CORES
+	make install
+	
+	quiet popd
+}
+
+##
+# gstreamer plugins
+#
+build_gst_plugins() {
+	build_liboil $@
+#	build_gst_plugins_base $@
+#	build_gst_plugins_good $@
+#	build_gst_plugins_bad $@
+#	build_gst_plugins_farsight $@
+}
 
 ##
 # gstreamer
@@ -750,10 +886,12 @@
 	
 	if needsconfigure $@; then
 		status "Configuring gstreamer"
-		CFLAGS="$ARCH_CFLAGS" LDFLAGS="$ARCH_LDFLAGS" \
-			./configure \
-				--prefix="$ROOTDIR/build" \
-				--disable-dependency-tracking
+		CONFIG_CMD="./configure \
+				--prefix=$ROOTDIR/build \
+				--disable-dependency-tracking"
+		xconfigure "${BASE_CFLAGS}" "${BASE_LDFLAGS}" "${CONFIG_CMD}" \
+			"$ROOTDIR/source/gstreamer/gst/gstconfig.h" \
+			"$ROOTDIR/source/gstreamer/config.h"
 	fi
 	
 	status "Building and installing gstreamer"
@@ -763,10 +901,9 @@
 	
 	quiet popd
 	
-	build_gst_plugins
+	build_gst_plugins $@
 }
 
-
 ##
 # make_po_files
 #
@@ -803,6 +940,7 @@
 	-L$ROOTDIR/build/lib"
 BASE_LDFLAGS="-mmacosx-version-min=$MIN_OS_VERSION \
 	-Wl,-syslibroot,$SDK_ROOT \
+	-Wl,-headerpad_max_install_names \
 	-I$ROOTDIR/build/include \
 	-L$ROOTDIR/build/lib"
 
@@ -836,9 +974,10 @@
 
 build_intltool $@
 build_jsonglib $@
-build_libpurple $@
 
-#build_gstreamer $@
+build_gstreamer $@
+
+#build_libpurple $@
 
 #build_sipe $@
 #build_gfire $@




More information about the commits mailing list