From 2e381d9829fcd4806c599043bd7cee0f6b9dfbb3 Mon Sep 17 00:00:00 2001 From: "Murat D. Kadirov" Date: Thu, 13 May 2010 00:27:47 +0200 Subject: graphics/djview4: Updated for version 4.5 --- graphics/djview4/README | 13 ++++++-- graphics/djview4/djview4.SlackBuild | 59 +++++++++++++++++++++++-------------- graphics/djview4/djview4.info | 8 +++-- graphics/djview4/doinst.sh | 7 +++-- graphics/djview4/slack-desc | 16 +++++----- 5 files changed, 66 insertions(+), 37 deletions(-) diff --git a/graphics/djview4/README b/graphics/djview4/README index f887e9f821..786d869304 100644 --- a/graphics/djview4/README +++ b/graphics/djview4/README @@ -1,3 +1,12 @@ -DjView4 is a new portable DjVu viewer and browser plugin. +DjView4 is a portable DjVu viewer and browser plugin. -Requires djvulibre, xdg-utils, qt4 (all available from SlackBuilds.org) +- Entirely based on the public djvulibre api. +- Continuous scrolling of pages +- Side-by-side display of pages +- Ability to specify a url to the djview command +- All plugin and cgi options available from the command line +- All silly annotations implemented +- Display thumbnails as a grid +- Display outlines +- Page names supported (see djvused command set-page-title) +- Metadata dialog (see djvused command set-meta) diff --git a/graphics/djview4/djview4.SlackBuild b/graphics/djview4/djview4.SlackBuild index 4f6daa9207..5ea5932455 100644 --- a/graphics/djview4/djview4.SlackBuild +++ b/graphics/djview4/djview4.SlackBuild @@ -1,11 +1,29 @@ #!/bin/sh -# Slackware build script for djview4 - -# Written by Murat D. Kadirov +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=djview4 -VERSION=${VERSION:-4.4} +VERSION=${VERSION:-4.5} ARCH=${ARCH:-i486} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -17,10 +35,13 @@ OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" fi set -e @@ -38,17 +59,14 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; -# We don't want configure to think we're trying to build with qt3, so: -unset QTDIR - CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ --sysconfdir=/etc \ --localstatedir=/var \ --mandir=/usr/man \ - --infodir=/usr/info \ --docdir=/usr/doc/$PRGNAM-$VERSION \ --build=$ARCH-slackware-linux @@ -56,7 +74,11 @@ make make install DESTDIR=$PKG # This plugin *should* work with Mozilla-based browsers -mv $PKG/usr/lib/netscape $PKG/usr/lib/mozilla +if [ "$ARCH" = "x86_64" ]; then + mv $PKG/usr/lib$LIBDIRSUFFIX/netscape $PKG/usr/lib$LIBDIRSUFFIX/mozilla +else + mv $PKG/usr/lib/netscape $PKG/usr/lib/mozilla +fi mkdir -p $PKG/usr/share/{applications,pixmaps,} cp $PKG/usr/share/djvu/djview4/desktop/*.desktop \ @@ -65,8 +87,10 @@ cp $PKG/usr/share/djvu/djview4/desktop/hi32-djview4.png \ $PKG/usr/share/pixmaps/djvulibre-djview4.png ( cd $PKG - find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true - find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null || true + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null ) ( cd $PKG/usr/man @@ -74,17 +98,8 @@ cp $PKG/usr/share/djvu/djview4/desktop/hi32-djview4.png \ for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done ) -( cd $PKG - # Remove 'special' files - find . -name perllocal.pod \ - -o -name ".packlist" \ - -o -name "*.bs" \ - | xargs rm -f -) - mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a COPYRIGHT COPYING INSTALL NEWS README* TODO \ - $PKG/usr/doc/$PRGNAM-$VERSION +cp -a COPYRIGHT COPYING INSTALL NEWS README* TODO $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install @@ -92,4 +107,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/graphics/djview4/djview4.info b/graphics/djview4/djview4.info index a052b7ae95..06c0a4b28d 100644 --- a/graphics/djview4/djview4.info +++ b/graphics/djview4/djview4.info @@ -1,8 +1,10 @@ PRGNAM="djview4" -VERSION="4.4" +VERSION="4.5" HOMEPAGE="http://djvu.sourceforge.net/djview4.html" -DOWNLOAD="http://downloads.sourceforge.net/djvu/djview4-4.4.tar.gz" -MD5SUM="466225c5546aed90008d612cdb490a4e" +DOWNLOAD="http://downloads.sourceforge.net/djvu/djview4-4.5.tar.gz" +MD5SUM="0461a26dbcac33dcc5eb7955ac357504" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" MAINTAINER="Murat D. Kadirov" EMAIL="banderols@gmail.com" APPROVED="rworkman" diff --git a/graphics/djview4/doinst.sh b/graphics/djview4/doinst.sh index 3c3180c7ba..9a8ded3c60 100644 --- a/graphics/djview4/doinst.sh +++ b/graphics/djview4/doinst.sh @@ -1,4 +1,7 @@ -if [ -x /usr/share/djvu/djview4/desktop/register-djview-menu ]; then - /usr/share/djvu/djview4/desktop/register-djview-menu install +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 fi +if [ -x /usr/bin/update-mime-database ]; then + /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1 +fi diff --git a/graphics/djview4/slack-desc b/graphics/djview4/slack-desc index 3f35ece212..d53f68554b 100644 --- a/graphics/djview4/slack-desc +++ b/graphics/djview4/slack-desc @@ -6,14 +6,14 @@ # customary to leave one space after the ':'. |-----handy-ruler------------------------------------------------------| -djview4: DjView4 (viewer and plugin using djvulibre) +djview4: djview4 (viewer and plugin using djvulibre) djview4: -djview4: djview4 is an open source (GPL'ed) implementation of DjVu, +djview4: DjView4 is an open source (GPL'ed) implementation of DjVu, djview4: including viewer & browser plugin using djview4 to view djvu files. -djview4: -djview4: This uses QT4 and requires djvulibre. -djview4: -djview4: -djview4: djview4: -djview4: +djview4: Homepage: http://djvu.sourceforge.net/djview4.html +djview4: +djview4: +djview4: +djview4: +djview4: -- cgit v1.2.3