diff options
author | B. Watson <urchlay@slackware.uk> | 2024-08-19 23:48:15 -0400 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-08-24 11:55:25 +0700 |
commit | 1ae74a6dccee0ac93e1dc53b0a22c2c74324b026 (patch) | |
tree | 3b6490b0bf584926ef83189e225358405c06581a /office | |
parent | 8e7cbadb97bf4f1fe83244e99c38358612774ad5 (diff) |
office/evince-gtk2: New maintainer, fix comic book support.
Signed-off-by: B. Watson <urchlay@slackware.uk>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'office')
-rw-r--r-- | office/evince-gtk2/README | 31 | ||||
-rw-r--r-- | office/evince-gtk2/comicbookfix.diff | 44 | ||||
-rw-r--r-- | office/evince-gtk2/evince-gtk2.SlackBuild | 90 | ||||
-rw-r--r-- | office/evince-gtk2/evince-gtk2.info | 4 | ||||
-rw-r--r-- | office/evince-gtk2/slack-desc | 20 |
5 files changed, 120 insertions, 69 deletions
diff --git a/office/evince-gtk2/README b/office/evince-gtk2/README index 668273f0f312..90658755e339 100644 --- a/office/evince-gtk2/README +++ b/office/evince-gtk2/README @@ -1,16 +1,29 @@ -This is the last GTK2 version of evince. It will conflict with the -latest one, so don't install both. +evince-gtk2 (a simple gnome-based document viewer) -Evince is a document viewer for multiple document formats. It currently -supports pdf, postscript, djvu, tiff and dvi. The goal of evince is to -replace the multiple document viewers that exist on the GNOME Desktop -with a single simple application. +This is the last GTK2 version of evince. It will conflict with the +latest one (the 'evince' build), so don't install both. + +Evince is a document viewer for multiple document formats. It +currently supports PDF, PostScript, DjVu, TIFF, comic book archives, +and DVI. The goal of evince is to replace the multiple document +viewers that exist on the GNOME Desktop with a single simple +application. Evince is specifically designed to support the following file formats: * PDF * Postscript * DjVu * TIFF -* CBR/CBZ (comic books) -* DVI (requires optional dependency texlive) -* XPS (requires optional dependency libgxps) +* CBZ/CBR/CB7/CBT (comic books) +* DVI + +Optional runtime dependencies: +- unrar or unrar-free. Required for CBR support. +- p7zip. Required for CB7 support. + +By default, the package is built with NLS (Native Language Support) +disabled, so the user interface will only support English. This +doesn't have anything to do with the language a PDF/DjVu/etc file is +written in, only the text in the application itself (e.g. "File", +"Edit", "Previous", "Next"). If you require NLS support, run this +script with NLS=yes exported in the environemnt. diff --git a/office/evince-gtk2/comicbookfix.diff b/office/evince-gtk2/comicbookfix.diff new file mode 100644 index 000000000000..2ac43b1076e1 --- /dev/null +++ b/office/evince-gtk2/comicbookfix.diff @@ -0,0 +1,44 @@ +diff -Naur evince-2.32.0/backend/comics/comics-document.c evince-2.32.0.patched/backend/comics/comics-document.c +--- evince-2.32.0/backend/comics/comics-document.c 2010-09-27 12:54:34.000000000 -0400 ++++ evince-2.32.0.patched/backend/comics/comics-document.c 2024-08-19 23:35:22.539062511 -0400 +@@ -320,7 +320,8 @@ + * included in shared-mime-info */ + + if (!strcmp (mime_type, "application/x-cbr") || +- !strcmp (mime_type, "application/x-rar")) { ++ !strcmp (mime_type, "application/x-rar") || ++ !strcmp (mime_type, "application/vnd.rar")) { + /* The RARLAB provides a no-charge proprietary (freeware) + * decompress-only client for Linux called unrar. Another + * option is a GPLv2-licensed command-line tool developed by +@@ -405,7 +406,8 @@ + return TRUE; + } + } else if (!strcmp (mime_type, "application/x-cbt") || +- !strcmp (mime_type, "application/x-tar")) { ++ !strcmp (mime_type, "application/x-tar") || ++ !strcmp (mime_type, "application/gzip")) { + /* tar utility (Tape ARchive) */ + comics_document->selected_command = + g_find_program_in_path ("tar"); +diff -Naur evince-2.32.0/backend/comics/comicsdocument.evince-backend.in evince-2.32.0.patched/backend/comics/comicsdocument.evince-backend.in +--- evince-2.32.0/backend/comics/comicsdocument.evince-backend.in 2010-07-14 03:54:39.000000000 -0400 ++++ evince-2.32.0.patched/backend/comics/comicsdocument.evince-backend.in 2024-08-19 23:33:18.180074214 -0400 +@@ -1,4 +1,4 @@ + [Evince Backend] + Module=comicsdocument + _TypeDescription=Comic Books +-MimeType=application/x-cbr;application/x-cbz;application/x-cb7;application/x-cbt; ++MimeType=application/x-cbr;application/x-cbz;application/x-cb7;application/x-cbt;application/zip;application/vnd.rar;application/x-7z-compressed;application/x-tar;application/gzip; +diff -Naur evince-2.32.0/configure evince-2.32.0.patched/configure +--- evince-2.32.0/configure 2010-09-27 15:02:20.000000000 -0400 ++++ evince-2.32.0.patched/configure 2024-08-19 23:33:23.710073694 -0400 +@@ -21439,7 +21439,7 @@ + EVINCE_MIME_TYPES="${EVINCE_MIME_TYPES}image/tiff;" + fi + if test "x$enable_comics" = "xyes"; then +- EVINCE_MIME_TYPES="${EVINCE_MIME_TYPES}application/x-cbr;application/x-cbz;application/x-cb7;application/x-cbt;" ++ EVINCE_MIME_TYPES="${EVINCE_MIME_TYPES}application/x-cbr;application/x-cbz;application/x-cb7;application/x-cbt;application/zip;application/vnd.rar;application/x-7z-compressed;application/x-tar;application/gzip;" + fi + if test "x$enable_pixbuf" = "xyes"; then + EVINCE_MIME_TYPES="${EVINCE_MIME_TYPES}image/*;" diff --git a/office/evince-gtk2/evince-gtk2.SlackBuild b/office/evince-gtk2/evince-gtk2.SlackBuild index b28bfd0f1c43..047a9487f838 100644 --- a/office/evince-gtk2/evince-gtk2.SlackBuild +++ b/office/evince-gtk2/evince-gtk2.SlackBuild @@ -2,34 +2,26 @@ # Slackware build script for evince-gtk2 -# Copyright 2023 Petar Petrov slackalaxy@gmail.com -# Copyright 2009 Andrew Brouwers <abrouwers@gmail.com> -# Copyright 2009, Michiel van Wessem, Manchester, United Kingdom. -# 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. +# Originally written by Petar Petrov. +# Modified and now maintained by B. Watson <urchlay@slackware.uk> + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +# 20240819 bkw, BUILD=2: +# - new maintainer. +# - relicense as WTFPL. +# - disable NLS by default, mention NLS=yes in the README. +# - enable DVI backend, since Slackware 15.0 has texlive. +# - remove mention of XPS from README, since this older version +# of evince doesn't actually support it. +# - make comic book support (CBZ/CBR/CB7/CBT) actually *work*. cd $(dirname $0) ; CWD=$(pwd) PRGNAM=evince-gtk2 SRCNAM=evince VERSION=${VERSION:-2.32.0} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -41,7 +33,7 @@ if [ -z "$ARCH" ]; then esac fi -NLS=${NLS:-YES} +NLS=${NLS:-no} if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" @@ -75,19 +67,27 @@ rm -rf $SRCNAM-$VERSION tar xvf $CWD/$SRCNAM-$VERSION.tar.bz2 cd $SRCNAM-$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 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; - -if [ "$NLS" != "YES" ]; then - # disable NLS - we're going for a small package here. - rm po/*.po - sed -i -e 's/USE_NLS=yes/USE_NLS=no/g' \ - -e 's/ENABLE_NLS 1/ENABLE_NLS 0/g' configure +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} + + +NLSOPT="--disable-nls" +if [ "$NLS" != "yes" ]; then + # disable NLS - we're going for a small package here. + # 20240819 bkw: --disable-nls by itself *should* be enough, but this + # stuff really is necessary. + rm po/*.po + sed -i -e 's/USE_NLS=yes/USE_NLS=no/g' \ + -e 's/ENABLE_NLS 1/ENABLE_NLS 0/g' \ + configure + NLSOPT="--enable-nls" fi +# 20240819 bkw: add the correct MIME types for CBZ/CBR/CB7/CBT to actually +# work. This patch might not be needed when Slackware 15.1/16.0 comes out, +# if shared-mime-info and friends detect e.g. a .cbr file as application/x-cbr +# instead of application/vnd.rar as 15.0's does. +patch -p1 < $CWD/comicbookfix.diff + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ @@ -108,17 +108,18 @@ CXXFLAGS="$SLKCFLAGS" \ --enable-pixbuf \ --enable-comics \ --enable-impress \ - --disable-dvi \ --disable-static \ --disable-schemas-install \ --disable-scrollkeeper \ --disable-nautilus \ --disable-introspection \ --disable-maintainer-mode \ + $NLSOPT \ --build=$ARCH-slackware-linux make LDFLAGS=-lICE -make install DESTDIR=$PKG +make install-strip DESTDIR=$PKG +gzip -9 $PKG/usr/man/man*/* rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la @@ -127,19 +128,12 @@ sed -i "/NoDisplay=true/d" $PKG/usr/share/applications/evince.desktop # Remove these rm -rf $PKG/*.schemas - -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true - -find $PKG/usr/man -type f -exec gzip -9 {} \; -for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done - rm -rf $PKG/{usr/share/gtk-doc,etc} -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a \ - AUTHORS COPYING NEWS README \ - $PKG/usr/doc/$PRGNAM-$VERSION -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $PKGDOC +cp -a AUTHORS COPYING NEWS README $PKGDOC +cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc diff --git a/office/evince-gtk2/evince-gtk2.info b/office/evince-gtk2/evince-gtk2.info index 6e7a3bba656d..3bd73ed2dec0 100644 --- a/office/evince-gtk2/evince-gtk2.info +++ b/office/evince-gtk2/evince-gtk2.info @@ -6,5 +6,5 @@ MD5SUM="ebc3ce6df8dcbf29cb9492f8dd031319" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="gnome-icon-theme" -MAINTAINER="Petar Petrov" -EMAIL="slackalaxy@gmail.com" +MAINTAINER="B. Watson" +EMAIL="urchlay@slackware.uk" diff --git a/office/evince-gtk2/slack-desc b/office/evince-gtk2/slack-desc index 58ba77a3bc5d..13368dd88df7 100644 --- a/office/evince-gtk2/slack-desc +++ b/office/evince-gtk2/slack-desc @@ -1,19 +1,19 @@ # HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. Line -# up the first '|' above the ':' following the base package name, and the '|' -# on the right side marks the last column you can put a character in. You must -# make exactly 11 lines for the formatting to be correct. It's also -# customary to leave one space after the ':'. +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. |-----handy-ruler------------------------------------------------------| evince-gtk2: evince-gtk2 (a simple gnome-based document viewer) evince-gtk2: -evince-gtk2: Evince is a document viewer for multiple document formats. -evince-gtk2: It currently supports pdf, postscript, djvu, tiff, and dvi. +evince-gtk2: Evince is a document viewer for multiple document formats. It +evince-gtk2: currently supports PDF, PostScript, DjVu, TIFF, comic book archives, +evince-gtk2: and DVI. The goal of evince is to replace the multiple document +evince-gtk2: viewers that exist on the GNOME Desktop with a single simple +evince-gtk2: application. evince-gtk2: -evince-gtk2: The goal of evince is to replace the multiple document viewers -evince-gtk2: that exist on the GNOME Desktop with a single simple application. evince-gtk2: -evince-gtk2: homepage: http://projects.gnome.org/evince/ evince-gtk2: evince-gtk2: |