<commit_before>#!/bin/bash

set -e
set -x

buildLib()
{
    LIBNAME=$1
    CONFIG_ARGS=$2

    cd ${LIBNAME}
    ./configure --prefix=${AVG_PATH} $2
    make clean
    make -j3
    make install
    cd ..
}

buildlibjpeg()
{
    cd jpeg-6b
    cp /usr/share/libtool/config.sub .
    cp /usr/share/libtool/config.guess .
    ./configure --prefix=${AVG_PATH}
    make clean
    make -j3
    make install-lib
    make install-headers
    ranlib ../../lib/libjpeg.a
    cd ..
}

buildlibpng()
{
    cd libpng-1.2.12
    CFLAGS="-fno-common" ./configure --prefix=${AVG_PATH} --disable-shared
    make clean
    make -j3
    make install
    cd ..
}

buildglib()
{
    cd glib-2.10.0 
    LDFLAGS="-framework CoreFoundation $LDFLAGS" ./configure  --prefix=${AVG_PATH} --disable-shared
    make clean
    LDFLAGS="-framework CoreFoundation $LDFLAGS" make -j3
    make install
    cd ..
}

buildpango()
{
    cd pango-1.13.3
    LDFLAGS="-framework CoreFoundation $LDFLAGS" ./configure  --prefix=${AVG_PATH} --disable-shared --without-x --with-included-modules=yes
    make clean
    LDFLAGS="-framework CoreFoundation $LDFLAGS" make -j3
    make install
    cd ..
}

buildffmpeg()
{
    cd ffmpeg
#    patch -p0 < ../../libavg/macpatches/ffmpeg-svn-mactel.patch
    ./configure --prefix=${AVG_PATH} --disable-shared --disable-debug --disable-encoders
    make clean
    make -j3
    make install
    ranlib ../../lib/libavformat.a
    ranlib ../../lib/libavcodec.a
    ranlib ../../lib/libavutil.a
    cd ..    
}

if [[ x"${PKG_CONFIG_PATH}" == "x" ]]
then
    echo Please call 'source mac_avg_env.sh' before calling this script.
    exit -1 
fi
<commit_msg>Update for new ffmpeg version.<commit_after>#!/bin/bash

set -e
set -x

buildLib()
{
    LIBNAME=$1
    CONFIG_ARGS=$2

    cd ${LIBNAME}
    ./configure --prefix=${AVG_PATH} $2
    make clean
    make -j3
    make install
    cd ..
}

buildlibjpeg()
{
    cd jpeg-6b
    cp /usr/share/libtool/config.sub .
    cp /usr/share/libtool/config.guess .
    ./configure --prefix=${AVG_PATH}
    make clean
    make -j3
    make install-lib
    make install-headers
    ranlib ../../lib/libjpeg.a
    cd ..
}

buildlibpng()
{
    cd libpng-1.2.12
    CFLAGS="-fno-common" ./configure --prefix=${AVG_PATH} --disable-shared
    make clean
    make -j3
    make install
    cd ..
}

buildglib()
{
    cd glib-2.10.0 
    LDFLAGS="-framework CoreFoundation $LDFLAGS" ./configure  --prefix=${AVG_PATH} --disable-shared
    make clean
    LDFLAGS="-framework CoreFoundation $LDFLAGS" make -j3
    make install
    cd ..
}

buildpango()
{
    cd pango-1.13.3
    LDFLAGS="-framework CoreFoundation $LDFLAGS" ./configure  --prefix=${AVG_PATH} --disable-shared --without-x --with-included-modules=yes
    make clean
    LDFLAGS="-framework CoreFoundation $LDFLAGS" make -j3
    make install
    cd ..
}

buildffmpeg()
{
    cd ffmpeg
    ./configure --prefix=${AVG_PATH} --disable-shared --disable-debug --disable-encoders
    make clean
    make -j3
    make install
    cd ..    
}

if [[ x"${PKG_CONFIG_PATH}" == "x" ]]
then
    echo Please call 'source mac_avg_env.sh' before calling this script.
    exit -1 
fi

{'fraction_non_alphanumeric': 0.1443527918781726, 'fraction_numerical': 0.014911167512690355, 'mean_word_length': 2.2371663244353184, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, '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': '5682613', 'n_tokens_mistral': 1149, 'n_tokens_neox': 1112, 'n_words': 263}