banshee r4708 - trunk/banshee/build/osx



Author: abock
Date: Tue Oct 21 04:04:40 2008
New Revision: 4708
URL: http://svn.gnome.org/viewvc/banshee?rev=4708&view=rev

Log:
Support target sets and patches, add explicit targets for the Xiph stack, wavpack, and taglib

Added:
   trunk/banshee/build/osx/TODO
   trunk/banshee/build/osx/gst-plugins-base-docs-fix.patch
   trunk/banshee/build/osx/gstreamer-docs-fix.patch
   trunk/banshee/build/osx/oss-00-xiph-libs.targets
   trunk/banshee/build/osx/oss-10-extra-libs.targets
   trunk/banshee/build/osx/oss-20-gstreamer.targets
   trunk/banshee/build/osx/oss-40-managed-libs.targets
Modified:
   trunk/banshee/build/osx/build-deps.sh
   trunk/banshee/build/osx/collect-deps.sh

Added: trunk/banshee/build/osx/TODO
==============================================================================
--- (empty file)
+++ trunk/banshee/build/osx/TODO	Tue Oct 21 04:04:40 2008
@@ -0,0 +1,7 @@
+FIXME/TODO Items for build-deps.sh:
+
+	* Do we really need to run autogen.sh? Probably are okay with just configure
+	* Allow specifying inclusion or exclusion targets in target sets
+	* Allow specifying actions for targets (i.e. make clean, make all, etc.)
+	* Maybe do not always rebuild targets; mark when a target succeeds and skip?
+

Modified: trunk/banshee/build/osx/build-deps.sh
==============================================================================
--- trunk/banshee/build/osx/build-deps.sh	(original)
+++ trunk/banshee/build/osx/build-deps.sh	Tue Oct 21 04:04:40 2008
@@ -1,24 +1,5 @@
 #!/bin/bash
 
-GST_DOWNLOAD_URI="http://gstreamer.freedesktop.org/src/%n/%f";
-GST_CONFIGURE_ARGS="--disable-gtk-doc"
-
-NDBUS_DOWNLOAD_URI="http://www.ndesk.org/archive/dbus-sharp/%f";
-
-TARGETS=(
-    # name (%n)        version (%v)  dir (%d)  file (%f)   download uri          configure args
-	"liboil            0.3.15        %n-%v     %d.tar.gz   http://liboil.freedesktop.org/download/%f  ${GST_CONFIGURE_ARGS}"
-	"gstreamer         0.10.19       %n-%v     %d.tar.gz   ${GST_DOWNLOAD_URI}                        ${GST_CONFIGURE_ARGS}"
-	"gst-plugins-base  0.10.19       %n-%v     %d.tar.gz   ${GST_DOWNLOAD_URI}                        ${GST_CONFIGURE_ARGS}"
-	"gst-plugins-good  0.10.7        %n-%v     %d.tar.gz   ${GST_DOWNLOAD_URI}                        ${GST_CONFIGURE_ARGS}"
-	"ndesk-dbus        0.6.0         %n-%v     %d.tar.gz   ${NDBUS_DOWNLOAD_URI}"
-	"ndesk-dbus-glib   0.4.1         %n-%v     %d.tar.gz   ${NDBUS_DOWNLOAD_URI}"
-	"taglib-sharp      2.0.3.0       %n-%v     %d.tar.gz   http://www.taglib-sharp.com/Download/%f    --disable-docs"
-	"mono-addins       0.3.1         %n-%v     %d.tar.bz2  http://go-mono.com/sources/mono-addins/%f  --disable-docs"
-)
-
-# There's probably no need to modify anything below
-
 VERBOSE=0
 BUILD_LOG=`pwd`/build-log
 
@@ -26,7 +7,7 @@
 source build.env
 
 function show_help () {
-	echo "Usage: $0 [options]"
+	echo "Usage: $0 [options] [targets]"
 	echo
 	echo "Available Options:"
 	echo "  -h, --help        show this help"
@@ -35,12 +16,10 @@
 	exit 1
 }
 
-for arg in $@; do
-	case $arg in
-		-v|--verbose) VERBOSE=1 ;;
-		-h|--help)    show_help ;;
-	esac
-done
+function bail () {
+	echo "ERROR: $1" 1>&2
+	exit $2
+}
 
 function expand_target_defs () {
 	for def in $@; do
@@ -55,11 +34,6 @@
 	done
 }
 
-function bail () {
-	echo "ERROR: $1" 1>&2
-	exit $2
-}
-
 function run () {
 	echo "--> Running: $@"
 	BAIL_MESSAGE="Failed to run $1 against ${TARGET_NAME}"
@@ -70,15 +44,45 @@
 	fi
 }
 
