diff options
Diffstat (limited to 'misc/fbdump/fbdump.SlackBuild')
-rw-r--r-- | misc/fbdump/fbdump.SlackBuild | 49 |
1 files changed, 37 insertions, 12 deletions
diff --git a/misc/fbdump/fbdump.SlackBuild b/misc/fbdump/fbdump.SlackBuild index d267206d8b134..37847bb764869 100644 --- a/misc/fbdump/fbdump.SlackBuild +++ b/misc/fbdump/fbdump.SlackBuild @@ -2,9 +2,11 @@ # Slackware build script for fbdump -# Ryan P.C. McQuen | Everett, WA | ryanpcmcquen@member.fsf.org +# Previously maintained by: +# Ryan P.C. McQuen | Everett, WA | <email removed> -# Copyright 2010 Binh Nguyen <binhvng@gmail.com> +# Original author: +# Copyright 2010 Binh Nguyen <email removed> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -24,14 +26,30 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# Now maintained by B. Watson (yalhcru@gmail.com) + +# 20170324 bkw: +# - take over maintenance. +# - fix major bug: output was being truncated, producing invalid ppm files! +# - add man page. +# - i486=>i586. +# - minor script updates. +# - update README. +# - BUILD=2. + +# TODO: see if there's a way to make fbdump faster. It's taking 8 sec +# to dump a 1920x1080x32bit framebuffer, and that's a pretty common +# framebuffer format these days. Compiling with lots of optimizations +# doesn't seem to help (even switching from gcc to clang). + PRGNAM=fbdump VERSION=${VERSION:-0.4.2} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac @@ -42,14 +60,14 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC" + SLKCFLAGS="-O3 -fPIC -funroll-loops -fvectorize" LIBDIRSUFFIX="64" else SLKCFLAGS="-O2" @@ -71,6 +89,12 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +# 20170324 bkw: maybe returning from main() used to cause stdout to +# be flushed, back when fbdump was new... but these days we need to +# explicitly flush the buffer, or the output file is truncated. +patch -p1 < $CWD/fflush_stdout.diff + +CC=clang \ CFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ @@ -84,14 +108,15 @@ CFLAGS="$SLKCFLAGS" \ --build=$ARCH-slackware-linux make -make install DESTDIR=$PKG +make install-strip DESTDIR=$PKG -find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true +# man page written for this build, based on --help output and +# text from the homepage. +mkdir -p $PKG/usr/man/man1 +gzip -9c < $CWD/$PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a AUTHORS COPYING ChangeLog INSTALL NEWS README TODO \ - $PKG/usr/doc/$PRGNAM-$VERSION +cp -a AUTHORS C* NEWS README TODO $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install |