summaryrefslogtreecommitdiff
path: root/pcr/pandoc/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'pcr/pandoc/PKGBUILD')
-rw-r--r--pcr/pandoc/PKGBUILD51
1 files changed, 29 insertions, 22 deletions
diff --git a/pcr/pandoc/PKGBUILD b/pcr/pandoc/PKGBUILD
index 0d2f2d8ea..49fcabcfe 100644
--- a/pcr/pandoc/PKGBUILD
+++ b/pcr/pandoc/PKGBUILD
@@ -5,36 +5,29 @@
pkgname=pandoc-static
_pkgname=pandoc
-pkgver=1.12
+pkgver=1.12.1
pkgrel=1
pkgdesc='Conversion between markup formats (no Haskell libs)'
url='http://johnmacfarlane.net/pandoc/'
license=('GPL')
arch=('i686' 'x86_64')
+# Needed for pandoc-citeproc
+depends=('icu>=52' 'icu<=53')
makedepends=('ghc' 'sh' 'cabal-install' 'alex' 'happy')
options=(strip !makeflags !distcc !emptydirs)
-#source=(https://repo.parabolagnulinux.org/other/${_pkgname}-${pkgver}-$pkgrel-any.src.tar.xz{,.sig}
source=(https://repo.parabolagnulinux.org/other/${_pkgname}-${pkgver}-1-any.src.tar.xz{,.sig}
SRCBUILD)
-# citeproc-hs-pre-0.3.7.patch)
replaces=('pandoc')
provides=('pandoc')
optdepends=('texlive-most: for pdf creation')
-md5sums=('3d5f23060cad2ff29ba2df5651e92f8a'
- 'SKIP'
- 'c2e9f9b880468455b6e6a7f9ba7308e8')
# PKGBUILD functions
build() {
- mkdir -p ${srcdir}/{build,${_pkgname}-${pkgver}}
- cd ${srcdir}/${_pkgname}-${pkgver}
+ mkdir -p ${srcdir}/{build,${_pkgname}-${pkgver}}
+ cd ${srcdir}/${_pkgname}-${pkgver}
-# Patches from the next citeproc-hs release
-# These are needed because 0.3.6 with embed_data_files is broken
-# darcs diff --from-tag=0.3.6
-# pushd ${srcdir}/${_pkgname}-${pkgver}/citeproc-hs-0.3.6
-# patch -Np1 -i ${srcdir}/citeproc-hs-pre-0.3.7.patch
-# popd
+# pandoc-citeproc needs hsb2hs
+ export PATH=${srcdir}/build/usr/bin:$PATH
while read _hkpkg; do
# Skip already built
@@ -47,23 +40,29 @@ build() {
case $_hkpkg in
$_pkgname-$pkgver)
HOME=${srcdir}/${_pkgname}-${pkgver} \
- cabal configure --flags='-library' \
- --prefix=/usr \
+ cabal configure --prefix=/usr \
--libdir=${srcdir}/build/usr/lib -v
HOME=${srcdir}/${_pkgname}-${pkgver} \
cabal build
+
+ HOME=${srcdir}/${_pkgname}-${pkgver} \
+ cabal register --inplace
;;
- citeproc-hs-*)
+ pandoc-citeproc*)
+ HOME=${srcdir}/${_pkgname}-${pkgver} \
+ cabal configure --flags='small_base embed_data_files bibutils hexpat unicode_collation' \
+ --libdir=${srcdir}/build/usr/lib \
+ --prefix=/usr -v
+
HOME=${srcdir}/${_pkgname}-${pkgver} \
- cabal install --flags='embed_data_files' \
- --prefix=${srcdir}/build/usr -v
+ cabal build
;;
*)
HOME=${srcdir}/${_pkgname}-${pkgver} \
- cabal install --prefix=${srcdir}/build/usr
+ cabal install --prefix=${srcdir}/build/usr --flags="embed_data_files"
;;
esac
@@ -77,11 +76,16 @@ package() {
runghc Setup.hs copy --destdir=${pkgdir}/
+ cd ${srcdir}/${_pkgname}-${pkgver}/pandoc-citeproc*
+ runghc Setup.hs copy --destdir=${pkgdir}/
+
# For some reason the library is installed anyway
# Remove all files and !emptydirs takes care of the rest
msg2 "Removing lib files..."
find ${pkgdir} -iname lib -print0 | xargs -0 rm -rvf
+ cp -av ${srcdir}/build/usr/bin/* ${pkgdir}/usr/bin/
+
# EC is unfree and makes Parabola TeXLive cry
# besides, it's unneeded
sed "/fontenc/d" -i ${pkgdir}/usr/share/${_pkgname}-${pkgver}/data/templates/default.latex
@@ -90,6 +94,9 @@ package() {
find ${pkgdir}/usr/share -type d -exec chmod 755 {} \;
msg2 "Installing licenses"
- install -d ${pkgdir}/usr/share
- cp -rv ${srcdir}/build/usr/share/doc ${pkgdir}/usr/share/
+ install -d ${pkgdir}/usr/share/licenses
+ cp -rv ${srcdir}/build/usr/share/doc/* ${pkgdir}/usr/share/licenses/
}
+sha256sums=('4cbeb1b112985961ff78b9baaa4cca3b24e5996c243c790fa00bbe44052cd418'
+ 'SKIP'
+ '25fae3ded388733915dbaca9970ac5f5ef53883410564305bd225a950e5951db')