2022-08-23 04:45:08 +03:00
|
|
|
distributable:
|
2023-04-10 05:00:03 +03:00
|
|
|
#FIXME: pandoc and pandoc-cli have been split :/
|
|
|
|
# url: https://hackage.haskell.org/package/pandoc-cli{{ version }}/pandoc-cli-{{ version }}.tar.gz
|
2024-06-14 01:14:55 +03:00
|
|
|
url: https://github.com/jgm/pandoc/archive/refs/tags/{{ version.tag }}.tar.gz
|
2022-08-23 04:45:08 +03:00
|
|
|
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
|
2022-12-02 02:19:23 +03:00
|
|
|
sourceware.org/libffi: 3
|
2022-08-23 04:45:08 +03:00
|
|
|
|
|
|
|
build:
|
|
|
|
dependencies:
|
2024-06-14 01:14:55 +03:00
|
|
|
haskell.org: ~9.4
|
2022-08-23 04:45:08 +03:00
|
|
|
haskell.org/cabal: ^3
|
2023-04-10 05:00:03 +03:00
|
|
|
working-directory: pandoc-cli
|
2023-10-28 09:14:01 +03:00
|
|
|
script:
|
|
|
|
# pandoc 2.x - no pandoc-cli subdirectory
|
|
|
|
- run: cd ..
|
|
|
|
if: <3
|
2023-04-10 05:00:03 +03:00
|
|
|
|
2023-10-28 09:14:01 +03:00
|
|
|
- cabal update
|
|
|
|
- mkdir -p {{prefix}}/bin
|
2024-06-14 01:14:55 +03:00
|
|
|
|
|
|
|
# FIXME: this isn't great, but it'll fix any ghc install at build time
|
|
|
|
# needs install-time customization for a true fix
|
2023-10-28 09:14:01 +03:00
|
|
|
- run: |
|
2024-06-14 01:14:55 +03:00
|
|
|
if ! grep -q 'rpath,{{pkgx.prefix}}' settings; then
|
|
|
|
sed -i \
|
|
|
|
-e 's|\(C compiler flags.*\)")|\1 -Wl,-rpath,{{pkgx.prefix}}")|' \
|
|
|
|
-e 's|\(C++ compiler flags.*\)")|\1 -Wl,-rpath,{{pkgx.prefix}}")|' \
|
|
|
|
-e 's|\(C compiler link flags.*\)")|\1 -Wl,-rpath,{{pkgx.prefix}}")|' \
|
|
|
|
settings
|
|
|
|
fi
|
|
|
|
if: darwin
|
|
|
|
working-directory: ${{deps.haskell.org.prefix}}/.ghcup/ghc/{{deps.haskell.org.version}}/lib/ghc-{{deps.haskell.org.version}}/lib
|
|
|
|
|
2023-10-28 09:14:01 +03:00
|
|
|
- cabal v2-install $ARGS
|
2024-06-14 01:14:55 +03:00
|
|
|
# else x86-64 segfaults
|
|
|
|
skip: fix-patchelf
|
2022-08-23 04:45:08 +03:00
|
|
|
env:
|
|
|
|
ARGS:
|
|
|
|
- --install-method=copy
|
|
|
|
- --installdir={{prefix}}/bin
|
2023-02-14 06:08:18 +03:00
|
|
|
- --jobs={{hw.concurrency}}
|
2023-04-10 05:00:03 +03:00
|
|
|
# https://pandoc.org/installing.html#creating-a-relocatable-binary
|
|
|
|
- -fembed_data_files
|
2023-02-14 06:08:18 +03:00
|
|
|
linux:
|
|
|
|
ARGS:
|
|
|
|
# else segfaults
|
|
|
|
- --enable-relocatable
|
2023-08-24 08:48:07 +03:00
|
|
|
- --ghc-option=-fPIC
|
|
|
|
- --ghc-option=-optl=-pie
|
2022-08-23 04:45:08 +03:00
|
|
|
|
|
|
|
test:
|
|
|
|
fixture: |
|
|
|
|
# tea
|
|
|
|
brew2 for you
|
2023-10-28 09:14:01 +03:00
|
|
|
script: pandoc -f markdown -t html5 $FIXTURE
|
2022-08-23 04:45:08 +03:00
|
|
|
#TODO check output is HTML!
|