summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--office/zathura-djvu/README6
-rw-r--r--office/zathura-djvu/slack-desc19
-rw-r--r--office/zathura-djvu/stddef.diff43
-rw-r--r--office/zathura-djvu/zathura-djvu.SlackBuild74
-rw-r--r--office/zathura-djvu/zathura-djvu.info10
5 files changed, 152 insertions, 0 deletions
diff --git a/office/zathura-djvu/README b/office/zathura-djvu/README
new file mode 100644
index 0000000000..c8b0c4aa82
--- /dev/null
+++ b/office/zathura-djvu/README
@@ -0,0 +1,6 @@
+zathura-djvu (zathura support for DjVu format documents)
+
+The zathura-djvu plugin adds DjVu support to zathura by using the
+djvulibre library.
+
+This requires zathura.
diff --git a/office/zathura-djvu/slack-desc b/office/zathura-djvu/slack-desc
new file mode 100644
index 0000000000..b073d8ce4f
--- /dev/null
+++ b/office/zathura-djvu/slack-desc
@@ -0,0 +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 ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+zathura-djvu: zathura-djvu (zathura support for DjVu format documents)
+zathura-djvu:
+zathura-djvu: The zathura-djvu plugin adds DjVu support to zathura by using the
+zathura-djvu: djvulibre library.
+zathura-djvu:
+zathura-djvu:
+zathura-djvu:
+zathura-djvu:
+zathura-djvu:
+zathura-djvu:
+zathura-djvu:
diff --git a/office/zathura-djvu/stddef.diff b/office/zathura-djvu/stddef.diff
new file mode 100644
index 0000000000..4d7e49a00f
--- /dev/null
+++ b/office/zathura-djvu/stddef.diff
@@ -0,0 +1,43 @@
+diff -Naur zathura-djvu-0.2.0/djvu.c zathura-djvu-0.2.0.patched/djvu.c
+--- zathura-djvu-0.2.0/djvu.c 2012-06-09 17:37:36.000000000 -0400
++++ zathura-djvu-0.2.0.patched/djvu.c 2012-07-24 00:00:01.000000000 -0400
+@@ -3,6 +3,7 @@
+ #include <stdlib.h>
+ #include <girara/datastructures.h>
+ #include <string.h>
++#include <stddef.h>
+ #include <libdjvu/miniexp.h>
+ #include <glib.h>
+
+diff -Naur zathura-djvu-0.2.0/djvu.h zathura-djvu-0.2.0.patched/djvu.h
+--- zathura-djvu-0.2.0/djvu.h 2012-06-09 17:37:36.000000000 -0400
++++ zathura-djvu-0.2.0.patched/djvu.h 2012-07-24 00:00:09.000000000 -0400
+@@ -5,6 +5,7 @@
+
+ #include <stdbool.h>
+ #include <zathura/plugin-api.h>
++#include <stddef.h>
+ #include <libdjvu/ddjvuapi.h>
+ #ifdef HAVE_CAIRO
+ #include <cairo.h>
+diff -Naur zathura-djvu-0.2.0/page-text.c zathura-djvu-0.2.0.patched/page-text.c
+--- zathura-djvu-0.2.0/page-text.c 2012-06-09 17:37:36.000000000 -0400
++++ zathura-djvu-0.2.0.patched/page-text.c 2012-07-24 00:00:18.000000000 -0400
+@@ -1,5 +1,6 @@
+ /* See LICENSE file for license and copyright information */
+
++#include <stddef.h>
+ #include <libdjvu/miniexp.h>
+ #include <string.h>
+ #include <sys/types.h>
+diff -Naur zathura-djvu-0.2.0/page-text.h zathura-djvu-0.2.0.patched/page-text.h
+--- zathura-djvu-0.2.0/page-text.h 2012-06-09 17:37:36.000000000 -0400
++++ zathura-djvu-0.2.0.patched/page-text.h 2012-07-24 00:00:26.000000000 -0400
+@@ -6,6 +6,7 @@
+ #include <girara/datastructures.h>
+ #include <girara/macros.h>
+ #include <zathura/document.h>
++#include <stddef.h>
+ #include <libdjvu/miniexp.h>
+
+ #include "djvu.h"
diff --git a/office/zathura-djvu/zathura-djvu.SlackBuild b/office/zathura-djvu/zathura-djvu.SlackBuild
new file mode 100644
index 0000000000..f85099bdbd
--- /dev/null
+++ b/office/zathura-djvu/zathura-djvu.SlackBuild
@@ -0,0 +1,74 @@
+#!/bin/bash
+
+# Slackware build script for zathura-djvu
+
+# Written by B. Watson (yalhcru@gmail.com)
+
+# Licensed under the WTFPL. See http://sam.zoy.org/wtfpl/ for details.
+
+PRGNAM=zathura-djvu
+VERSION=${VERSION:-0.2.0}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+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"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -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 {} \;
+
+# the djvulibre package in Slackware 13.37 has a miniexp.h that doesn't include
+# stddef.h, so applications need to include it themselves.
+patch -p1 < $CWD/stddef.diff
+
+sed -i "s,-fPIC,$SLKCFLAGS," config.mk
+
+make VERBOSE=1
+strip *.so
+make install DESTDIR=$PKG
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a AUTHORS LICENSE $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/office/zathura-djvu/zathura-djvu.info b/office/zathura-djvu/zathura-djvu.info
new file mode 100644
index 0000000000..ef64bd4fa6
--- /dev/null
+++ b/office/zathura-djvu/zathura-djvu.info
@@ -0,0 +1,10 @@
+PRGNAM="zathura-djvu"
+VERSION="0.2.0"
+HOMEPAGE="http://www.pwmt.org/projects/zathura/plugins/zathura-djvu/"
+DOWNLOAD="http://www.pwmt.org/projects/zathura/plugins/download/zathura-djvu-0.2.0.tar.gz"
+DOWNLOAD_x86_64=""
+MD5SUM="5358fc3c89a10016061637f1ca38f1cf"
+MD5SUM_x86_64=""
+MAINTAINER="B. Watson"
+EMAIL="yalhcru@gmail.com"
+APPROVED="rworkman"