[vlc-commits] extras/macosx: merge compilation scripts for 32bit and 64bit

Felix Paul Kühne git at videolan.org
Sun Nov 24 20:05:43 CET 2013


npapi-vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Sun Nov 24 20:04:40 2013 +0100| [95a07dc44df5e2363c42d5b128945eadca8f05df] | committer: Felix Paul Kühne

extras/macosx: merge compilation scripts for 32bit and 64bit

> http://git.videolan.org/gitweb.cgi/npapi-vlc.git/?a=commit;h=95a07dc44df5e2363c42d5b128945eadca8f05df
---

 extras/macosx/build-vlc-32.sh |  257 -----------------------------------------
 extras/macosx/build-vlc.sh    |   63 ++++++----
 2 files changed, 41 insertions(+), 279 deletions(-)

diff --git a/extras/macosx/build-vlc-32.sh b/extras/macosx/build-vlc-32.sh
deleted file mode 100755
index 20b944c..0000000
--- a/extras/macosx/build-vlc-32.sh
+++ /dev/null
@@ -1,257 +0,0 @@
-#!/bin/sh
-
-OSX_VERSION="10.6"
-SDKROOT=`xcode-select -print-path`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$OSX_VERSION.sdk
-
-set -e
-
-usage()
-{
-cat << EOF
-usage: $0 [-v] [-d]
-
-OPTIONS
-   -v       Be more verbose
-   -d       Enable Debug
-EOF
-}
-
-spushd()
-{
-     pushd "$1" 2>&1> /dev/null
-}
-
-spopd()
-{
-     popd 2>&1> /dev/null
-}
-
-info()
-{
-     local green="\033[1;32m"
-     local normal="\033[0m"
-     echo "[${green}info${normal}] $1"
-}
-
-while getopts "hvsdk:" OPTION
-do
-     case $OPTION in
-         h)
-             usage
-             exit 1
-             ;;
-         v)
-             VERBOSE=yes
-             ;;
-         d)  CONFIGURATION="--enable-debug"
-             ;;
-         ?)
-             usage
-             exit 1
-             ;;
-     esac
-done
-shift $(($OPTIND - 1))
-
-out="/dev/null"
-if [ "$VERBOSE" = "yes" ]; then
-   out="/dev/stdout"
-fi
-
-if [ "x$1" != "x" ]; then
-    usage
-    exit 1
-fi
-
-export OSX_VERSION
-export SDKROOT
-
-# Get root dir
-spushd .
-npapi_root_dir=`pwd`
-spopd
-
-info $npapi_root_dir
-
-info "Preparing build dirs"
-
-spushd extras/macosx
-
-if ! [ -e vlc ]; then
-git clone git://git.videolan.org/vlc.git vlc
-fi
-
-spopd #extras/macosx
-
-#
-# Build time
-#
-
-info "Building tools"
-spushd extras/macosx/vlc/extras/tools
-if ! [ -e build ]; then
-./bootstrap && make
-fi
-spopd
-
-info "Fetching contrib"
-
-spushd extras/macosx/vlc/contrib
-
-if ! [ -e 32bit-npapi ]; then
-mkdir 32bit-npapi
-cd 32bit-npapi
-../bootstrap --build=i686-apple-darwin9
-make prebuilt
-fi
-
-spopd
-
-export CC="xcrun clang"
-export CXX="xcrun clang++"
-export OBJC="xcrun clang"
-PREFIX="${npapi_root_dir}/extras/macosx/vlc/32bit_install_dir"
-
-info "Configuring VLC"
-
-if ! [ -e ${PREFIX} ]; then
-    mkdir ${PREFIX}
-fi
-
-spushd extras/macosx/vlc
-if ! [ -e configure ]; then
-    ./bootstrap > ${out}
-fi
-if ! [ -e 32build ]; then
-    mkdir 32build
-fi
-cd 32build
-../configure \
-        --build=i686-apple-darwin9 \
-        --disable-lua --disable-httpd --disable-vlm --disable-sout \
-        --disable-vcd --disable-dvdnav --disable-dvdread --disable-screen \
-        --disable-macosx \
-        --enable-merge-ffmpeg \
-        --disable-growl \
-        --enable-faad \
-        --enable-flac \
-        --enable-theora \
-        --enable-shout \
-        --enable-ncurses \
-        --enable-twolame \
-        --enable-realrtsp \
-        --enable-libass \
-        --enable-macosx-audio \
-        --disable-macosx-eyetv \
-        --disable-macosx-qtkit \
-        --disable-macosx-avfoundation \
-        --enable-macosx-vout \
-        --disable-skins2 \
-        --disable-xcb \
-        --disable-caca \
-        --disable-sdl \
-        --disable-samplerate \
-        --disable-upnp \
-        --disable-goom \
-        --disable-macosx-dialog-provider \
-        --disable-nls \
-        --disable-sdl \
-        --disable-sdl-image \
-        --disable-macosx-vlc-app \
-        --with-macosx-sdk=$SDKROOT \
-        --with-macosx-version-min=10.5 \
-        --prefix=${PREFIX} > ${out}
-
-info "Compiling VLC"
-
-CORE_COUNT=`sysctl -n machdep.cpu.core_count`
-let MAKE_JOBS=$CORE_COUNT+1
-
-if [ "$VERBOSE" = "yes" ]; then
-    make V=1 -j$MAKE_JOBS > ${out}
-else
-    make -j$MAKE_JOBS > ${out}
-fi
-
-info "Installing VLC"
-make install > ${out}
-cd ..
-
-find ${PREFIX}/lib/vlc/plugins -name *.dylib -type f -exec cp '{}' ${PREFIX}/lib/vlc/plugins \;
-
-info "Removing unneeded modules"
-blacklist="
-stats
-access_bd
-shm
-access_imem
-oldrc
-real
-hotkeys
-gestures
-sap
-dynamicoverlay
-rss
-ball
-magnify
-audiobargraph_
-clone
-mosaic
-osdmenu
-puzzle
-mediadirs
-t140
-ripple
-motion
-sharpen
-grain
-posterize
-mirror
-wall
-scene
-blendbench
-psychedelic
-alphamask
-netsync
-audioscrobbler
-motiondetect
-motionblur
-export
-smf
-podcast
-bluescreen
-erase
-stream_filter_record
-speex_resampler
-remoteosd
-magnify
-gradient
-logger
-visual
-fb
-aout_file
-yuv
-dummy
-invert
-sepia
-wave
-hqdn3d
-headphone_channel_mixer
-gaussianblur
-gradfun
-extract
-colorthres
-antiflicker
-anaglyph
-remap
-bluray
-"
-
-for i in ${blacklist}
-do
-    find ${PREFIX}/lib/vlc/plugins -name *$i* -type f -exec rm '{}' \;
-done
-
-spopd
-
-info "Build completed"
diff --git a/extras/macosx/build-vlc.sh b/extras/macosx/build-vlc.sh
index 0119f19..55fcdad 100755
--- a/extras/macosx/build-vlc.sh
+++ b/extras/macosx/build-vlc.sh
@@ -1,9 +1,17 @@
 #!/bin/sh
