Blame autobuild/osx/brew/synfigstudio-osx-build.sh

b735c0
#!/bin/bash
b735c0
b735c0
# libtool for synfig-core glibtoolize
b735c0
# gettext for autopoint
b735c0
b735c0
# autopoint is not in PATH after install (conflicting with system gettext https://github.com/Homebrew/legacy-homebrew/issues/24070)
b735c0
# so we can do `brew link --force gettext` or just add it to PATH before configuring
b735c0
b735c0
export PATH=/usr/local/opt/gettext/bin:$PATH
b735c0
SCRIPT_PATH=$(cd `dirname "$0"`; pwd)
b735c0
b735c0
MAKE_THREADS=2
b735c0
MAKE_OPTIONS="-j$MAKE_THREADS --silent LIBTOOLFLAGS=--silent"
b735c0
b735c0
set -e
b735c0
b735c0
# enable ccache for speedup
b735c0
enable_ccache()
b735c0
{
b735c0
    if which ccache > /dev/null; then
b735c0
        echo "ccache found! Enabling ccache..."
b735c0
        
b735c0
        # set CC/CXX variables if it is not already
b735c0
        if [ -z $CC ]; then
b735c0
            export CC=gcc
b735c0
        fi
b735c0
        if [ -z $CXX ]; then
b735c0
            export CXX=g++
b735c0
        fi
b735c0
b735c0
        export CC="ccache $CC"
b735c0
        export CXX="ccache $CXX"
b735c0
        echo "CC=$CC"
b735c0
        echo "CXX=$CXX"
b735c0
    else
b735c0
        echo "ccache not found..."
b735c0
    fi
b735c0
}
b735c0
b735c0
travis_fold_start()
b735c0
{
b735c0
	if [ -n "$TRAVIS" ]; then
b735c0
		echo -e "travis_fold:start:$1\033[33;1m$2\033[0m"
b735c0
	fi
b735c0
}
b735c0
b735c0
travis_fold_end()
b735c0
{
b735c0
	if [ -n "$TRAVIS" ]; then
b735c0
		echo -e "\ntravis_fold:end:$1\r"
b735c0
	fi
b735c0
}
b735c0
b735c0
b735c0
151d62
# enable_ccache
b735c0
b735c0
# move to synfig root dir
b735c0
pushd "$SCRIPT_PATH/../../../"
b735c0
b735c0
travis_fold_start ETL "Building ETL"
b735c0
pushd ETL
b735c0
./bootstrap.sh
b735c0
./configure
b735c0
make install $MAKE_OPTIONS
b735c0
popd # ETL
b735c0
travis_fold_end ETL
b735c0
b735c0
travis_fold_start synfig-core "Building synfig-core"
b735c0
pushd synfig-core
b735c0
./bootstrap.sh
b735c0
./configure
b735c0
make install $MAKE_OPTIONS
b735c0
popd # synfig-core
b735c0
travis_fold_end synfig-core
b735c0
b735c0
travis_fold_start synfig-studio "Building Synfig Studio"
b735c0
pushd synfig-studio
b735c0
./bootstrap.sh
b735c0
./configure
b735c0
pushd src # enter src directory to skip image building
b735c0
make install $MAKE_OPTIONS
b735c0
popd #src
b735c0
popd # synfig-studio
b735c0
travis_fold_end synfig-studio
b735c0
b735c0
popd # back to start directory
b735c0
b735c0
b735c0
b735c0
# ============== Helpers ==================
b735c0
b735c0
b735c0
b735c0
# ./bootstrap.sh
b735c0
#PATH=/usr/local/opt/gettext/bin:$PATH ./configure
b735c0
b735c0
#PATH=/usr/local/opt/gettext/bin:$PATH ./configure --prefix=/Users/az/synfig/
b735c0
b735c0
#For compilers to find this software you may need to set:
b735c0
#    LDFLAGS:  -L/usr/local/opt/libffi/lib
b735c0
#For pkg-config to find this software you may need to set:
b735c0
#    PKG_CONFIG_PATH: /usr/local/opt/libffi/lib/pkgconfig
b735c0
b735c0
b735c0
#If you need to have this software first in your PATH run:
b735c0
#  echo 'export PATH="/usr/local/opt/icu4c/bin:$PATH"' >> ~/.bash_profile
b735c0
#  echo 'export PATH="/usr/local/opt/icu4c/sbin:$PATH"' >> ~/.bash_profile
b735c0
b735c0
#For compilers to find this software you may need to set:
b735c0
#    LDFLAGS:  -L/usr/local/opt/icu4c/lib
b735c0
#    CPPFLAGS: -I/usr/local/opt/icu4c/include
b735c0
#For pkg-config to find this software you may need to set:
b735c0
#    PKG_CONFIG_PATH: /usr/local/opt/icu4c/lib/pkgconfig
b735c0
b735c0
#For compilers to find this software you may need to set:
b735c0
#    LDFLAGS:  -L/usr/local/opt/zlib/lib
b735c0
#    CPPFLAGS: -I/usr/local/opt/zlib/include
b735c0
#For pkg-config to find this software you may need to set:
b735c0
#    PKG_CONFIG_PATH: /usr/local/opt/zlib/lib/pkgconfig
b735c0
b735c0
# zlib not checked