diff options
author | rhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4> | 2007-05-05 15:59:14 +0000 |
---|---|---|
committer | rhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4> | 2007-05-05 15:59:14 +0000 |
commit | 5337e9bc98186af4827dd0f19fdbdbf0d6d3e9db (patch) | |
tree | c63f985061a23fea85b4bd789d0ca9cfeeb9dce6 /patches/freetype/freetype.SlackBuild | |
parent | d4cddbab87b90809d4fa698dd699dd862a485c8f (diff) | |
download | slackbuilds-5337e9bc98186af4827dd0f19fdbdbf0d6d3e9db.tar.gz slackbuilds-5337e9bc98186af4827dd0f19fdbdbf0d6d3e9db.tar.bz2 |
patches/freetype: changed for slack.sarava standards
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@1221 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'patches/freetype/freetype.SlackBuild')
-rwxr-xr-x | patches/freetype/freetype.SlackBuild | 55 |
1 files changed, 34 insertions, 21 deletions
diff --git a/patches/freetype/freetype.SlackBuild b/patches/freetype/freetype.SlackBuild index 5343c099..64660847 100755 --- a/patches/freetype/freetype.SlackBuild +++ b/patches/freetype/freetype.SlackBuild @@ -4,6 +4,18 @@ # this is a small modified version of the script found at # http://www.slackware.com/~alien/slackbuilds/freetype2/build/freetype2.SlackBuild +if [ -s "slack-required" ]; then + echo Recomended and required packages for building cairo are: + cat slack-required | sed -e 's/^/\t/' + if [ "$INTERACT" != "no" ]; then + echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER. + read crap +# else +# echo Sleeping 3 seconds... +# sleep 3 + fi +fi + CWD=`pwd` if [ -f ~/.slackbuildrc ]; then @@ -26,6 +38,12 @@ else LIBDIR=/usr/lib fi +# ------- error codes for createpkg -------------- +ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33 +ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36 +ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 +ERROR_PATCH=40 + PACKAGE="$PRGNAM" PACKAGE_EXT="bz2" SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT" @@ -62,7 +80,7 @@ SRC_DIR="$SRC_DIR/$PACKAGE" mkdir -p $SRC_DIR if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then - wget "$URL" -O "$SRC_DIR/$SRC" + wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET fi if [ "$ARCH" = "i386" ]; then @@ -83,33 +101,29 @@ fi rm -rf $PKG mkdir -p $PKG -if [ "$PACKAGE_EXT" == "bz2" ]; then - tarflag="j" -else - tarflag="z" -fi - +TMP="$TMP/$PACKAGE" +rm -rf $TMP +mkdir -p $TMP cd $TMP -rm -rf $PRGNAM-$VERSION -tar xvf$tarflag $SRC_DIR/$PRGNAM-$VERSION.tar.$PACKAGE_EXT +tar xvf $SRC_DIR/$PRGNAM-$VERSION.tar.$PACKAGE_EXT || exit $ERROR_TAR cd $PRGNAM-$VERSION if [ -f "$CWD/freetype.illadvisederror.diff.gz" ]; then # This breaks far too many things. Freetype2 developers will have to get their # punishment on someone else's distribution. - zcat $CWD/freetype.illadvisederror.diff.gz | patch -p1 -b -z .ill --verbose + zcat $CWD/freetype.illadvisederror.diff.gz | patch -p1 -b -z .ill --verbose || exit $ERROR_PATCH fi if [ -f "$CWD/freetype_enable_bytecode_interpreter.patch.gz" ]; then # Enable freetype's bytecode interpreter: - zcat $CWD/freetype_enable_bytecode_interpreter.patch.gz | patch -p1 -b -z .bc --verbose + zcat $CWD/freetype_enable_bytecode_interpreter.patch.gz | patch -p1 -b -z .bc --verbose || exit $ERROR_PATCH fi chown -R root.root . -CFLAGS="$SLKCFLAGS" make setup CFG="--prefix=/usr --libdir=$LIBDIR $ARCH-slackware-linux" -make || exit 32 -make install DESTDIR=$PKG +CFLAGS="$SLKCFLAGS" make setup CFG="--prefix=/usr --libdir=$LIBDIR $ARCH-slackware-linux" || exit $ERROR_CONF +make || exit $ERROR_MAKE +make install DESTDIR=$PKG || exit $ERROR_INSTALL ldconfig mkdir -p $PKG/usr/include @@ -133,12 +147,11 @@ cd $PKG find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null -makepkg -l y -c n $REPOS/$PRGNAM-$VERSION-$ARCH-$BUILD.tgz -slack_build | grep "^${PRGNAM}" > $REPOS/$PRGNAM-$VERSION-$ARCH-$BUILD.txt -(cd $REPOS && md5sum $PRGNAM-$VERSION-$ARCH-$BUILD.tgz > $PRGNAM-$VERSION-$ARCH-$BUILD.tgz.md5) +makepkg -l y -c n $REPOS/$PRGNAM-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG -if [ "$1" = "--cleanup" ]; then - rm -rf $TMP/$PRGNAM-$VERSION - rm -rf $PKG -fi +# slack_build | grep "^${PRGNAM}" > $REPOS/$PRGNAM-$VERSION-$ARCH-$BUILD.txt +# (cd $REPOS && md5sum $PRGNAM-$VERSION-$ARCH-$BUILD.tgz > $PRGNAM-$VERSION-$ARCH-$BUILD.tgz.md5) +if [ "$CLEANUP" == "yes" ]; then + rm -rf $TMP +fi |