+set -e
 
-OSX_VERSION="10.7"
-SDKROOT=`xcode-select -print-path`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$OSX_VERSION.sdk
+info()
+{
+    local green="\033[1;32m"
+    local normal="\033[0m"
+    echo "[${green}build${normal}] $1"
+}
 
-set -e
+OSX_VERSION="10.8"
+ARCH="x86_64"
+MINIMAL_OSX_VERSION="10.6"
+SDKROOT=`xcode-select -print-path`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$OSX_VERSION.sdk
 
 usage()
 {
@@ -11,8 +19,9 @@ cat << EOF
 usage: $0 [-v] [-d]
 
 OPTIONS
-   -v       Be more verbose
-   -d       Enable Debug
+   -v            Be more verbose
+   -k <sdk>      Use the specified sdk (default: $SDKROOT for $ARCH)
+   -a <arch>     Use the specified arch (default: $ARCH)
 EOF
 }
 
@@ -33,7 +42,7 @@ info()
      echo "[${green}info${normal}] $1"
 }
 
-while getopts "hvsdk:" OPTION
+while getopts "hva:k:" OPTION
 do
      case $OPTION in
          h)
@@ -43,7 +52,11 @@ do
          v)
              VERBOSE=yes
              ;;
-         d)  CONFIGURATION="--enable-debug"
+         a)
+             ARCH=$OPTARG
+             ;;
+         k)
+             SDKROOT=$OPTARG
              ;;
          ?)
              usage
