[vlc-commits] commit: macosx: Add a dumb build. sh script to run all the steps requested to build VLC on macosx. (Pierre d' Herbemont )

git at videolan.org git at videolan.org
Sun Nov 7 22:08:10 CET 2010


vlc | branch: master | Pierre d'Herbemont <pdherbemont at free.fr> | Sun Nov  7 22:03:40 2010 +0100| [2ec53236058360f9f9b08b2f3aa4a7a06d6d8f0e] | committer: Pierre d'Herbemont 

macosx: Add a dumb build.sh script to run all the steps requested to build VLC on macosx.

This may help some, and to link how to build VLC on Mac OS X for a certain version. (Should be more robust than wiki.videolan.org/OSXCompile)

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

 extras/package/macosx/build.sh |   84 ++++++++++++++++++++++++++++++++++++++++
 1 files changed, 84 insertions(+), 0 deletions(-)

diff --git a/extras/package/macosx/build.sh b/extras/package/macosx/build.sh
new file mode 100755
index 0000000..65ca902
--- /dev/null
+++ b/extras/package/macosx/build.sh
@@ -0,0 +1,84 @@
+#!/bin/sh
+set -e
+
+info()
+{
+    echo " [build] $1"
+}
+
+usage()
+{
+cat << EOF
+usage: $0 [options]
+
+OPTIONS:
+   -h            Show some help
+EOF
+
+}
+
+spushd()
+{
+    pushd "$1" > /dev/null
+}
+
+spopd()
+{
+    popd > /dev/null
+}
+
+while getopts "h" OPTION
+do
+     case $OPTION in
+         h)
+             usage
+             exit 1
+             ;;
+     esac
+done
+shift $(($OPTIND - 1))
+
+if [ "x$1" != "x" ]; then
+    usage
+    exit 1
+fi
+
+info "Building VLC for the Mac OS X"
+
+spushd `dirname $0`/../../..
+vlcroot=`pwd`
+spopd
+
+builddir="${vlcroot}/build-macosx"
+
+export CC=/Developer/usr/bin/llvm-gcc-4.2
+export CXX=/Developer/usr/bin/llvm-g++-4.2
+export OBJC=/Developer/usr/bin/llvm-gcc-4.2
+
+spushd "${vlcroot}/extras/contrib"
+./bootstrap
+make
+spopd
+
+mkdir -p "${builddir}"
+
+if ! [ -e "${vlcroot}/configure" ]; then
+    ${vlcroot}/bootstrap
+fi
+
+spushd "${builddir}"
+
+# Run configure only upon changes.
+if [ "${vlcroot}/configure" -nt config.log ]; then
+  ${vlcroot}/configure \
+      --enable-debug
+fi
+
+core_count=`sysctl -n machdep.cpu.core_count`
+let jobs=$core_count+1
+
+info "Running make -j$jobs"
+
+make -j$jobs
+spopd
+



More information about the vlc-commits mailing list