aboutsummaryrefslogtreecommitdiff
path: root/office/pandoc
diff options
context:
space:
mode:
authorPeter Wang <novalazy@gmail.com>2010-05-13 01:00:34 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-13 01:00:34 +0200
commit8256edc1d8f162c5ac989533b039678b15fe71ea (patch)
treec8ac50bf480ca06c23f00ab565913885aad71291 /office/pandoc
parent65c913a07947069993ae096a55936915c22d53df (diff)
office/pandoc: Added to 13.0 repository
Diffstat (limited to 'office/pandoc')
-rw-r--r--office/pandoc/README13
-rw-r--r--office/pandoc/pandoc-1.3-parsec3.patch11
-rw-r--r--office/pandoc/pandoc.SlackBuild69
-rw-r--r--office/pandoc/pandoc.info10
-rw-r--r--office/pandoc/slack-desc19
5 files changed, 122 insertions, 0 deletions
diff --git a/office/pandoc/README b/office/pandoc/README
new file mode 100644
index 0000000000000..78f37763ea22d
--- /dev/null
+++ b/office/pandoc/README
@@ -0,0 +1,13 @@
+Pandoc is a command-line tool for converting from one markup format to
+another. It can read markdown and (subsets of) reStructuredText, HTML,
+and LaTeX, and it can write markdown, reStructuredText, HTML, LaTeX,
+ConTeXt, PDF, RTF, DocBook XML, OpenDocument XML, ODT, GNU Texinfo,
+MediaWiki markup, groff man pages, and S5 HTML slide shows.
+
+This requires ghc, haskell-binary, haskell-digest, haskell-zlib,
+haskell-zip-archive, haskell-mtl, haskell-parsec, haskell-xhtml, and
+haskell-network.
+
+Note: Pandoc normally refuses to build with Parsec 3 as it may perform
+more slowly. This SlackBuild includes a patch to lift that restriction.
+If you want Pandoc to perform as intended, install Parsec 2 first.
diff --git a/office/pandoc/pandoc-1.3-parsec3.patch b/office/pandoc/pandoc-1.3-parsec3.patch
new file mode 100644
index 0000000000000..2e5f0df88757b
--- /dev/null
+++ b/office/pandoc/pandoc-1.3-parsec3.patch
@@ -0,0 +1,11 @@
+--- pandoc.cabal.old 2009-12-11 17:41:57.000000000 +1100
++++ pandoc.cabal 2009-12-28 21:17:40.227991961 +1100
+@@ -149,7 +149,7 @@
+
+ Library
+ Build-Depends: pretty >= 1, containers >= 0.1,
+- parsec >= 2.1 && < 3, xhtml >= 3000.0,
++ parsec >= 2.1, xhtml >= 3000.0,
+ mtl >= 1.1, network >= 2, filepath >= 1.1,
+ process >= 1, directory >= 1, template-haskell >= 2.2,
+ bytestring >= 0.9, zip-archive >= 0.1.1,
diff --git a/office/pandoc/pandoc.SlackBuild b/office/pandoc/pandoc.SlackBuild
new file mode 100644
index 0000000000000..9cce2501efae6
--- /dev/null
+++ b/office/pandoc/pandoc.SlackBuild
@@ -0,0 +1,69 @@
+#!/bin/sh
+
+# Slackware build script for pandoc
+
+# Written by Peter Wang <novalazy@gmail.com>
+
+PRGNAM=pandoc
+VERSION=${VERSION:-1.3}
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+fi
+
+set -e # Exit on most errors
+
+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 {} \;
+
+# Pandoc explicitly requires parsec < 3 because parsec 3 can be slower (see
+# issue #116). We patch the cabal file to allow the build to proceed anyway,
+# but only if parsec 2 is not installed. Then, if both are installed, parsec 2
+# is still preferred.
+if ! ghc-pkg list --simple-output parsec | grep -q 'parsec-2'
+then
+ patch -p0 < $CWD/pandoc-1.3-parsec3.patch
+fi
+
+make install \
+ PREFIX=/usr \
+ DESTDIR=$PKG \
+ DATAPATH=$PKG/usr \
+ DOCDIR=doc/$PRGNAM-$VERSION
+
+( cd $PKG/usr/man
+ find . -type f -exec gzip -9 {} \;
+ for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
+)
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a changelog COPYRIGHT COPYING $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/pandoc/pandoc.info b/office/pandoc/pandoc.info
new file mode 100644
index 0000000000000..f2f8604b2cf5e
--- /dev/null
+++ b/office/pandoc/pandoc.info
@@ -0,0 +1,10 @@
+PRGNAM="pandoc"
+VERSION="1.3"
+HOMEPAGE="http://johnmacfarlane.net/pandoc/"
+DOWNLOAD="http://pandoc.googlecode.com/files/pandoc-1.3.tar.gz"
+MD5SUM="a19d51312d61ffb629adaa4d42b88cb9"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="Peter Wang"
+EMAIL="novalazy@gmail.com"
+APPROVED="rworkman"
diff --git a/office/pandoc/slack-desc b/office/pandoc/slack-desc
new file mode 100644
index 0000000000000..1b1f78cf988ad
--- /dev/null
+++ b/office/pandoc/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------------------------------------------------------|
+pandoc: pandoc (markup conversion tool)
+pandoc:
+pandoc: Pandoc is a command-line tool for converting from one markup format to
+pandoc: another. It can read markdown and (subsets of) reStructuredText, HTML,
+pandoc: and LaTeX, and it can write markdown, reStructuredText, HTML, LaTeX,
+pandoc: ConTeXt, PDF, RTF, DocBook XML, OpenDocument XML, ODT, GNU Texinfo,
+pandoc: MediaWiki markup, groff man pages, and S5 HTML slide shows.
+pandoc:
+pandoc:
+pandoc:
+pandoc: