mirror of
https://github.com/SlackBuildsOrg/slackbuilds
synced 2024-09-30 05:39:56 +02:00
network/driftnet: Fix build with giflib 5.1.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
37d75946ea
commit
bf4c85e145
2 changed files with 40 additions and 9 deletions
|
@ -3,8 +3,8 @@
|
|||
# Written by JK Wood <joshuakwood@gmail.com>
|
||||
|
||||
PRGNAM=driftnet
|
||||
VERSION=0.1.6_p20090401
|
||||
BUILD=${BUILD:-2}
|
||||
VERSION=${VERSION:-0.1.6_p20090401}
|
||||
BUILD=${BUILD:-3}
|
||||
TAG=${TAG:-_SBo}
|
||||
|
||||
if [ -z "$ARCH" ]; then
|
||||
|
@ -44,15 +44,18 @@ tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
|
|||
cd $PRGNAM-$VERSION
|
||||
chown -R root:root .
|
||||
find -L . \
|
||||
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
|
||||
-exec chmod 755 {} \; -o \
|
||||
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
||||
-exec chmod 644 {} \;
|
||||
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
|
||||
-o -perm 511 \) -exec chmod 755 {} \; -o \
|
||||
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
||||
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
||||
|
||||
# Clean up building with libpng14 - thanks Gentoo!
|
||||
sed -i -e 's:png_set_gray_1_2_4_to_8:png_set_expand_gray_1_2_4_to_8:' png.c
|
||||
|
||||
LDFLAGS="-lpng14" \
|
||||
# patch for giflib 5.1.x
|
||||
patch -p1 < $CWD/driftnet.patch
|
||||
|
||||
LDFLAGS="-lpng16" \
|
||||
CFLAGS="$SLKCFLAGS" \
|
||||
CXXFLAGS="$SLKCFLAGS" \
|
||||
ARCH="$ARCH" \
|
||||
|
@ -65,8 +68,7 @@ strip --strip-unneeded $PKG/usr/bin/driftnet
|
|||
gzip -9c driftnet.1 > $PKG/usr/man/man1/driftnet.1.gz
|
||||
|
||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cp -a CHANGES COPYING CREDITS README TODO \
|
||||
$PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cp -a CHANGES COPYING CREDITS README TODO $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||
find $PKG/usr/doc -type f -exec chmod 644 {} \;
|
||||
|
||||
|
|
29
network/driftnet/driftnet.patch
Normal file
29
network/driftnet/driftnet.patch
Normal file
|
@ -0,0 +1,29 @@
|
|||
--- driftnet-0.1.6_p20090401/gif.c.old 2016-01-04 23:08:50.734142148 +0700
|
||||
+++ driftnet-0.1.6_p20090401/gif.c 2016-01-04 23:11:58.759931300 +0700
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
int gif_load_hdr(img I) {
|
||||
GifFileType *g;
|
||||
- g = I->us = DGifOpenFileHandle(fileno(I->fp));
|
||||
+ g = I->us = DGifOpenFileHandle(fileno(I->fp), NULL);
|
||||
if (!I->us) {
|
||||
I->err = IE_HDRFORMAT;
|
||||
return 0;
|
||||
@@ -36,7 +36,7 @@
|
||||
* Abort loading a GIF file after the header is done.
|
||||
*/
|
||||
int gif_abort_load(img I) {
|
||||
- DGifCloseFile((GifFileType*)I->us);
|
||||
+ DGifCloseFile((GifFileType*)I->us, NULL);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
ret = 1;
|
||||
fail:
|
||||
|
||||
- DGifCloseFile(g);
|
||||
+ DGifCloseFile(g, NULL);
|
||||
|
||||
return ret;
|
||||
}
|
Loading…
Reference in a new issue