]> gitweb.fluxo.info Git - slackbuilds.git/commitdiff
libtheora: added x86_64 patch and exit codes
authorrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>
Fri, 8 Dec 2006 13:13:30 +0000 (13:13 +0000)
committerrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>
Fri, 8 Dec 2006 13:13:30 +0000 (13:13 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@911 370017ae-e619-0410-ac65-c121f96126d4

media/libs/libtheora/libtheora-1.0alpha7-x86_64.diff [new file with mode: 0644]
media/libs/libtheora/libtheora.SlackBuild

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 (file)
index 0000000..ca89c07
--- /dev/null
@@ -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));
index af1a33b61e144f7f95f65c6543f8f2915203dcd1..d46185b17ac889be771b688a9cf092d4b19441de 100755 (executable)
@@ -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