#NEEDS=libffi-sc.inc build_glib2() { . ./libffi-sc.inc unset VER NAME BUILDDEPS HERE=`pwd` NAME=glib2 VER=2.31.6 BUILDDEPS="python.tcz compiletc.tcz gettext.tcz" MIRROR=http://ftp.gnome.org/pub/gnome/sources/glib/2.31 SRC=glib-"$VER".tar.xz TCEDIR=/etc/sysconfig/tcedir if [ ! -f "$SRC" ]; then wget ftp.gnome.org/pub/GNOME/sources/glib/2.31/glib-2.31.6.tar.xz fi for I in `echo "$BUILDDEPS"`; do su tc -c "tce-load -i "$I"" || su tc -c "tce-load -iw "$I"" done PKGPATH=$1 export LDFLAGS="-L$PKGPATH/lib" export CPPFLAGS="-I$PKGPATH/include" export PATH="$PKGPATH/bin:$PATH" export PKG_CONFIG_PATH="$PKGPATH/lib/pkgconfig:$PKG_CONFIG_PATH" export LD_LIBRARY_PATH="$PKGPATH/lib" if [ ! -f "$TMPDIR"/libffi ]; then build_libffi "$PKGPATH" || exit 1 fi tar xvf glib-2.31.6.tar.xz cd glib-2.31.6 ./configure --prefix="$PKGPATH" --bindir="$PKGPATH"/localbin || exit 1 make || exit 1 make install || exit 1 cd "$HERE" touch "$TMPDIR"/glib2 }