aboutsummaryrefslogtreecommitdiff
path: root/media/libs
diff options
context:
space:
mode:
authorrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2006-12-08 13:13:30 +0000
committerrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2006-12-08 13:13:30 +0000
commitd476e8a0c7311360b9e9610cd8cb9da2d7441943 (patch)
treeb5803b8500a3b1307862c6a47b2caced0b07ae56 /media/libs
parent834720b1db3b946336ffc2862478246d7f190ca8 (diff)
downloadslackbuilds-d476e8a0c7311360b9e9610cd8cb9da2d7441943.tar.gz
slackbuilds-d476e8a0c7311360b9e9610cd8cb9da2d7441943.tar.bz2
libtheora: added x86_64 patch and exit codes
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@911 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'media/libs')
-rw-r--r--media/libs/libtheora/libtheora-1.0alpha7-x86_64.diff21
-rwxr-xr-xmedia/libs/libtheora/libtheora.SlackBuild32
2 files changed, 41 insertions, 12 deletions
diff --git a/media/libs/libtheora/libtheora-1.0alpha7-x86_64.diff b/media/libs/libtheora/libtheora-1.0alpha7-x86_64.diff
new file mode 100644
index 00000000..ca89c078
--- /dev/null
+++ b/media/libs/libtheora/libtheora-1.0alpha7-x86_64.diff
@@ -0,0 +1,21 @@
+--- libtheora-0.0.0.alpha7/lib/toplevel.c 2006-06-13 00:57:36.000000000 +0200
++++ libtheora-pdw/lib/toplevel.c 2006-08-19 16:55:30.000000000 +0200
+@@ -172,7 +172,7 @@
+
+ static int _theora_unpack_comment(theora_comment *tc, oggpack_buffer *opb){
+ int i;
+- long len;
++ long len,tmp;
+
+ _tp_readlsbint(opb,&len);
+ if(len<0)return(OC_BADHEADER);
+@@ -180,7 +180,8 @@
+ _tp_readbuffer(opb,tc->vendor, len);
+ tc->vendor[len]='\0';
+
+- _tp_readlsbint(opb,(long *) &tc->comments);
++ _tp_readlsbint(opb,&tmp);
++ tc->comments=tmp;
+ if(tc->comments<0)goto parse_err;
+ tc->user_comments=_ogg_calloc(tc->comments,sizeof(*tc->user_comments));
+ tc->comment_lengths=_ogg_calloc(tc->comments,sizeof(*tc->comment_lengths));
diff --git a/media/libs/libtheora/libtheora.SlackBuild b/media/libs/libtheora/libtheora.SlackBuild
index af1a33b6..d46185b1 100755
--- a/media/libs/libtheora/libtheora.SlackBuild
+++ b/media/libs/libtheora/libtheora.SlackBuild
@@ -26,22 +26,22 @@ TMP=${TMP:=/tmp}
SRC_DIR=${SRC:=$CWD}
REPOS=${REPOS:=$TMP}
+# ------- 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
+
RTOOL="wget"
PACKAGE_EXT="bz2"
SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT"
URL="http://downloads.xiph.org/releases/theora/$SRC"
-if [ "$PACKAGE_EXT" == "bz2" ]; then
- tarflag="j"
-else
- tarflag="z"
-fi
-
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" = "i486" ]; then
@@ -74,17 +74,25 @@ cd $TMP
NAME="$PACKAGE"
PKG=$TMP/package-$PACKAGE
-tar xvf$tarflag $SRC_DIR/$SRC
+tar xvf $SRC_DIR/$SRC || exit $ERROR_TAR
cd $NAME-$VERSION
chown -R root.root .
+if [ -f "$CWD/$PACKAGE-$VERSION.diff" ]; then
+ patch -p1 < $CWD/$PACKAGE-$VERSION.diff || exit $ERROR_PATCH
+fi
+
+if [ -f "$CWD/$PACKAGE-$VERSION-$ARCH.diff" ]; then
+ patch -p1 < $CWD/$PACKAGE-$VERSION-$ARCH.diff || exit $ERROR_PATCH
+fi
+
find . -perm 777 -exec chmod 755 {} \;
CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS" \
-./configure --prefix=/usr --disable-static --libdir=$LIBDIR --program-prefix="" --program-suffix="" $TARGET-slackware-linux
+./configure --prefix=/usr --disable-static --libdir=$LIBDIR --program-prefix="" --program-suffix="" $TARGET-slackware-linux || exit $ERROR_CONF
-make || exit 32
-make install DESTDIR=$PKG
+make || exit $ERROR_MAKE
+make install DESTDIR=$PKG || exit $ERROR_INSTALL
mkdir -p $PKG/usr/doc/$NAME-$VERSION
mv $PKG/usr/share/doc/$NAME-$VERSION/* $PKG/usr/doc/$NAME-$VERSION
@@ -124,7 +132,7 @@ cd $PKG
echo 'chroot . /sbin/ldconfig' > install/doinst.sh
-makepkg -l y -c n $REPOS/$NAME-$VERSION-$ARCH-$BUILD.tgz
+makepkg -l y -c n $REPOS/$NAME-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG
if [ "$CLEANUP" == "yes" ]; then
rm -rf $TMP