these are not the build tools you're looking for
This commit is contained in:
parent
00e994c649
commit
7d41b0e675
|
@ -1,339 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
clean=
|
||||
makespace=
|
||||
parallel=2
|
||||
PREFIX=$HOME/a3/inst
|
||||
this_script_dir="`/usr/bin/dirname \"$0\"`"
|
||||
|
||||
function die () {
|
||||
echo $*
|
||||
exit 1
|
||||
}
|
||||
|
||||
function fetch_as () {
|
||||
if [ -f $1 ] ; then
|
||||
return
|
||||
fi
|
||||
if uname -a | grep --silent arwin ; then
|
||||
curl -L -o $1 $2
|
||||
else
|
||||
wget --no-check-certificate -O $1 $2
|
||||
fi
|
||||
}
|
||||
|
||||
function defmod {
|
||||
if [ $# -ne 4 -a $# -ne 6 -a $# -ne 5 ] ; then
|
||||
echo "Incorrect number of arguments ($#) passed to defmod (5, 6 or 7) for $1"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
name=$1 ; shift
|
||||
|
||||
if [ x$target_mods != x ] ; then
|
||||
if echo $target_mods | grep --silent $name ; then
|
||||
:
|
||||
else
|
||||
echo "Skipping $name ..."
|
||||
return
|
||||
fi
|
||||
fi
|
||||
|
||||
need_unpacked=1
|
||||
|
||||
if [ $# -eq 3 ] ; then
|
||||
eval "MOD_${name}_name=\"$name\""
|
||||
eval "MOD_${name}_version=\"$1\"" ; shift
|
||||
eval "MOD_${name}_source=\"$1\"" ; shift
|
||||
eval "MOD_${name}_compression=\"$1\"" ; shift
|
||||
elif [ $# -eq 4 ] ; then
|
||||
eval "MOD_${name}_name=\"$1\"" ; shift
|
||||
eval "MOD_${name}_version=\"$1\"" ; shift
|
||||
eval "MOD_${name}_source=\"$1\"" ; shift
|
||||
eval "MOD_${name}_compression=\"$1\"" ; shift
|
||||
elif [ $# -eq 5 ] ; then
|
||||
eval "MOD_${name}_name=\"$1\"" ; shift
|
||||
eval "MOD_${name}_version=\"$1\"" ; shift
|
||||
eval "MOD_${name}_source=\"$1\"" ; shift
|
||||
eval "MOD_${name}_compression=\"$1\"" ; shift
|
||||
eval "MOD_${name}_unpacked=\"$1\""; shift
|
||||
need_unpacked=0
|
||||
fi
|
||||
|
||||
eval "if [ x\"\$MOD_${name}_version\" = x ] ; then \
|
||||
MOD_${name}_wholename=\"\$MOD_${name}_name\" ; \
|
||||
else \
|
||||
MOD_${name}_wholename=\"\$MOD_${name}_name-\$MOD_${name}_version\"; \
|
||||
fi"
|
||||
|
||||
if [ $need_unpacked = 1 ] ; then
|
||||
eval "MOD_${name}_unpacked=\$MOD_${name}_wholename"
|
||||
fi
|
||||
|
||||
eval "MOD_${name}_url=\$MOD_${name}_source\$MOD_${name}_wholename.tar.\$MOD_${name}_compression"
|
||||
eval "MOD_${name}_local_tarball=\`basename \$MOD_${name}_url\`"
|
||||
|
||||
MODS="$MODS $name"
|
||||
}
|
||||
|
||||
function built() {
|
||||
m=$1
|
||||
built=1 # false in shell terms
|
||||
|
||||
# if it already unpacked, assume it is built
|
||||
eval "if [ -d \$MOD_${m}_unpacked ] ; then \
|
||||
built=0 ;
|
||||
fi"
|
||||
|
||||
return $built
|
||||
}
|
||||
|
||||
function basic_builder() {
|
||||
m=$1
|
||||
|
||||
if built $m ; then
|
||||
return
|
||||
fi
|
||||
|
||||
# get busy ...
|
||||
eval "tar xf \$MOD_${m}_local_tarball && (cd \$MOD_${m}_unpacked && CFLAGS=\"$GLOBAL_CFLAGS\" LDFLAGS=\"$GLOBAL_LDFLAGS\" ./configure $GLOBAL_CONF && PATH=/usr/bin:$PATH make && make install) || die $m build failed"
|
||||
}
|
||||
|
||||
function waf_builder() {
|
||||
m=$1
|
||||
|
||||
if built $m ; then
|
||||
return;
|
||||
fi
|
||||
eval "tar xf \$MOD_${m}_local_tarball && (cd \$MOD_${m}_unpacked && ./waf configure --prefix=$PREFIX && ./waf build && ./waf install && fix_install_name $PREFIX/lib/lib${m}-0.dylib) || die $m build failed"
|
||||
}
|
||||
|
||||
|
||||
function fix_install_name () {
|
||||
#
|
||||
# this is a temporary hack to deal with the fact that the
|
||||
# version of waf used by the LV2 stack does not correctly
|
||||
# set the install name of those libraries. Once that is
|
||||
# fixed in a release version, this function and its
|
||||
# uses can be removed.
|
||||
#
|
||||
if uname -a | grep --silent arwin ; then
|
||||
install_name_tool -id $1 $1
|
||||
fi
|
||||
}
|
||||
|
||||
while [ $# -gt 0 ] ; do
|
||||
case $1 in
|
||||
--clean*) clean=1 ; shift ;;
|
||||
--prefix*) PREFIX=`echo $1 | sed 's/--prefix=//'` ; shift ;;
|
||||
--space*) makespace=1 ; shift ;;
|
||||
-j*) parallel=`echo $1 | sed 's/-j//'` ; shift ;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ x$clean != x -o x$makespace != x ] ; then
|
||||
if [ ! -d LRDF ] ; then
|
||||
echo "This doesn't appear to be your source directory. Don't run --clean or --space here."
|
||||
exit 1
|
||||
fi
|
||||
# sudo required because of sudo while installing some python/perl stuff
|
||||
sudo rm -rf `find . -maxdepth 1 -type d | grep -v "^.$"`
|
||||
# sudo required because of its use during the python install step
|
||||
if [ $clean ] ; then
|
||||
sudo rm -rf $PREFIX
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# DEFINING MODULES
|
||||
#
|
||||
# 3 possible formats
|
||||
#
|
||||
# NAME VERSION URL_FOR_DOWNLOAD_DIR COMPRESSION_TYPE
|
||||
# NAME PACKAGE_NAME VERSION URL_FOR_DOWNLOAD_DIR COMPRESSION_TYPE
|
||||
# NAME PACKAGE_NAME VERSION URL_FOR_DOWNLOAD_DIR COMPRESSION_TYPE UNPACKED_NAME
|
||||
#
|
||||
# the first form is the most common
|
||||
# the second form is required where the package name includes characters not allowed
|
||||
# in shell variables. here, the first NAME should define a legal shell variable name
|
||||
# the third form is required for libraries like boost whose packaging and naming is totally inconsistent
|
||||
# with normal practice
|
||||
#
|
||||
|
||||
defmod boost boost_1_49_0 '' http://sourceforge.net/projects/boost/files/boost/1.49.0/ bz2 boost_1_49_0
|
||||
defmod fftw 3.3.1 http://www.fftw.org/ gz
|
||||
defmod glibmm 2.32.0 http://ftp.gnome.org/pub/GNOME/sources/glibmm/2.32/ xz
|
||||
defmod cairomm 1.10.0 http://cairographics.org/releases/ gz
|
||||
defmod pangomm 2.28.4 http://ftp.acc.umu.se/pub/gnome/sources/pangomm/2.28/ xz
|
||||
defmod atkmm 2.22.6 http://ftp.gnome.org/pub/GNOME/sources/atkmm/2.22/ xz
|
||||
defmod gtkmm 2.24.2 http://ftp.acc.umu.se/pub/GNOME/sources/gtkmm/2.24/ xz
|
||||
defmod libart_lgpl 2.3.21 http://ftp.gnome.org/pub/gnome/sources/libart_lgpl/2.3/ bz2
|
||||
defmod libgnomecanvasmm 2.26.0 http://ftp.acc.umu.se/pub/GNOME/sources/libgnomecanvasmm/2.26/ bz2
|
||||
defmod liblo 0.26 http://downloads.sourceforge.net/liblo/ gz
|
||||
defmod raptor2 2.0.6 http://download.librdf.org/source/ gz
|
||||
defmod rasqal 0.9.28 http://download.librdf.org/source/ gz
|
||||
defmod redland 1.0.15 http://download.librdf.org/source/ gz
|
||||
defmod libogg 1.3.0 http://downloads.xiph.org/releases/ogg/ xz
|
||||
defmod flac 1.2.1 http://downloads.xiph.org/releases/flac/ gz
|
||||
defmod libvorbis 1.3.2 http://downloads.xiph.org/releases/vorbis/ bz2
|
||||
defmod libsamplerate 0.1.8 http://www.mega-nerd.com/SRC/ gz
|
||||
defmod aubio 0.3.2 http://aubio.org/pub/ gz
|
||||
defmod rdflib 3.2.0 http://rdflib.googlecode.com/files/ gz
|
||||
defmod setuptools 0.6c11 http://pypi.python.org/packages/source/s/setuptools/ gz
|
||||
defmod isodate 0.4.0 http://pypi.python.org/packages/source/i/isodate/ gz
|
||||
defmod pcre 8.32 http://downloads.sourceforge.net/project/pcre/pcre/8.32/ bz2
|
||||
defmod lv2 1.2.0 http://lv2plug.in/spec/ bz2
|
||||
defmod serd 0.18.2 http://download.drobilla.net/ bz2
|
||||
defmod sord 0.12.0 http://download.drobilla.net/ bz2
|
||||
defmod sratom 0.4.2 http://download.drobilla.net/ bz2
|
||||
defmod lilv 0.16.0 http://download.drobilla.net/ bz2
|
||||
defmod suil 0.6.10 http://download.drobilla.net/ bz2
|
||||
defmod curl 7.25.0 http://curl.haxx.se/download/ bz2
|
||||
if [ x$OSX = x ] ; then
|
||||
defmod util_linux util-linux 2.21 http://www.kernel.org/pub/linux/utils/util-linux/v2.21/ xz
|
||||
fi
|
||||
|
||||
# modified sources downloaded from ardour.org
|
||||
|
||||
defmod libsigcpp libsigc++ 2.2.10 http://ardour.org/files/deps/ bz2
|
||||
defmod libgnomecanvas 2.30.3 http://ardour.org/files/deps/ gz
|
||||
defmod libsndfile 1.0.25 http://ardour.org/files/deps/ gz
|
||||
|
||||
|
||||
mkdir -p $PREFIX
|
||||
|
||||
export MAKEFLAGS=-j$parallel
|
||||
PATH=$PREFIX/bin:$PATH
|
||||
|
||||
OSX=
|
||||
|
||||
if uname -a | grep --silent arwin ; then
|
||||
|
||||
# its OS X! run for the hills !!
|
||||
|
||||
OSX=y
|
||||
|
||||
# tell perl to look in our $PREFIX tree for additional perl modules
|
||||
export PERL5LIB=$PREFIX/System/Library/Perl/$PERLVERSION
|
||||
|
||||
export DYLD_FALLBACK_LIBRARY_PATH=$PREFIX/lib${DYLD_FALLBACK_LIBRARY_PATH:+:$DYLD_FALLBACK_LIBRARY_PATH}
|
||||
# force compilation to use 10.4 APIs only. could be overkill, but better safe than sorry
|
||||
GLOBAL_CFLAGS="-DMAC_OSX_VERSION_MAX_ALLOWED=1040 -mmacosx-version-min=10.4 -O3"
|
||||
# for 10.5 and above, add to CFLAGS
|
||||
# -sysroot=/Developer/SDKs/MacOSX10.4u.sdk"
|
||||
GLOBAL_LDFLAGS="-headerpad_max_install_names"
|
||||
# for 10.5 and above, add to LDFLAGS
|
||||
# "-syslibroot /Developer/SDKs/MacOSX10.4u.sdk"
|
||||
export MACOSX_DEPLOYMENT_TARGET=10.4
|
||||
else
|
||||
export LD_LIBRARY_PATH=$PREFIX/lib{$LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
|
||||
GLOBAL_CFLAGS=
|
||||
GLOBAL_LDFLAGS=
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}
|
||||
GLOBAL_CONF="--prefix=$PREFIX"
|
||||
|
||||
if [ ! -d LRDF ] ; then
|
||||
echo LRDF
|
||||
git clone git://github.com/swh/LRDF.git
|
||||
fi
|
||||
|
||||
for m in $MODS ; do
|
||||
eval "fetch_as \$MOD_${m}_local_tarball \$MOD_${m}_url || die \"downloading $m failed\""
|
||||
done
|
||||
|
||||
if [ x$OSX = x ] ; then
|
||||
tar xf $MOD_util_linux_local_tarball && \
|
||||
(set -e && cd $MOD_util_linux_unpacked && ./configure --prefix=$PREFIX --enable-shared --disable-most-builds --without-ncurses --enable-libuuid && cd libuuid && make && make install) || die "uuid build failed"
|
||||
fi
|
||||
|
||||
tar xf $MOD_boost_local_tarball && \
|
||||
(set -e && cd $MOD_boost_unpacked && ./bootstrap.sh --prefix=$PREFIX --with-libraries=exception && ./b2 && ./b2 install) || die "boost build failed"
|
||||
|
||||
basic_builder curl
|
||||
|
||||
tar xf $MOD_fftw_local_tarball && \
|
||||
(set -e && cd $MOD_fftw_unpacked && ./configure --prefix=$PREFIX --enable-shared && make && make install && make clean && ./configure --prefix=$PREFIX --enable-shared --enable-single && make && make install) || die "fftw build failed"
|
||||
|
||||
basic_builder libsigcpp
|
||||
basic_builder glibmm
|
||||
basic_builder cairomm
|
||||
basic_builder pangomm
|
||||
basic_builder atkmm
|
||||
basic_builder gtkmm
|
||||
basic_builder libart_lgpl
|
||||
basic_builder libgnomecanvas
|
||||
basic_builder libgnomecanvasmm
|
||||
basic_builder liblo
|
||||
basic_builder raptor2
|
||||
basic_builder rasqal
|
||||
basic_builder redland
|
||||
basic_builder libogg
|
||||
|
||||
# FLAC will not build correctly on OS X Lion with asm optimization enabled, so lets at least force SSE
|
||||
if [ x$OSX != x ] ; then
|
||||
tar xf $MOD_flac_local_tarball && \
|
||||
(set -e && cd $MOD_flac_unpacked && CXXFLAGS="$GLOBAL_CFLAGS" CFLAGS="$GLOBAL_CFLAGS" LDFLAGS="$GLOBAL_LDFLAGS" ./configure --prefix=$PREFIX --disable-cpplibs --disable-asm-optimizations --enable-sse --disable-debug && make && make install) || die "flac build failed"
|
||||
else
|
||||
tar xf $MOD_flac_local_tarball && \
|
||||
(set -e && cd $MOD_flac_unpacked && CXXFLAGS="$GLOBAL_CFLAGS" CFLAGS="$GLOBAL_CFLAGS" LDFLAGS="$GLOBAL_LDFLAGS" ./configure --prefix=$PREFIX --disable-cpplibs --disable-debug && make && make install) || die "flac build failed"
|
||||
fi
|
||||
|
||||
basic_builder libvorbis
|
||||
|
||||
if [ x$OSX != x ] ; then
|
||||
# sndfile-play incorrectly includes <Carbon.h> which no longer works on Lion
|
||||
tar xf $MOD_libsndfile_local_tarball && \
|
||||
(set -e && cd $MOD_libsndfile_unpacked && CFLAGS="$GLOBAL_CFLAGS -I/System/Library/Frameworks/Carbon.framework/Headers" LDFLAGS="$GLOBAL_LDFLAGS" ./configure --prefix=$PREFIX --disable-silent-rules && make && make install) || die "sndfile build failed"
|
||||
# samplerate incorrectly includes <Carbon.h> which no longer works on Lion
|
||||
tar xf $MOD_libsamplerate_local_tarball && \
|
||||
(set -e && cd $MOD_libsamplerate_unpacked && CFLAGS="$GLOBAL_CFLAGS -I/System/Library/Frameworks/Carbon.framework/Headers" LDFLAGS="$GLOBAL_LDFLAGS" ./configure --prefix=$PREFIX && make && make install) || die "samplerate build failed"
|
||||
else
|
||||
basic_builder libsndfile
|
||||
basic_builder libsamplerate
|
||||
fi
|
||||
|
||||
# aubio has an old version of install.sh which can exit with an error during parallel make install
|
||||
# it also doesn't use pkg-config to test for FFTW3, sigh.
|
||||
remove_fftw3_h=
|
||||
if [ ! -f /usr/include/fftw3.h ] ; then
|
||||
remove_fftw3_h=y
|
||||
sudo ln -s $PREFIX/include/fftw3.h /usr/include
|
||||
fi
|
||||
tar xf $MOD_aubio_local_tarball &&
|
||||
(set -e && cd $MOD_aubio_unpacked && sed '/no-long-double/d' < ./configure > ./configure.XXX && mv ./configure.XXX ./configure && chmod +x ./configure && \
|
||||
CFLAGS="$GLOBAL_CFLAGS -I$PREFIX" LDFLAGS="$GLOBAL_LDFLAGS -lm" ./configure --prefix=$PREFIX && make && MAKEFLAGS=-j1 make install) || die "aubio build failed"
|
||||
if [ x$remove_fftw3_h != x ] ; then
|
||||
sudo rm /usr/include/fftw3.h
|
||||
fi
|
||||
|
||||
# these python lib wants to install to a system-wide location
|
||||
tar xf $MOD_rdflib_local_tarball && \
|
||||
(set -e && cd $MOD_rdflib_unpacked && unset MACOSX_DEPLOYMENT_TARGET && python ./setup.py build && sudo python ./setup.py install)
|
||||
tar xf $MOD_setuptools_local_tarball && \
|
||||
(set -e && cd $MOD_setuptools_unpacked && unset MACOSX_DEPLOYMENT_TARGET && python ./setup.py build && sudo python ./setup.py install)
|
||||
tar xf $MOD_isodate_local_tarball && \
|
||||
(set -e && cd $MOD_isodate_unpacked && unset MACOSX_DEPLOYMENT_TARGET && python ./setup.py build && sudo python ./setup.py install)
|
||||
|
||||
(set -e && cd LRDF && \
|
||||
sed 's/glibtoolize/libtoolize/g' < autogen.sh > ag.sh && mv ag.sh autogen.sh && \
|
||||
CFLAGS="$GLOBAL_CFLAGS -I$PREFIX/include" LDFLAGS="$GLOBAL_LDFLAGS" sh ./autogen.sh --prefix=$PREFIX && make && make install) || die "LRDF build failed"
|
||||
|
||||
basic_builder pcre
|
||||
|
||||
tar xf $MOD_lv2_local_tarball && \
|
||||
(set -e && cd $MOD_lv2_unpacked && unset MACOSX_DEPLOYMENT_TARGET && ./waf configure --prefix=$PREFIX --copy-headers && ./waf build && sudo ./waf install) || die "LV2 build failed"
|
||||
|
||||
waf_builder serd
|
||||
waf_builder sord
|
||||
waf_builder sratom
|
||||
|
||||
tar xf $MOD_lilv_local_tarball && \
|
||||
(set -e && cd $MOD_lilv_unpacked && ./waf configure --prefix=$PREFIX --default-lv2-path='~/.lv2:/usr/local/lib/lv2:/usr/local/lib64/lv2:/usr/lib/lv2:/usr/lib64/lv2' && ./waf build && ./waf install && fix_install_name $PREFIX/lib/liblilv-0.dylib) || die "lilv build failed"
|
||||
|
||||
tar xf $MOD_suil_local_tarball && \
|
||||
(set -e && cd $MOD_suil_unpacked && CFLAGS="-I$PREFIX/include" ./waf configure --prefix=$PREFIX && ./waf && ./waf install && fix_install_name $PREFIX/lib/libsuil-0.dylib) || die "suil build failed"
|
||||
|
|
@ -1,512 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
#
|
||||
# THIS SCRIPT EXISTS FOR THE PURPOSE OF BUILDING THE ENTIRE GTK STACK UP UPON WHICH ARDOUR DEPENDS
|
||||
#
|
||||
# Its use is not documented, and it is not intended to be used or useful to anyone attempting to build
|
||||
# Ardour.
|
||||
#
|
||||
# The requirements for building Ardour are made clear in the documentation on building available
|
||||
# via http://ardour.org/development. Once your system satisfies those requirements, you can build ardour
|
||||
# using the instructions documented online. This script happens to be usable to satisfy those requirements,
|
||||
# but there are other approaches that you can and probably should use to do so.
|
||||
#
|
||||
|
||||
clean=
|
||||
makespace=
|
||||
parallel=2
|
||||
patch_gtk_osx=
|
||||
PREFIX=$HOME/gtk/inst
|
||||
unpatch=
|
||||
this_script_dir="`/usr/bin/dirname \"$0\"`"
|
||||
target_mods=
|
||||
|
||||
function die () {
|
||||
echo $*
|
||||
exit 1
|
||||
}
|
||||
|
||||
function fetch_as () {
|
||||
if [ -f $1 ] ; then
|
||||
return
|
||||
fi
|
||||
if uname -a | grep --silent arwin ; then
|
||||
curl -L -o $1 $2
|
||||
else
|
||||
wget --no-check-certificate -O $1 $2
|
||||
fi
|
||||
}
|
||||
|
||||
function defmod {
|
||||
if [ $# -ne 4 -a $# -ne 6 -a $# -ne 5 ] ; then
|
||||
echo "Incorrect number of arguments ($#) passed to defmod (5, 6 or 7) for $1"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
name=$1 ; shift
|
||||
|
||||
if [ x$target_mods != x ] ; then
|
||||
if echo $target_mods | grep --silent $name ; then
|
||||
:
|
||||
else
|
||||
echo "Skipping $name ..."
|
||||
return
|
||||
fi
|
||||
fi
|
||||
|
||||
need_unpacked=1
|
||||
|
||||
if [ $# -eq 3 ] ; then
|
||||
eval "MOD_${name}_name=\"$name\""
|
||||
eval "MOD_${name}_version=\"$1\"" ; shift
|
||||
eval "MOD_${name}_source=\"$1\"" ; shift
|
||||
eval "MOD_${name}_compression=\"$1\"" ; shift
|
||||
elif [ $# -eq 4 ] ; then
|
||||
eval "MOD_${name}_name=\"$1\"" ; shift
|
||||
eval "MOD_${name}_version=\"$1\"" ; shift
|
||||
eval "MOD_${name}_source=\"$1\"" ; shift
|
||||
eval "MOD_${name}_compression=\"$1\"" ; shift
|
||||
elif [ $# -eq 5 ] ; then
|
||||
eval "MOD_${name}_name=\"$1\"" ; shift
|
||||
eval "MOD_${name}_version=\"$1\"" ; shift
|
||||
eval "MOD_${name}_source=\"$1\"" ; shift
|
||||
eval "MOD_${name}_compression=\"$1\"" ; shift
|
||||
eval "MOD_${name}_unpacked=\"$1\""; shift
|
||||
need_unpacked=0
|
||||
fi
|
||||
|
||||
eval "if [ x\"\$MOD_${name}_version\" = x ] ; then \
|
||||
MOD_${name}_wholename=\"\$MOD_${name}_name\" ; \
|
||||
else \
|
||||
MOD_${name}_wholename=\"\$MOD_${name}_name-\$MOD_${name}_version\"; \
|
||||
fi"
|
||||
|
||||
if [ $need_unpacked = 1 ] ; then
|
||||
eval "MOD_${name}_unpacked=\$MOD_${name}_wholename"
|
||||
fi
|
||||
|
||||
eval "MOD_${name}_url=\$MOD_${name}_source\$MOD_${name}_wholename.tar.\$MOD_${name}_compression"
|
||||
eval "MOD_${name}_local_tarball=\`basename \$MOD_${name}_url\`"
|
||||
|
||||
MODS="$MODS $name"
|
||||
}
|
||||
|
||||
function built() {
|
||||
m=$1
|
||||
built=1 # false in shell terms
|
||||
|
||||
# if it already unpacked, assume it is built
|
||||
eval "if [ -d \$MOD_${m}_unpacked ] ; then \
|
||||
built=0 ;
|
||||
fi"
|
||||
|
||||
return $built
|
||||
}
|
||||
|
||||
function basic_builder() {
|
||||
m=$1
|
||||
|
||||
if built $m ; then
|
||||
return
|
||||
fi
|
||||
|
||||
# get busy ...
|
||||
eval "tar xf \$MOD_${m}_local_tarball && (cd \$MOD_${m}_unpacked && CFLAGS=\"$GLOBAL_CFLAGS\" LDFLAGS=\"$GLOBAL_LDFLAGS\" ./configure $GLOBAL_CONF && PATH=/usr/bin:$PATH make && make install) || die $m build failed"
|
||||
}
|
||||
|
||||
while [ $# -gt 0 ] ; do
|
||||
case $1 in
|
||||
--clean*) clean=1 ; shift ;;
|
||||
--space*) makespace=1 ; shift ;;
|
||||
--prefix*) PREFIX=`echo $1 | sed 's/--prefix=//'` ; shift ;;
|
||||
--patch*) patch=1 ; shift ;;
|
||||
--unpatch*) patch=1 ; unpatch=-R; shift ;;
|
||||
--target) target_mods="$target_mods $1"; shift ;;
|
||||
-j*) parallel=`echo $1 | sed 's/-j//'` ; shift ;;
|
||||
*) echo "Unknown argument $1" ; exit 1 ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# DEFINING MODULES
|
||||
#
|
||||
# 3 possible formats
|
||||
#
|
||||
# NAME VERSION URL_FOR_DOWNLOAD_DIR COMPRESSION_TYPE
|
||||
# NAME PACKAGE_NAME VERSION URL_FOR_DOWNLOAD_DIR COMPRESSION_TYPE
|
||||
# NAME PACKAGE_NAME VERSION URL_FOR_DOWNLOAD_DIR COMPRESSION_TYPE UNPACKED_NAME
|
||||
#
|
||||
# the first form is the most common
|
||||
# the second form is required where the package name includes characters not allowed
|
||||
# in shell variables. here, the first NAME should define a legal shell variable name
|
||||
# the third form is required for libjpeg whose packaging and naming is totally inconsistent
|
||||
# with normal practice
|
||||
#
|
||||
defmod 'xz' '5.0.3' "http://tukaani.org/xz/" 'bz2'
|
||||
defmod 'tar' '1.26' "http://ftp.gnu.org/gnu/tar/" 'bz2'
|
||||
defmod 'm4' '1.4.16' "http://ftp.gnu.org/gnu/m4/" 'bz2'
|
||||
defmod 'autoconf' '2.68' "http://ftp.gnu.org/gnu/autoconf/" 'bz2'
|
||||
defmod 'automake' '1.11.3' "http://ftp.gnu.org/gnu/automake/" 'gz'
|
||||
defmod 'libtool' '2.4.2' 'http://ftp.gnu.org/gnu/libtool/' 'gz'
|
||||
defmod 'make' '3.82' 'http://ftp.gnu.org/gnu/make/' 'bz2'
|
||||
defmod 'flex' '2.5.35' 'http://prdownloads.sourceforge.net/flex/' 'gz'
|
||||
defmod 'bison' '2.5' 'ftp://ftp.gnu.org/gnu/bison/' 'bz2'
|
||||
defmod 'glib' '2.32.2' 'http://ftp.gnome.org/pub/gnome/sources/glib/2.32/' 'xz'
|
||||
defmod 'pkgconfig' 'pkg-config' '0.26' 'http://pkgconfig.freedesktop.org/releases/' 'gz'
|
||||
defmod 'readline' '6.2' 'ftp://ftp.cwru.edu/pub/bash/' 'gz'
|
||||
defmod 'zlib' '1.2.7' 'http://zlib.net/' 'bz2'
|
||||
defmod 'libiconv' '1.14' 'ftp://ftp.gnu.org/gnu/libiconv/' 'gz'
|
||||
defmod 'gettext' '0.18.1.1' 'http://ftp.gnu.org/pub/gnu/gettext/' 'gz'
|
||||
defmod 'expat' '2.1.0' 'http://prdownloads.sourceforge.net/expat/' 'gz'
|
||||
defmod 'libxml2' '2.7.8' 'ftp://xmlsoft.org/libxslt/' 'gz'
|
||||
defmod 'libxslt' '1.1.28' 'ftp://xmlsoft.org/libxslt/' 'gz'
|
||||
defmod 'tiff' '4.0.1' 'ftp://ftp.remotesensing.org/pub/libtiff/' 'gz'
|
||||
defmod 'libpng' '1.6.0' 'ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng16/' 'xz'
|
||||
defmod 'jpeg' 'jpegsrc.v8d' '' 'http://www.ijg.org/files/' 'gz' 'jpeg-8d'
|
||||
defmod 'makemaker' 'ExtUtils-MakeMaker' '6.64' 'http://search.cpan.org/CPAN/authors/id/M/MS/MSCHWERN/' 'gz'
|
||||
defmod 'xmlparser' 'XML-Parser' '2.41' 'http://search.cpan.org/CPAN/authors/id/T/TO/TODDR/' 'gz'
|
||||
defmod 'xmlsimple' 'XML-Simple' '2.20' 'http://search.cpan.org/CPAN/authors/id/G/GR/GRANTM/' 'gz'
|
||||
defmod 'atk' '2.2.0' 'http://ftp.gnome.org/pub/GNOME/sources/atk/2.2/' 'bz2'
|
||||
defmod 'gnomecommon' 'gnome-common' '2.34.0' 'http://ftp.acc.umu.se/pub/gnome/sources/gnome-common/2.34/' 'bz2'
|
||||
defmod 'gtkdoc' 'gtk-doc' '1.18' 'http://ftp.gnome.org/pub/GNOME/sources/gtk-doc/1.18/' 'bz2'
|
||||
defmod 'gnomedocutils' 'gnome-doc-utils' '0.20.6' 'http://ftp.acc.umu.se/pub/gnome/sources/gnome-doc-utils/0.20/' 'bz2'
|
||||
defmod 'pixman' '0.28.2' 'http://cgit.freedesktop.org/pixman/snapshot/' 'gz'
|
||||
defmod 'libffi' '3.0.10' 'ftp://sourceware.org/pub/libffi/' 'gz'
|
||||
defmod 'freetype' '2.4.9' 'http://downloads.sourceforge.net/project/freetype/freetype2/2.4.9/' 'bz2'
|
||||
defmod 'fontconfig' '2.8.0' 'http://www.freedesktop.org/software/fontconfig/release/' 'gz'
|
||||
defmod 'cairo' '1.12.8' 'http://cairographics.org/releases/' 'xz'
|
||||
defmod 'pango' '1.29.5' 'http://ftp.gnome.org/pub/GNOME/sources/pango/1.29/' 'bz2'
|
||||
defmod 'gdkpixbuf' 'gdk-pixbuf' '2.25.0' 'http://ftp.gnome.org/pub/GNOME/sources/gdk-pixbuf/2.25/' 'xz'
|
||||
defmod 'intltool' '0.50.2' 'http://launchpad.net/intltool/trunk/0.50.2/+download/' 'gz'
|
||||
defmod 'gtkosxdocbook' 'gtk-osx-docbook' '1.0' 'http://downloads.sourceforge.net/project/gtk-osx/GTK-OSX%20Build/' 'gz'
|
||||
defmod 'gobjectintrospection' 'gobject-introspection' '1.31.10' 'http://ftp.gnome.org/pub/GNOME/sources/gobject-introspection/1.31/' 'xz'
|
||||
defmod 'gtkengines' 'gtk-engines' '2.21.0' 'http://ardour.org/files/' 'gz'
|
||||
|
||||
# modified source : fetch tarballs from ardour.org
|
||||
|
||||
defmod gtk gtk+ '2.24.18' http://ardour.org/files/deps/ bz2
|
||||
|
||||
if [ x$clean != x -o x$makespace != x ] ; then
|
||||
#
|
||||
# bison 2.5 is just used here because its unlikely to occur in
|
||||
# a random non-source directory
|
||||
#
|
||||
if [ ! -d bison-2.5 ] ; then
|
||||
echo "This doesn't appear to be your source directory. Don't run --clean or --space here."
|
||||
exit 1
|
||||
fi
|
||||
rm -rf `find . -maxdepth 1 -type d | grep -v -e "^.$"`
|
||||
if [ $clean ] ; then
|
||||
rm -rf $PREFIX
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
|
||||
mkdir -p $PREFIX
|
||||
|
||||
export MAKEFLAGS=-j$parallel
|
||||
PATH=$PREFIX/bin:$PATH
|
||||
|
||||
#
|
||||
# Check Perl
|
||||
#
|
||||
|
||||
PERLVERSION=`perl -e 'printf "%vd\n", $^V;'`
|
||||
|
||||
#
|
||||
# Check Python presence
|
||||
#
|
||||
|
||||
PYVERS=`python --version 2>&1 | cut -d ' ' -f 2 | cut -b 1-3`
|
||||
export PYTHONPATH=$PREFIX/lib/python${PYVERS}/site-packages/:${PYTHONPATH:+:$PYTHONPATH}
|
||||
|
||||
if python --version 2>&1 | egrep --silent '(2\.7|2\.6)' ; then
|
||||
:
|
||||
else
|
||||
echo "You need at least Python 2.6 to run this script"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
pythondir=`dirname $(which python)`
|
||||
if [ $pythondir != "/usr/bin" ] ; then
|
||||
PYTHONPREFIX=`dirname $pythondir`
|
||||
fi
|
||||
|
||||
OSX=
|
||||
|
||||
if uname -a | grep --silent arwin ; then
|
||||
|
||||
# its OS X! run for the hills !!
|
||||
|
||||
OSX=1
|
||||
|
||||
# tell perl to look in our $PREFIX tree for additional perl modules
|
||||
export PERL5LIB=$PREFIX/System/Library/Perl/$PERLVERSION
|
||||
|
||||
export DYLD_FALLBACK_LIBRARY_PATH=$PREFIX/lib${DYLD_FALLBACK_LIBRARY_PATH:+:$DYLD_FALLBACK_LIBRARY_PATH}
|
||||
# force compilation to use 10.4 APIs only. could be overkill, but better safe than sorry
|
||||
GLOBAL_CFLAGS="-DMAC_OSX_VERSION_MAX_ALLOWED=1040 -mmacosx-version-min=10.4 -O3"
|
||||
# for 10.5 and above, add to CFLAGS
|
||||
# -sysroot=/Developer/SDKs/MacOSX10.4u.sdk"
|
||||
GLOBAL_LDFLAGS="-headerpad_max_install_names"
|
||||
# for 10.5 and above, add to LDFLAGS
|
||||
# "-syslibroot /Developer/SDKs/MacOSX10.4u.sdk"
|
||||
export MACOSX_DEPLOYMENT_TARGET=10.4
|
||||
|
||||
CAIRO_CONF="--enable-xlib=no --enable-quartz=yes --enable-xcb=no"
|
||||
PANGO_CONF="--without-x"
|
||||
GTK_BACKEND=quartz
|
||||
AVOID_ICONV=
|
||||
explicit_intl=yes
|
||||
|
||||
else
|
||||
|
||||
# tell perl to look in our $PREFIX tree for additional perl modules
|
||||
# Some idiotic Perl modules install into MAJOR.MINOR rather than MAJOR.MINOR.MICRO
|
||||
PERL_STUPIDVERSION=`echo $PERLVERSION | sed 's/\.[0-9][0-9]*$//'`
|
||||
export PERL5LIB=$PREFIX/lib/perl/$PERLVERSION:$PREFIX/lib/perl/$PERL_STUPIDVERSION:$PREFIX/share/perl/$PERLVERSION:$PREFIX/share/perl/$PERL_STUPIDVERSION
|
||||
|
||||
export LD_LIBRARY_PATH=$PREFIX/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
|
||||
GLOBAL_CFLAGS=
|
||||
GLOBAL_LDFLAGS=
|
||||
CAIRO_CONF=
|
||||
PANGO_CONF=
|
||||
GTK_BACKEND=x11
|
||||
AVOID_ICONV="--with-libiconv=no"
|
||||
|
||||
# normal linux platforms won't need this
|
||||
explicit_intl=
|
||||
|
||||
# this is very crude versioning test
|
||||
python --version >/dev/null 2>&1
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "There's a problem with your Python installation"x
|
||||
exit 1
|
||||
fi
|
||||
if python --version | grep --silent '2\.7' ; then
|
||||
echo "You do not have a new enough version of Python"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig
|
||||
GLOBAL_CONF="--prefix=$PREFIX"
|
||||
|
||||
for m in $MODS ; do
|
||||
eval "fetch_as \$MOD_${m}_local_tarball \$MOD_${m}_url || die \"downloading $m failed\""
|
||||
done
|
||||
|
||||
if [ x$patch != x ] ; then
|
||||
|
||||
cd gtk+
|
||||
echo "Testing ($unpatch) patches ... "
|
||||
|
||||
# if uname -a | grep --silent arwin ; then
|
||||
patches=`ls $this_script_dir/current-gtk-patches/*.patch`
|
||||
# else
|
||||
# patches="$this_script_dir/current-gtk-patches/gtkrelocation.patch"
|
||||
# fi
|
||||
|
||||
for patch in $patches ; do
|
||||
if patch $unpatch --dry-run -p1 < "$patch" ; then
|
||||
:
|
||||
else
|
||||
echo "$? : Patch $patch no longer applies ($unpatch) cleanly."
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Applying ($unpatch) patches ..."
|
||||
for patch in $patches ; do
|
||||
patch $unpatch -p1 < "$patch"
|
||||
done
|
||||
exit 0
|
||||
fi
|
||||
|
||||
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig
|
||||
|
||||
#
|
||||
# until we've got a new version of tar, we need to specify the compression type, which is a PITA
|
||||
#
|
||||
|
||||
tar jxf $MOD_xz_local_tarball && (cd $MOD_xz_unpacked && LDFLAGS="-L$PREFIX/lib" CFLAGS="-I$PREFIX/include" ./configure $GLOBAL_CONF && make && make install) || die "xz build failed"
|
||||
tar jxf $MOD_tar_local_tarball && (cd $MOD_tar_unpacked && LDFLAGS="-L$PREFIX/lib" CFLAGS="-I$PREFIX/include" ./configure $GLOBAL_CONF && make && make install) || die "tar build failed"
|
||||
|
||||
# make sure we pick up the new version of tar that we just installed into $PREFIX
|
||||
hash tar
|
||||
|
||||
basic_builder m4
|
||||
basic_builder make
|
||||
|
||||
tar xf $MOD_zlib_local_tarball && (cd $MOD_zlib_unpacked && CFLAGS=$GLOBAL_CFLAGS LDFLAGS="$GLOBAL_LDFLAGS" ./configure $GLOBAL_CONF && PATH=/usr/bin:$PATH make && make install) || die "zlib build failed"
|
||||
|
||||
basic_builder autoconf
|
||||
basic_builder automake
|
||||
basic_builder libtool
|
||||
basic_builder make
|
||||
basic_builder flex
|
||||
basic_builder bison
|
||||
basic_builder expat
|
||||
|
||||
#
|
||||
# libxml2 will fail to build python modules if Python is not a system install, so we need to supply --with-python in that case
|
||||
#
|
||||
|
||||
if [ x$PYTHONPREFIX != x ] ; then
|
||||
WITHPYTHON=--with-python=$PYTHONPREFIX
|
||||
fi
|
||||
|
||||
tar xf $MOD_libxml2_local_tarball && (cd $MOD_libxml2_unpacked && CFLAGS=$GLOBAL_CFLAGS LDFLAGS="$GLOBAL_LDFLAGS" ./configure $GLOBAL_CONF $WITHPYTHON --with-zlib=$PREFIX && make && make install) || die "libxml2 build failed"
|
||||
|
||||
basic_builder libxslt
|
||||
|
||||
# hackety-frakkin-hack ....
|
||||
# we need to force xsltproc to never rely on network access during this build, so we have to hack up
|
||||
# a script to do this
|
||||
if ! file $PREFIX/bin/xsltproc | grep --silent "POSIX shell script"; then
|
||||
mv $PREFIX/bin/xsltproc $PREFIX/bin/xsltproc.bin
|
||||
cat <<EOF >$PREFIX/bin/xsltproc
|
||||
#!/bin/sh
|
||||
exec xsltproc.bin --nonet "\$@"
|
||||
EOF
|
||||
chmod a+x $PREFIX/bin/xsltproc
|
||||
fi
|
||||
#
|
||||
# now returning you to some semblance of sanity ...
|
||||
#
|
||||
|
||||
basic_builder readline
|
||||
|
||||
#
|
||||
# Only build i18n libs on OS X
|
||||
# This really needs to be a test for glibc with libintl builtin
|
||||
#
|
||||
if [ x$explicit_intl != x ] ; then
|
||||
basic_builder libiconv
|
||||
tar xf $MOD_gettext_local_tarball && (cd $MOD_gettext_unpacked && CFLAGS=$GLOBAL_CFLAGS LDFLAGS="$GLOBAL_LDFLAGS" ./configure --with-included-gettext --with-libiconv-prefix=$PREFIX --enable-shared $GLOBAL_CONF && make && make install) || die "gettext build failed"
|
||||
fi
|
||||
|
||||
basic_builder intltool
|
||||
|
||||
if [ x$OSX != x ] ; then
|
||||
tar xf $MOD_tiff_local_tarball && (cd $MOD_tiff_unpacked && CFLAGS="$GLOBAL_CFLAGS -DHAVE_APPLE_OPENGL_FRAMEWORK" LDFLAGS="$GLOBAL_LDFLAGS" ./configure $GLOBAL_CONF && make && make install) || die "tiff build failed"
|
||||
else
|
||||
basic_builder tiff
|
||||
fi
|
||||
|
||||
basic_builder libpng
|
||||
basic_builder jpeg
|
||||
|
||||
#tar xf $MOD_makemaker_local_tarball && (cd $MOD_makemaker_unpacked && unset MACOSX_DEPLOYMENT_TARGET && perl Makefile.PL PREFIX=$PREFIX && make && make install) || die "ExtUtils::MakeMaker build failed"
|
||||
#tar xf $MOD_xmlparser_local_tarball && (cd $MOD_xmlparser_unpacked && unset MACOSX_DEPLOYMENT_TARGET && perl Makefile.PL EXPATINCPATH=$PREFIX/include EXPATLIBPATH=$PREFIX/lib PREFIX=$PREFIX && make && make install) || die "XML-Parser build failed"
|
||||
#tar xf $MOD_xmlsimple_local_tarball && (cd $MOD_xmlsimple_unpacked && unset MACOSX_DEPLOYMENT_TARGET && perl Makefile.PL PREFIX=$PREFIX && make && make install) || die "XML-Simple build failed"
|
||||
|
||||
if uname -a | grep --silent arwin ; then
|
||||
#
|
||||
# libffi has a bug that is caused by it depending on the output format of GNU wc(1)
|
||||
# it can be avoided by changing into the target build directory, re-running configure and then running make from there.
|
||||
# the target dir gets built by the first invocation of configure, and is the newest dir, so we find its name with ls and awk.
|
||||
#
|
||||
tar xf $MOD_libffi_local_tarball && (cd $MOD_libffi_unpacked && CFLAGS=$GLOBAL_CFLAGS LDFLAGS="$GLOBAL_LDFLAGS" ./configure $GLOBAL_CONF && cd `ls -ltd * | awk '/^d/ {print $9; exit}'` && CFLAGS=$GLOBAL_CFLAGS LDFLAGS="$GLOBAL_LDFLAGS" ../configure $GLOBAL_CONF && make && make install) || die "libffi build failed"
|
||||
else
|
||||
basic_builder libffi
|
||||
fi
|
||||
# time to bootstrap the circular dependency between pkg-config and glib.
|
||||
#
|
||||
# step one: build glib with everything specified so that pkg-config is not used or required
|
||||
#
|
||||
tar xf $MOD_glib_local_tarball \
|
||||
&& (cd $MOD_glib_unpacked && LDFLAGS=-L$PREFIX/lib CFLAGS=-I$PREFIX/include ZLIB_CFLAGS=-I$PREFIX/include ZLIB_LIBS="-L$PREFIX/lib -lz" LIBFFI_CFLAGS=-I$PREFIX/lib/libffi-3.0.10/include LIBFFI_LIBS="-L$PREFIX/lib -lffi" ./configure $GLOBAL_CONF --with-pcre=internal $AVOID_ICONV --disable-silent-rules && make && make install) && rm -rf glib-2.32.2 || die "glib build1 failed"
|
||||
#
|
||||
# step two: build pkg-config with glib flags specified so that pkg-config is not used or required
|
||||
#
|
||||
if [ x$explicit_intl != x ] ; then
|
||||
tar xf $MOD_pkgconfig_local_tarball && (cd $MOD_pkgconfig_unpacked && GLIB_CFLAGS="-I$PREFIX/include/glib-2.0 -I$PREFIX/lib/glib-2.0/include" GLIB_LIBS="-L$PREFIX/lib -lglib-2.0 -lintl" ./configure --prefix=$HOME/gtk/inst && make && make install) && rm -rf $MOD_pkgconfig_unpacked || die "pkg-config build1 failed"
|
||||
else
|
||||
tar xf $MOD_pkgconfig_local_tarball && (cd $MOD_pkgconfig_unpacked && GLIB_CFLAGS="-I$PREFIX/include/glib-2.0 -I$PREFIX/lib/glib-2.0/include" GLIB_LIBS="-L$PREFIX/lib -lglib-2.0" ./configure --prefix=$HOME/gtk/inst && make && make install) && rm -rf $MOD_pkgconfig_unpacked || die "pkg-config build1 failed"
|
||||
fi
|
||||
#
|
||||
# step three: rebuild glib
|
||||
#
|
||||
if [ x$explicit_intl != x ] ; then
|
||||
# still need LDFLAGS in order to find libintl
|
||||
tar xf $MOD_glib_local_tarball && (cd $MOD_glib_unpacked && LDFLAGS="$GLOBAL_LDFLAGS -L$PREFIX/lib -lintl" CFLAGS="$GLOBAL_CFLAGS -I$PREFIX/include" ./configure --prefix=$PREFIX && make && make install) || die "glib build failed"
|
||||
else
|
||||
tar xf $MOD_glib_local_tarball && (cd $MOD_glib_unpacked && LDFLAGS="$GLOBAL_LDFLAGS" CFLAGS="$GLOBAL_CFLAGS" ./configure --prefix=$PREFIX && make V=1 && make install) || die "glib build failed"
|
||||
fi
|
||||
#
|
||||
# step four: rebuilding pkg-config now that glib is all set
|
||||
#
|
||||
basic_builder pkgconfig
|
||||
|
||||
#
|
||||
# now we can start on the GTK stack itself
|
||||
#
|
||||
|
||||
basic_builder atk
|
||||
tar xf $MOD_gnomecommon_local_tarball && (cd $MOD_gnomecommon_unpacked && CFLAGS=$GLOBAL_CFLAGS LDFLAGS="$GLOBAL_LDFLAGS" ./configure $GLOBAL_CONF && export MAKEFLAGS= make && MAKEFLAGS= make install) || die "gnome-common build failed"
|
||||
tar xf $MOD_gtkosxdocbook_local_tarball && (cd $MOD_gtkosxdocbook_unpacked && JHBUILD_PREFIX=$PREFIX make install) || die "gtk build failed"
|
||||
# gnome-doc-utils is not parallel-build safe so turn off make -j2
|
||||
tar xf $MOD_gnomedocutils_local_tarball && (cd $MOD_gnomedocutils_unpacked && CFLAGS=$GLOBAL_CFLAGS LDFLAGS="$GLOBAL_LDFLAGS" ./configure $GLOBAL_CONF --disable-scrollkeeper && MAKEFLAGS= make && MAKEFLAGS= make install) || die "gnome-doc-utils build failed"
|
||||
tar xf $MOD_gtkdoc_local_tarball && (cd $MOD_gtkdoc_unpacked && CFLAGS=$GLOBAL_CFLAGS LDFLAGS="$GLOBAL_LDFLAGS" ./configure --disable-scrollkeeper --with-xml-catalog=$PREFIX/etc/xml/catalog --prefix=$PREFIX && make && make install) || die "gtk build failed"
|
||||
tar xf $MOD_pixman_local_tarball && (cd $MOD_pixman_unpacked && CFLAGS=$GLOBAL_CFLAGS LDFLAGS="$GLOBAL_LDFLAGS" sh ./autogen.sh --prefix=$PREFIX && make && make install) || die "pixman build failed"
|
||||
|
||||
if [ x$OSX = x ] ; then
|
||||
freetype_bytecode_patch=$this_script_dir/misc-patches/freetype-bytecode.patch
|
||||
tar xf $MOD_freetype_local_tarball && (cd $MOD_freetype_unpacked && patch -p0 < $freetype_bytecode_patch && CFLAGS=$GLOBAL_CFLAGS LDFLAGS="$GLOBAL_LDFLAGS" ./configure $GLOBAL_CONF && make && make install) || die "freetype build failed"
|
||||
else
|
||||
basic_builder freetype
|
||||
fi
|
||||
|
||||
basic_builder fontconfig
|
||||
|
||||
if [ x$OSX = x ] ; then
|
||||
#
|
||||
# some linux nvidia drivers have buggy support for gradients. this patch
|
||||
# lets the user set an environment variable that will force a Cairo workaround
|
||||
# to the issue.
|
||||
#
|
||||
# --enable-gtk-doc is required so that make dist will work, which we need to be able to run for GPL compliance
|
||||
#
|
||||
cairo_gradient_patch=$this_script_dir/misc-patches/cairo-gradients.patch
|
||||
tar xf $MOD_cairo_local_tarball && (cd $MOD_cairo_unpacked && patch -p4 < $cairo_gradient_patch && CFLAGS=$GLOBAL_CFLAGS LDFLAGS="$GLOBAL_LDFLAGS" ./configure $GLOBAL_CONF $CAIRO_CONF --enable-gtk-doc && make && make install) || die "cairo build failed"
|
||||
else
|
||||
tar xf $MOD_cairo_local_tarball && (cd $MOD_cairo_unpacked && CFLAGS=$GLOBAL_CFLAGS LDFLAGS="$GLOBAL_LDFLAGS" ./configure $GLOBAL_CONF $CAIRO_CONF && make && make install) || die "cairo build failed"
|
||||
fi
|
||||
|
||||
tar xf $MOD_pango_local_tarball && (cd $MOD_pango_unpacked && CFLAGS=$GLOBAL_CFLAGS LDFLAGS="$GLOBAL_LDFLAGS" ./configure $GLOBAL_CONF $PANGO_CONF && make && make install) || die "pango build failed"
|
||||
|
||||
tar xf $MOD_gdkpixbuf_local_tarball && (cd $MOD_gdkpixbuf_unpacked && LDFLAGS="$GLOBAL_LDFLAGS -L$PREFIX/lib" CFLAGS="-I$PREFIX/include $GLOBAL_CFLAGS" ./configure $GLOBAL_CONF && make && make install) || die "gdk-pixbuf build failed"
|
||||
# gobject-introspection uses #include <libintl.h> and there's no way to force the "scanner" to look outside the system tree
|
||||
|
||||
|
||||
if [ x$explicit_intl != x ] ; then
|
||||
|
||||
#
|
||||
# g-ir-scanner will go looking for <libintl.h> which means we need to inject -I$PREFIX/include into it
|
||||
#
|
||||
|
||||
tar xf $MOD_gobjectintrospection_local_tarball && (cd $MOD_gobjectintrospection_unpacked && \
|
||||
./configure $GLOBAL_CONF CFLAGS="$GLOBAL_CFLAGS" LDFLAGS="$GLOBAL_LDFLAGS -L$PREFIX/lib -lintl" && make INTROSPECTION_SCANNER_ARGS="-I$PREFIX/include" && make install) || die "gobject-introspection build failed"
|
||||
|
||||
else
|
||||
basic_builder gobjectintrospection
|
||||
fi
|
||||
#
|
||||
# now gtk itself
|
||||
#
|
||||
# --enable-gtk-doc is required so that make dist will work, which we need to be able to run for GPL compliance
|
||||
#
|
||||
(tar xf $MOD_gtk_local_tarball &&
|
||||
cd $MOD_gtk_unpacked && CFLAGS="$GLOBAL_CFLAGS" LDFLAGS="$GLOBAL_LDFLAGS" \
|
||||
./configure --enable-maintainer-mode --prefix=$PREFIX --libdir=$PREFIX/lib \
|
||||
--disable-cups --disable-papi --disable-introspection --enable-relocation --enable-gtk-doc \
|
||||
--with-gdktarget=$GTK_BACKEND && make && make install) || die "GTK build failed"
|
||||
|
||||
#
|
||||
# now gtk-engines
|
||||
#
|
||||
#
|
||||
(tar xf $MOD_gtkengines_local_tarball && cd $MOD_gtkengines_unpacked && CFLAGS="$GLOBAL_CFLAGS" LDFLAGS="$GLOBAL_LDFLAGS" ./configure --prefix=$PREFIX/lib --libdir=$PREFIX/lib && make && make install) || die "GTK-engines build failed"
|
||||
|
Loading…
Reference in New Issue