mirror of
https://github.com/ivabus/pantry
synced 2024-11-23 00:45:07 +03:00
26fe5bd2c2
* fix(pandoc) closes #5245 * binutils needs gcc * this is fiddly * hmmm * try a different way * i am grumpy * wip * wip * wip * wip * wip * test * try haskell 9.6 * or 9.8
73 lines
1.9 KiB
YAML
73 lines
1.9 KiB
YAML
distributable:
|
|
#FIXME: pandoc and pandoc-cli have been split :/
|
|
# url: https://hackage.haskell.org/package/pandoc-cli{{ version }}/pandoc-cli-{{ version }}.tar.gz
|
|
url: https://github.com/jgm/pandoc/archive/refs/tags/{{ version }}.tar.gz
|
|
strip-components: 1
|
|
|
|
#FIXME pandoc has 4 digit versions : /
|
|
# so we miss a whole bunch
|
|
versions:
|
|
github: jgm/pandoc
|
|
strip: /^pandoc /
|
|
|
|
provides:
|
|
- bin/pandoc
|
|
|
|
dependencies:
|
|
gnu.org/gmp: 6
|
|
zlib.net: 1
|
|
sourceware.org/libffi: 3
|
|
|
|
build:
|
|
dependencies:
|
|
haskell.org: '>=8.6.5'
|
|
haskell.org/cabal: ^3
|
|
crates.io/semverator: ^0
|
|
working-directory: pandoc-cli
|
|
script:
|
|
# FIXME: these are seriously hacky; we need to understand how to tweak ghc's `settings`
|
|
# file better
|
|
# it really wants ld.bfd or ld.gold, but those both bring in a host of compiler matching
|
|
# issues, so we'll just do a trick
|
|
- run: |
|
|
mkdir .fakebin
|
|
cat $PROP > .fakebin/ld.bfd
|
|
cat $PROP > .fakebin/ld.gold
|
|
chmod +x .fakebin/*
|
|
export PATH=$PWD/.fakebin:$PATH
|
|
prop: |
|
|
#!/bin/sh
|
|
ld.lld "$@"
|
|
if: linux
|
|
|
|
# pandoc 2.x - no pandoc-cli subdirectory
|
|
- run: cd ..
|
|
if: <3
|
|
|
|
- cabal update
|
|
- mkdir -p {{prefix}}/bin
|
|
# digest versions above 0.0.1.4 have RPATH issues for us.
|
|
- run: |
|
|
sed -i.bak -e's/text$/text, digest <0.0.1.4/' pandoc-cli.cabal
|
|
rm pandoc-cli.cabal.bak
|
|
- cabal v2-install $ARGS
|
|
env:
|
|
ARGS:
|
|
- --install-method=copy
|
|
- --installdir={{prefix}}/bin
|
|
- --jobs={{hw.concurrency}}
|
|
# https://pandoc.org/installing.html#creating-a-relocatable-binary
|
|
- -fembed_data_files
|
|
linux:
|
|
ARGS:
|
|
# else segfaults
|
|
- --enable-relocatable
|
|
- --ghc-option=-fPIC
|
|
- --ghc-option=-optl=-pie
|
|
|
|
test:
|
|
fixture: |
|
|
# tea
|
|
brew2 for you
|
|
script: pandoc -f markdown -t html5 $FIXTURE
|
|
#TODO check output is HTML!
|