diff options
author | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2016-01-04 23:15:22 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2016-01-17 09:40:16 +0700 |
commit | bf4c85e1457c946b322d73077b4b7a7845678af8 (patch) | |
tree | 48bd0455cb31ee420e6938c494c8cfd1ad74761c /network/driftnet | |
parent | 37d75946ea291b12c8d579f3cbee6c1113da968b (diff) |
network/driftnet: Fix build with giflib 5.1.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/driftnet')
-rw-r--r-- | network/driftnet/driftnet.SlackBuild | 20 | ||||
-rw-r--r-- | network/driftnet/driftnet.patch | 29 |
2 files changed, 40 insertions, 9 deletions
diff --git a/network/driftnet/driftnet.SlackBuild b/network/driftnet/driftnet.SlackBuild index 3de47a85337a..0682cebb072b 100644 --- a/network/driftnet/driftnet.SlackBuild +++ b/network/driftnet/driftnet.SlackBuild @@ -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 {} \; diff --git a/network/driftnet/driftnet.patch b/network/driftnet/driftnet.patch new file mode 100644 index 000000000000..166c75bc2f89 --- /dev/null +++ b/network/driftnet/driftnet.patch @@ -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; + } |