diff options
Diffstat (limited to 'office/pandoc')
-rw-r--r-- | office/pandoc/README | 19 | ||||
-rw-r--r-- | office/pandoc/doinst.sh | 1 | ||||
-rw-r--r-- | office/pandoc/pandoc-1.3-parsec3.patch | 11 | ||||
-rw-r--r-- | office/pandoc/pandoc.SlackBuild | 52 | ||||
-rw-r--r-- | office/pandoc/pandoc.info | 8 | ||||
-rw-r--r-- | office/pandoc/slack-desc | 8 |
6 files changed, 50 insertions, 49 deletions
diff --git a/office/pandoc/README b/office/pandoc/README index 78f37763ea22d..b093ad30a76e2 100644 --- a/office/pandoc/README +++ b/office/pandoc/README @@ -1,13 +1,14 @@ 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. +and LaTeX, and it can write plain text, markdown, reStructuredText, +HTML, LaTeX, ConTeXt, PDF, RTF, DocBook XML, OpenDocument XML, +ODT, GNU Texinfo, MediaWiki markup, groff man pages, EPUB ebooks, +and S5 and Slidy HTML slide shows. PDF output (via LaTeX) is also supported +with the included markdown2pdf wrapper script. -This requires ghc, haskell-binary, haskell-digest, haskell-zlib, -haskell-zip-archive, haskell-mtl, haskell-parsec, haskell-xhtml, and -haskell-network. +This requires ghc, haskell-binary, haskell-mtl, haskell-digest, haskell-zlib, +haskell-utf8-string, haskell-zip-archive, haskell-parsec, haskell-xml, +haskell-texmath, haskell-xhtml, haskell-network and haskell-HTTP. -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. +When uninstalling, run this command to unregister the package from the ghc +package database: ghc-pkg recache diff --git a/office/pandoc/doinst.sh b/office/pandoc/doinst.sh new file mode 100644 index 0000000000000..3268c238bf735 --- /dev/null +++ b/office/pandoc/doinst.sh @@ -0,0 +1 @@ +chroot . /usr/bin/ghc-pkg recache diff --git a/office/pandoc/pandoc-1.3-parsec3.patch b/office/pandoc/pandoc-1.3-parsec3.patch deleted file mode 100644 index 2e5f0df88757b..0000000000000 --- a/office/pandoc/pandoc-1.3-parsec3.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- 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 index 4c4c991505813..d39d2223915fd 100644 --- a/office/pandoc/pandoc.SlackBuild +++ b/office/pandoc/pandoc.SlackBuild @@ -3,18 +3,19 @@ # Slackware build script for pandoc # Written by Peter Wang <novalazy@gmail.com> +# Public domain. PRGNAM=pandoc -VERSION=${VERSION:-1.3} +VERSION=${VERSION:-1.6} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} -# Automatically determine the architecture we're building on: +GHC_VERSION=$(ghc --numeric-version) + if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i486 ;; arm*) ARCH=arm ;; - # Unless $ARCH is already set, use uname -m for all other archs: *) ARCH=$( uname -m ) ;; esac fi @@ -25,10 +26,13 @@ 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" @@ -50,31 +54,37 @@ find . \ \( -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 +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +runghc Setup.hs configure \ + --prefix=/usr \ + --enable-shared \ + --libdir=/usr/lib$LIBDIRSUFFIX \ + --libsubdir=ghc-$GHC_VERSION/$PRGNAM-$VERSION \ + --docdir=/usr/doc/$PRGNAM-$VERSION + +runghc Setup.hs build +runghc Setup.hs haddock +runghc Setup.hs copy --destdir=$PKG +runghc Setup.hs register --gen-pkg-config -make install \ - PREFIX=/usr \ - DESTDIR=$PKG \ - DATAPATH=$PKG/usr \ - DOCDIR=doc/$PRGNAM-$VERSION +mv $PKG/usr/share/man $PKG/usr/man +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 -( 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 -) +PKGCONFD=/usr/lib${LIBDIRSUFFIX}/ghc-${GHC_VERSION}/package.conf.d +PKGID=$( grep -E "^id: " $PRGNAM-$VERSION.conf | cut -d" " -f2 ) +mkdir -p $PKG/$PKGCONFD +mv $PRGNAM-$VERSION.conf $PKG/$PKGCONFD/$PKGID.conf mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a changelog COPYRIGHT COPYING $PKG/usr/doc/$PRGNAM-$VERSION +mv $PKG/usr/share/$PRGNAM-$VERSION/{BUGS,COPYRIGHT,README,changelog} \ + $PKG/usr/doc/$PRGNAM-$VERSION +rm $PKG/usr/share/$PRGNAM-$VERSION/INSTALL cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install +cat $CWD/doinst.sh > $PKG/install/doinst.sh cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG diff --git a/office/pandoc/pandoc.info b/office/pandoc/pandoc.info index f2f8604b2cf5e..f942e15e08010 100644 --- a/office/pandoc/pandoc.info +++ b/office/pandoc/pandoc.info @@ -1,10 +1,10 @@ PRGNAM="pandoc" -VERSION="1.3" +VERSION="1.6" HOMEPAGE="http://johnmacfarlane.net/pandoc/" -DOWNLOAD="http://pandoc.googlecode.com/files/pandoc-1.3.tar.gz" -MD5SUM="a19d51312d61ffb629adaa4d42b88cb9" +DOWNLOAD="http://pandoc.googlecode.com/files/pandoc-1.6.tar.gz" +MD5SUM="d7682167664e0e8f60268e491f1330ce" DOWNLOAD_x86_64="" MD5SUM_x86_64="" MAINTAINER="Peter Wang" EMAIL="novalazy@gmail.com" -APPROVED="rworkman" +APPROVED="dsomero" diff --git a/office/pandoc/slack-desc b/office/pandoc/slack-desc index 1b1f78cf988ad..f4191ae6658e5 100644 --- a/office/pandoc/slack-desc +++ b/office/pandoc/slack-desc @@ -10,10 +10,10 @@ 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: and LaTeX, and it can write plain text, markdown, reStructuredText, +pandoc: HTML, LaTeX, ConTeXt, PDF, RTF, DocBook XML, OpenDocument XML, +pandoc: ODT, GNU Texinfo, MediaWiki markup, groff man pages, EPUB ebooks, +pandoc: and S5 and Slidy HTML slide shows. pandoc: pandoc: pandoc: |