build_mtpaint1() { HERE=`pwd` VER="4.2.0" BUILDDEPS="compiletc.tcz docbook_xsl.tcz automake.tcz libxml2-bin.tcz libxslt.tcz libtool.tcz libtool-dev.tcz gettext.tcz Xorg-7.6-dev.tcz Xorg-7.6-lib.tcz" #DEPS= . ./lcms-sc.inc || exit 1 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/localbin:$PATH" export PKG_CONFIG_PATH="$PKGPATH/lib/pkgconfig:$PKG_CONFIG_PATH" if [ ! -f "$TMPDIR"/xmlto ]; then tar xvf xmlto-0.0.25.tar.bz2 || exit 1 cd xmlto-0.0.25 || exit 1 ./configure --prefix=/usr/local || exit 1 make || exit 1 make install || exit 1 touch "$TMPDIR"/xmlto cd .. fi if [ ! -f "$TMPDIR"/glib ]; then tar xvf glib-1.2.10.tar.bz2 || exit 1 cd glib-1.2.10 || exit 1 patch -p1 < ../glib1.2_1.2.10-17.diff || exit 1 ./configure --prefix="$PKGPATH" --bindir="$PKGPATH"/localbin || exit 1 make || exit 1 make install || exit 1 touch "$TMPDIR"/glib cd .. fi if [ ! -f "$TMPDIR"/gtk ]; then tar xvf gtk+-1.2.10.tar.bz2 || exit 1 cd gtk+-1.2.10 || exit 1 patch -p1 < ../gtk+1.2_1.2.10-18.diff || exit 1 ./configure --prefix="$PKGPATH" --bindir="$PKGPATH"/localbin || exit 1 make || exit 1 make install || exit 1 touch "$TMPDIR"/gtk cd .. fi if [ ! -f "$TMPDIR"/lcms ]; then build_lcms "$PKGPATH" || exit 1 fi if [ ! -f "$TMPDIR"/openjpeg ]; then tar xvf openjpeg_v1_4_sources_r697.tgz || exit 1 cd openjpeg_v1_4_sources_r697 || exit 1 patch -p1 < ../openjpeg-1.4-autoconf.patch || exit 1 ./configure --prefix="$PKGPATH" --bindir="$PKGPATH"/localbin || exit 1 make || exit 1 make install || exit 1 touch "$TMPDIR"/openjpeg cd .. fi if [ ! -f "$TMPDIR"/giflib ]; then tar xvf giflib-4.2.0.tar.bz2 || exit 1 cd giflib-4.2.0 || exit 1 ./configure --prefix="$PKGPATH" --bindir="$PKGPATH"/localbin || exit 1 sed -i -e 's:xmlto:xmlto --skip-validation:g' doc/Makefile || exit 1 make || exit 1 # libungif compatibility - instructions taken from Redhat specfile MAJOR=`echo ${VER} | sed 's/\([0-9]\+\)\..*/\1/'` gcc -shared -Wl,-soname,libungif.so.${MAJOR} -Llib/.libs -lgif -o libungif.so.${VER} || exit 1 make install || exit 1 install -m755 libungif.so.${VER} ""$PKGPATH"/lib/" ln -sf libungif.so.${VER} ""$PKGPATH"/lib/libungif.so.4" ln -sf libungif.so.4 ""$PKGPATH"/lib/libungif.so" touch "$TMPDIR"/giflib cd .. fi if [ ! -f "$TMPDIR"/mtpaint ]; then tar xvf mtpaint-3.40.tar.bz2 || exit 1 cd mtpaint-3.40 || exit 1 ./configure --prefix="$PKGPATH" --bindir="$PKGPATH"/localbin man intl gif jpeg tiff || exit 1 make || exit 1 make install || exit 1 cd "$HERE" touch "$TMPDIR"/mtpaint1 fi }