@@ -63,6 +76,10 @@ if [ "x$1" != "x" ]; then
     exit 1
 fi
 
+if [ "$ARCH" = "i686" ]; then
+    MINIMAL_OSX_VERSION="10.5"
+fi
+
 export OSX_VERSION
 export SDKROOT
 
@@ -98,10 +115,10 @@ info "Fetching contrib"
 
 spushd extras/macosx/vlc/contrib
 
-if ! [ -e 64bit-npapi ]; then
-mkdir 64bit-npapi
-cd 64bit-npapi
-../bootstrap --build=x86_64-apple-darwin10
+if ! [ -e ${ARCH}-npapi ]; then
+mkdir ${ARCH}-npapi
+cd ${ARCH}-npapi
+../bootstrap --build=${ARCH}-apple-darwin10
 make prebuilt
 fi
 
@@ -110,7 +127,7 @@ spopd
 export CC="xcrun clang"
 export CXX="xcrun clang++"
 export OBJC="xcrun clang"
-PREFIX="${npapi_root_dir}/extras/macosx/vlc/64bit_install_dir"
+PREFIX="${npapi_root_dir}/extras/macosx/vlc/${ARCH}-install"
 
 info "Configuring VLC"
 
@@ -122,18 +139,22 @@ spushd extras/macosx/vlc
 if ! [ -e configure ]; then
     ./bootstrap > ${out}
 fi
-if ! [ -e 64bit-build ]; then
-    mkdir 64bit-build
+if ! [ -e ${ARCH}-build ]; then
+    mkdir ${ARCH}-build
 fi
-cd 64bit-build
+cd ${ARCH}-build
 ../configure \
-        --build=x86_64-apple-darwin10 \
+        --build=${ARCH}-apple-darwin10 \
         --disable-lua --disable-httpd --disable-vlm --disable-sout \
         --disable-vcd --disable-dvdnav --disable-dvdread --disable-screen \
+        --disable-debug \
         --disable-macosx \
+        --disable-notify \
+        --disable-projectm \
         --enable-merge-ffmpeg \
         --disable-growl \
         --enable-faad \
+        --disable-bluray \
         --enable-flac \
         --enable-theora \
         --enable-shout \
@@ -142,10 +163,12 @@ cd 64bit-build
         --enable-realrtsp \
         --enable-libass \
         --enable-macosx-audio \
+        --disable-macosx-avfoundation \
+        --disable-macosx-dialog-provider \
         --disable-macosx-eyetv \
         --disable-macosx-qtkit \
-        --disable-macosx-avfoundation \
         --disable-macosx-quartztext \
+        --disable-macosx-vlc-app \
         --enable-macosx-vout \
         --disable-skins2 \
         --disable-xcb \
@@ -154,15 +177,13 @@ cd 64bit-build
         --disable-samplerate \
         --disable-upnp \
         --disable-goom \
-        --disable-macosx-dialog-provider \
         --disable-nls \
         --disable-sdl \
         --disable-sdl-image \
-        --disable-macosx-vlc-app \
         --disable-dirac \
         --enable-coregraphicslayer-vout \
         --with-macosx-sdk=$SDKROOT \
-        --with-macosx-version-min=10.6 \
+        --with-macosx-version-min=${MINIMAL_OSX_VERSION} \
         --prefix=${PREFIX} > ${out}
 
 info "Compiling VLC"
@@ -247,8 +268,6 @@ colorthres
 antiflicker
 anaglyph
 remap
-bluray
-x264
 "
 
 for i in ${blacklist}



More information about the vlc-commits mailing list