From 7e3f73b7e3ca99d762f6096333c77c61e27fac21 Mon Sep 17 00:00:00 2001 From: Jacob Heider Date: Sat, 4 May 2024 21:50:57 -0400 Subject: [PATCH] fix(pandoc-crossref) closes #6061 --- projects/haskell.org/cabal/package.yml | 17 +++++++++++--- projects/pandoc.org/crossref/package.yml | 28 ++++++++++++++++++------ 2 files changed, 35 insertions(+), 10 deletions(-) diff --git a/projects/haskell.org/cabal/package.yml b/projects/haskell.org/cabal/package.yml index 035f81e5..2ed74397 100644 --- a/projects/haskell.org/cabal/package.yml +++ b/projects/haskell.org/cabal/package.yml @@ -16,7 +16,7 @@ provides: build: dependencies: - haskell.org: 9.6.3 # later version pass invalid linker flags on darwin clang-14 + haskell.org: <9.6.4 # later versions pass invalid linker flags on darwin clang-14 curl.se: '*' linux/aarch64: github.com/numactl/numactl: ^2 # downloaded cabal needs this @@ -26,6 +26,19 @@ build: - run: export HOME="$(mktemp -d)" if: linux + # FIXME: this isn't great, but it'll fix any ghc install at build time + # needs install-time customization for a true fix + - run: | + 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 + - run: | if test ! -e .bootstrap/cabal; then if test ! -e .bootstrap; then @@ -47,8 +60,6 @@ build: - | sed -i \ -e 's/build-depends: base.*/build-depends: base >=4.10 \&\& <5/' \ - -e 's/text.*>=.*/text >= 1.2.3 \&\& < 3,/' \ - -e 's/zlib.*< .*/zlib >= 0.5.3 \&\& < 0.7,/' \ cabal-install.cabal # ^^ SEE https://github.com/haskell/cabal/issues/8118 - mkdir -p "{{prefix}}/bin" diff --git a/projects/pandoc.org/crossref/package.yml b/projects/pandoc.org/crossref/package.yml index 3239195a..2ce306df 100644 --- a/projects/pandoc.org/crossref/package.yml +++ b/projects/pandoc.org/crossref/package.yml @@ -13,15 +13,29 @@ dependencies: build: dependencies: - haskell.org: ^9 + haskell.org: <9.6.4 # later versions pass invalid linker flags on darwin clang-14 haskell.org/cabal: ^3 openssl.org: ^1.1 - script: |- - cabal update - mkdir -p "{{prefix}}/bin" - cabal install --install-method=copy --installdir={{prefix}}/bin + script: + # FIXME: this isn't great, but it'll fix any ghc install at build time + # needs install-time customization for a true fix + - run: | + 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 -test: true #FIXME + - cabal update + - mkdir -p "{{prefix}}/bin" + - cabal install --install-method=copy --installdir={{prefix}}/bin + +test: + - 'true' #FIXME provides: - - bin/pandoc-crossref \ No newline at end of file + - bin/pandoc-crossref