build_zathura() { HERE=`pwd` BUILDEPS="compiletc.tcz" #DEPS= . ./desktop-file-utils-sc.inc || exit 1 . ./poppler-sc.inc || exit 1 . ./girara-sc.inc || exit 1 . ./sqlite3-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 -L/apps/gtk2/lib" export CPPFLAGS="-I$PKGPATH/include -I/apps/gtk2/include" export PATH="$PKGPATH/bin:/apps/gtk2/bin:$PATH" export PKG_CONFIG_PATH="$PKGPATH/lib/pkgconfig:/apps/gtk2/lib/pkgconfig:$PKG_CONFIG_PATH" export LD_LIBRARY_PATH="$PKGPATH/lib:/apps/gtk2/lib:$LD_LIBRARY_PATH" if [ ! -f "$TMPDIR"/sqlite3 ]; then build_sqlite3 "$PKGPATH" || exit 1 fi if [ ! -f "$TMPDIR"/poppler ]; then build_poppler "$PKGPATH" || exit 1 fi if [ ! -f "$TMPDIR"/desktop-file-utils ]; then build_desktop-file-utils "$PKGPATH" || exit 1 fi if [ ! -f "$TMPDIR"/girara ]; then build_girara "$PKGPATH" || exit 1 fi if [ ! -f "$TMPDIR"/zathura ]; then tar xvf zathura-0.1.2.tar.gz || exit 1 cd zathura-0.1.2 || exit 1 patch -p0 < ../zathura-path-path.diff || exit 1 make ZATHURA_GTK_VERSION=2 || exit 1 make ZATHURA_GTK_VERSION=2 install || exit 1 cd "$HERE" touch "$TMPDIR"/zathura fi if [ ! -f "$TMPDIR"/zathura-pdf-poppler ]; then tar xvf zathura-pdf-poppler-0.1.1.tar.gz || exit 1 cd zathura-pdf-poppler-0.1.1 || exit 1 make PREFIX="$PKGPATH" || exit 1 make PREFIX="$PKGPATH" install || exit 1 touch "$TMPDIR"/zathura-pdf-poppler || exit 1 cd "$HERE" fi }