+ALL_TARGETS=()
+
+function append_target () {
+	FILE=$1
+	[[ -f $FILE ]] || FILE="$FILE.targets"
+	source $FILE &>/dev/null || bail "Could not load target set '$FILE'" 1
+	echo "Loading target set '$FILE'"
+	for ((i = 0, n = ${#TARGETS[ ]}; i < n; i++)); do
+		ALL_TARGETS[${#ALL_TARGETS[*]}]=${TARGETS[$i]}
+	done
+}
+
+for arg in $@; do
+	case $arg in
+		-v|--verbose) VERBOSE=1 ;;
+		-h|--help)    show_help ;;
+		-*)           bail "Unknown argument: $arg" 1 ;;
+		*)            append_target $arg ;;
+	esac
+done
+
+if [ ${#ALL_TARGETS[ ]} -eq 0 ]; then
+	for target_file in $(find $(dirname $0) -maxdepth 1 -name \*.targets); do
+		append_target $target_file
+	done
+fi
+
 which wget &>/dev/null || bail "You need to install wget (sudo port install wget)"
 
 SOURCES_ROOT=bundle-deps-src
 mkdir -p $SOURCES_ROOT
 pushd $SOURCES_ROOT &>/dev/null
 
-for ((i = 0, n = ${#TARGETS[ ]}; i < n; i++)); do
+echo "Starting to build all targets..."
+echo
+
+for ((i = 0, n = ${#ALL_TARGETS[ ]}; i < n; i++)); do
 	# Break the target definition into its parts
-	TARGET=(${TARGETS[$i]})
+	TARGET=(${ALL_TARGETS[$i]})
 	TARGET_NAME=${TARGET[0]}
 	TARGET_VERSION=${TARGET[1]}
 	TARGET_DIR=${TARGET[2]}
@@ -115,6 +119,15 @@
 			CONFIGURE=./autogen.sh
 		fi
 
+		if [ ! -f patched ]; then
+			patches=$(find ../.. -maxdepth 1 -name ${TARGET_NAME}\*.patch)
+			for patch in $patches; do
+				echo "--> Running: patch -p0 < $patch"
+				patch -p0 < $patch 1>/dev/null || bail "Could not apply patch $patch to $TARGET_NAME" $?
+				touch patched
+			done
+		fi
+
 		run $CONFIGURE --prefix=$BUILD_PREFIX $TARGET_CONFIGURE_ARGS
 		run make clean
 		run make -j2

Modified: trunk/banshee/build/osx/collect-deps.sh
==============================================================================
--- trunk/banshee/build/osx/collect-deps.sh	(original)
+++ trunk/banshee/build/osx/collect-deps.sh	Tue Oct 21 04:04:40 2008
@@ -10,9 +10,10 @@
 mkdir $BUNDLE
 mkdir $BUNDLE/gstreamer-0.10
 
-find $BUILD_PREFIX/lib -name *.dylib -exec cp {} $BUNDLE \;
-find $BUILD_PREFIX/lib/gstreamer-0.10 -name *.so -exec cp {} $BUNDLE/gstreamer-0.10 \;
-find $BUILD_PREFIX/lib/mono -name *.dll -not -name *policy* -type f -exec cp {} $BUNDLE \;
+cp $BUILD_PREFIX/bin/{gst-launch,gst-inspect}-0.10 $BUNDLE &>/dev/null
+find $BUILD_PREFIX/lib -name *.dylib -type f -exec cp {} $BUNDLE \; &>/dev/null
+find $BUILD_PREFIX/lib/gstreamer-0.10 -name *.so -type f -exec cp {} $BUNDLE/gstreamer-0.10 \; &>/dev/null
+find $BUILD_PREFIX/lib/mono -name *.dll -not -name *policy* -type f -exec cp {} $BUNDLE \; &>/dev/null
 
 popd &>/dev/null
 

Added: trunk/banshee/build/osx/gst-plugins-base-docs-fix.patch
==============================================================================
--- (empty file)
+++ trunk/banshee/build/osx/gst-plugins-base-docs-fix.patch	Tue Oct 21 04:04:40 2008
@@ -0,0 +1,10 @@
+--- Makefile.am.orig	2008-10-20 22:39:29.000000000 -0400
++++ Makefile.am	2008-10-20 22:39:54.000000000 -0400
+@@ -11,7 +11,6 @@
+ 	gst sys $(SUBDIRS_EXT) 	\
+ 	tools 			\
+ 	tests 			\
+-	docs			\
+ 	po 			\
+ 	common 			\
+ 	m4 			\

Added: trunk/banshee/build/osx/gstreamer-docs-fix.patch
==============================================================================
--- (empty file)
+++ trunk/banshee/build/osx/gstreamer-docs-fix.patch	Tue Oct 21 04:04:40 2008
@@ -0,0 +1,10 @@
+--- Makefile.am.orig	2008-10-20 21:39:07.000000000 -0400
++++ Makefile.am	2008-10-20 21:39:26.000000000 -0400
+@@ -12,7 +12,6 @@
+ 
+ SUBDIRS = \
+ 	gst libs plugins tools tests \
+-	docs \
+ 	pkgconfig po \
+ 	common
+ 

Added: trunk/banshee/build/osx/oss-00-xiph-libs.targets
==============================================================================
--- (empty file)
+++ trunk/banshee/build/osx/oss-00-xiph-libs.targets	Tue Oct 21 04:04:40 2008
@@ -0,0 +1,10 @@
+XIPH_DOWNLOAD_URI="http://downloads.xiph.org/releases";
+
+TARGETS=(
+    # name (%n)        version (%v)  dir (%d)  file (%f)   download uri                    configure args
+    "libogg            1.1.3         %n-%v     %d.tar.gz   ${XIPH_DOWNLOAD_URI}/ogg/%f     "
+    "libvorbis         1.2.0         %n-%v     %d.tar.gz   ${XIPH_DOWNLOAD_URI}/vorbis/%f  "
+	"flac              1.2.1         %n-%v     %d.tar.gz   ${XIPH_DOWNLOAD_URI}/%n/%f      --disable-asm-optimizations"
+    "libtheora         1.0beta3      %n-%v     %d.tar.gz   ${XIPH_DOWNLOAD_URI}/theora/%f  "
+    "speex             1.2rc1        %n-%v     %d.tar.gz   ${XIPH_DOWNLOAD_URI}/%n/%f      "
+)

Added: trunk/banshee/build/osx/oss-10-extra-libs.targets
==============================================================================
--- (empty file)
+++ trunk/banshee/build/osx/oss-10-extra-libs.targets	Tue Oct 21 04:04:40 2008
@@ -0,0 +1,5 @@
+TARGETS=(
+    # name (%n)        version (%v)  dir (%d)  file (%f)   download uri                    configure args
+    "wavpack           4.50.1        %n-%v     %d.tar.bz2  http://www.wavpack.com/%f";
+	"taglib            1.5           %n-%v     %d.tar.gz   http://developer.kde.org/~wheeler/files/src/%f";
+)

Added: trunk/banshee/build/osx/oss-20-gstreamer.targets
==============================================================================
--- (empty file)
+++ trunk/banshee/build/osx/oss-20-gstreamer.targets	Tue Oct 21 04:04:40 2008
@@ -0,0 +1,10 @@
+GST_DOWNLOAD_URI="http://gstreamer.freedesktop.org/src/%n/%f";
+GST_CONFIGURE_ARGS="--disable-gtk-doc"
+
+TARGETS=(
+    # name (%n)        version (%v)  dir (%d)  file (%f)   download uri                               configure args
+    "liboil            0.3.15        %n-%v     %d.tar.gz   http://liboil.freedesktop.org/download/%f  ${GST_CONFIGURE_ARGS}"
+    "gstreamer         0.10.21       %n-%v     %d.tar.gz   ${GST_DOWNLOAD_URI}                        ${GST_CONFIGURE_ARGS}"
+    "gst-plugins-base  0.10.21       %n-%v     %d.tar.gz   ${GST_DOWNLOAD_URI}                        ${GST_CONFIGURE_ARGS} --disable-x --disable-xvideo --disable-xshm --disable-gio --disable-gnome_vfs"
+    "gst-plugins-good  0.10.10       %n-%v     %d.tar.gz   ${GST_DOWNLOAD_URI}                        ${GST_CONFIGURE_ARGS}"
+)

Added: trunk/banshee/build/osx/oss-40-managed-libs.targets
==============================================================================
--- (empty file)
+++ trunk/banshee/build/osx/oss-40-managed-libs.targets	Tue Oct 21 04:04:40 2008
@@ -0,0 +1,9 @@
+NDBUS_DOWNLOAD_URI="http://www.ndesk.org/archive/dbus-sharp/%f";
+
+TARGETS=(
+    # name (%n)        version (%v)  dir (%d)  file (%f)   download uri                               configure args 
+    "ndesk-dbus        0.6.0         %n-%v     %d.tar.gz   ${NDBUS_DOWNLOAD_URI}"
+    "ndesk-dbus-glib   0.4.1         %n-%v     %d.tar.gz   ${NDBUS_DOWNLOAD_URI}"
+    "taglib-sharp      2.0.3.0       %n-%v     %d.tar.gz   http://www.taglib-sharp.com/Download/%f    --disable-docs"
+    "mono-addins       0.3.1         %n-%v     %d.tar.bz2  http://go-mono.com/sources/mono-addins/%f  --disable-docs"
+)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]