<commit_before>#!/bin/sh

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

# Get root dir
spushd .
npapi_root_dir=`pwd`
spopd

info $npapi_root_dir

info "Preparing build dirs"

if ! [ -e gecko ]; then
svn export http://npapi-sdk.googlecode.com/svn/trunk/headers gecko -r HEAD
fi

spushd extras/macosx

if ! [ -e vlc ]; then
git clone git://git.videolan.org/vlc.git
fi

spopd #extras/macosx

#
# Build time
#

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
make prebuilt
fi

spopd

export CC="xcrun clang"
export CXX="xcrun clang++"
export OBJC="xcrun clang"
PREFIX="${npapi_root_dir}/extras/macosx/vlc/64bit_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 64build ]; then
    mkdir 64build
fi
cd 64build
../configure \
        --build=x86_64-apple-darwin10 \
        --disable-lua --disable-httpd --disable-vlm --disable-sout \
        --disable-vcd --disable-dvdnav --disable-dvdread --disable-screen \
        --disable-macosx \
        --enable-merge-ffmpeg \
        --disable-growl \
        --enable-minimal-macosx \
        --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 \
        --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 \
        --prefix=${PREFIX} > ${out}

info "Compiling vlc"

CORE_COUNT=`sysctl -n machdep.cpu.core_count`
let MAKE_JOBS=$CORE_COUNT+1<commit_msg>extras/macosx: we don't want the OSX app bundle, disable it<commit_after>#!/bin/sh

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

# Get root dir
spushd .
npapi_root_dir=`pwd`
spopd

info $npapi_root_dir

info "Preparing build dirs"

if ! [ -e gecko ]; then
svn export http://npapi-sdk.googlecode.com/svn/trunk/headers gecko -r HEAD
fi

spushd extras/macosx

if ! [ -e vlc ]; then
git clone git://git.videolan.org/vlc.git
fi

spopd #extras/macosx

#
# Build time
#

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
make prebuilt
fi

spopd

export CC="xcrun clang"
export CXX="xcrun clang++"
export OBJC="xcrun clang"
PREFIX="${npapi_root_dir}/extras/macosx/vlc/64bit_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 64build ]; then
    mkdir 64build
fi
cd 64build
../configure \
        --build=x86_64-apple-darwin10 \
        --disable-lua --disable-httpd --disable-vlm --disable-sout \
        --disable-vcd --disable-dvdnav --disable-dvdread --disable-screen \
        --disable-macosx \
        --enable-merge-ffmpeg \
        --disable-growl \
        --enable-minimal-macosx \
        --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 \
        --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 \
        --prefix=${PREFIX} > ${out}

info "Compiling vlc"

CORE_COUNT=`sysctl -n machdep.cpu.core_count`
let MAKE_JOBS=$CORE_COUNT+1
{'fraction_non_alphanumeric': 0.15011506461320587, 'fraction_numerical': 0.017702248185519562, 'mean_word_length': 1.733430091920658, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5078732', 'n_tokens_mistral': 2222, 'n_tokens_neox': 2102, 'n_words': 441}