From 1af9679b2710b7d69e1de0ca41439ca4685b1259 Mon Sep 17 00:00:00 2001 From: Ivan Trepakov Date: Sat, 25 Oct 2025 16:28:27 +0700 Subject: [PATCH 1/4] ghcup: Update build recipe **Summary** - Update build recipe to use `%haskell-*` macros instead of raw cabal as discussed at https://github.com/getsolus/packages/pull/6540#issuecomment-3425214110 - Disable parallel build due to weird bug in cabal/ghc - Replace `.cabal` patch file with `--constraint` argument - Enable running tests by explicitly providing `hspec-discover` --- .../g/ghcup/files/0001-Brick-version-fix.patch | 11 ----------- packages/g/ghcup/package.yml | 14 +++++++++----- packages/g/ghcup/pspec_x86_64.xml | 3 ++- 3 files changed, 11 insertions(+), 17 deletions(-) delete mode 100644 packages/g/ghcup/files/0001-Brick-version-fix.patch diff --git a/packages/g/ghcup/files/0001-Brick-version-fix.patch b/packages/g/ghcup/files/0001-Brick-version-fix.patch deleted file mode 100644 index fb23a6b39fa..00000000000 --- a/packages/g/ghcup/files/0001-Brick-version-fix.patch +++ /dev/null @@ -1,11 +0,0 @@ -*** a/ghcup.cabal 2025-05-16 23:41:16.000000000 +0700 ---- b/ghcup.cabal 2025-10-15 23:34:40.582522121 +0700 -*************** library ghcup-tui -*** 402,404 **** - , ghcup -! , brick >=2.1 && <2.8 - , vty ^>=6.0 || ^>=6.1 || ^>=6.2 ---- 402,404 ---- - , ghcup -! , brick >=2.5 && <2.8 - , vty ^>=6.0 || ^>=6.1 || ^>=6.2 diff --git a/packages/g/ghcup/package.yml b/packages/g/ghcup/package.yml index 63b84fc6565..e299422a03c 100644 --- a/packages/g/ghcup/package.yml +++ b/packages/g/ghcup/package.yml @@ -19,10 +19,14 @@ rundeps : - libffi-devel - ncurses-devel setup : | - %patch -p1 -i $pkgfiles/0001-Brick-version-fix.patch - %cabal_configure -f+tar -f+tui --enable-tests + %cabal_configure -f+tar -f+tui --enable-tests \ + --constraint='brick >=2.5 && <2.8' + cabal install hspec-discover + cp "$HOME/.cabal/bin/hspec-discover" /usr/bin/hspec-discover build : | - cabal build %JOBS% + %haskell_build -j1 install : | - mkdir -p $installdir/usr/bin - cabal install --installdir=$installdir/usr/bin --install-method=copy exe:ghcup + %haskell_install exe:ghcup + rm -rf $installdir/%libdir% +check : | + %haskell_check diff --git a/packages/g/ghcup/pspec_x86_64.xml b/packages/g/ghcup/pspec_x86_64.xml index c39ea479b30..92b8e3a5bc0 100644 --- a/packages/g/ghcup/pspec_x86_64.xml +++ b/packages/g/ghcup/pspec_x86_64.xml @@ -21,6 +21,7 @@ programming.haskell /usr/bin/ghcup + /usr/share/doc/ghcup/LICENSE @@ -32,4 +33,4 @@ liontiger23@gmail.com - \ No newline at end of file + From 53c38c8bda3583d9de2013d014abaff413810500 Mon Sep 17 00:00:00 2001 From: Ivan Trepakov Date: Sat, 25 Oct 2025 17:48:31 +0700 Subject: [PATCH 2/4] pandoc: Update build recipe **Summary** - Update build recipe to use `%haskell-*` macros instead of raw cabal as discussed at https://github.com/getsolus/packages/pull/6540#issuecomment-3425214110 - Switch to hackage source for `pandoc-cli` specifically instead of whole pandoc repo --- .../0001-upstream-test-fix-before-3.8.1.patch | 52 ------------------- packages/p/pandoc/package.yml | 22 ++++---- packages/p/pandoc/pspec_x86_64.xml | 3 +- 3 files changed, 14 insertions(+), 63 deletions(-) delete mode 100644 packages/p/pandoc/files/0001-upstream-test-fix-before-3.8.1.patch diff --git a/packages/p/pandoc/files/0001-upstream-test-fix-before-3.8.1.patch b/packages/p/pandoc/files/0001-upstream-test-fix-before-3.8.1.patch deleted file mode 100644 index 63332d06b32..00000000000 --- a/packages/p/pandoc/files/0001-upstream-test-fix-before-3.8.1.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 643712ca70b924c0edcc059699aa1ee42234be34 Mon Sep 17 00:00:00 2001 -From: John MacFarlane -Date: Fri, 19 Sep 2025 10:15:32 +0200 -Subject: [PATCH] LaTeX writer: avoid `\_` in bibliography variable. - -Since underscores are common in filenames, and pandoc will -render strings to variables using default LaTeX escaping, we -special-case `bibliography`, under the assumption that this variable -will be used in the context of the `\bibliography{..}` command, -which accepts unescaped underscores. - -Closes #11152. ---- - src/Text/Pandoc/Writers/LaTeX.hs | 10 +++++++++- - test/djot-reader.native | 2 +- - 2 files changed, 10 insertions(+), 2 deletions(-) - -diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs -index 24ed4bebc84e..14c8de08a160 100644 ---- a/src/Text/Pandoc/Writers/LaTeX.hs -+++ b/src/Text/Pandoc/Writers/LaTeX.hs -@@ -215,7 +215,15 @@ pandocToLaTeX options (Pandoc meta blocks) = do - _ -> []) - $ lookupMetaInlines "nocite" meta - -- let context = defField "toc" (writerTableOfContents options) $ -+ -- see #7414, avoid escaped underscores -+ let unescapeUnderscore = T.replace "\\_" "_" -+ let bibliography' = map unescapeUnderscore <$> -+ getField "bibliography" metadata -+ -+ let context = (case bibliography' of -+ Nothing -> id -+ Just xs -> resetField "bibliography" xs) $ -+ defField "toc" (writerTableOfContents options) $ - defField "lof" (writerListOfFigures options) $ - defField "lot" (writerListOfTables options) $ - defField "toc-depth" (tshow -diff --git a/test/djot-reader.native b/test/djot-reader.native -index edd1323a534a..bd0ae351ff9a 100644 ---- a/test/djot-reader.native -+++ b/test/djot-reader.native -@@ -98,7 +98,7 @@ Pandoc - [ Para [ Str "Code in a block quote:" ] - , CodeBlock - ( "" , [ "" ] , [] ) -- "sub status {\nprint \"working\";\n}\n" -+ "sub status {\n print \"working\";\n}\n" - , Para [ Str "A list:" ] - , OrderedList - ( 1 , Decimal , Period ) - diff --git a/packages/p/pandoc/package.yml b/packages/p/pandoc/package.yml index fcc7df69f6c..a3e636a5bc7 100644 --- a/packages/p/pandoc/package.yml +++ b/packages/p/pandoc/package.yml @@ -2,7 +2,7 @@ name : pandoc version : 3.7.0.2 release : 11 source : - - https://github.com/jgm/pandoc/archive/refs/tags/3.7.0.2.tar.gz : a098c1dc8051844e3992f8396c6c947dccbc57b6ca3df2f2c47b9f7fa9f11246 + - https://hackage.haskell.org/package/pandoc-cli-3.7.0.2/pandoc-cli-3.7.0.2.tar.gz : ff4dcab86cfa5291ba11a14d14fef49ddf494c549bdd01b6752ed6a8043c3d3d homepage : https://pandoc.org license : BSD-3-Clause component : office @@ -14,16 +14,18 @@ builddeps : - haskell-cabal-install networking : true setup : | - %patch -p1 -i $pkgfiles/0001-upstream-test-fix-before-3.8.1.patch + export CABAL_DIR="$HOME/.cabal" + export GHCV=$(ghc --numeric-version) cabal update - cabal configure -O2 %JOBS% \ - --disable-executable-dynamic \ - --ghc-options="-H512m %JOBS%" \ - -f embed_data_files + cabal build %JOBS% --only-dependencies --disable-tests -O2 --ghc-options="-H128m %JOBS%" \ + --constraint="crypton-x509-store == 1.6.11" \ + --constraint="pandoc +embed_data_files" + %haskell_configure --disable-executable-dynamic \ + --package-db=$HOME/.cabal/store/ghc-$GHCV/package.db build : | - cabal build pandoc-cli + %haskell_build install : | - mkdir -p $installdir/usr/bin - cabal install --installdir=$installdir/usr/bin --install-method=copy pandoc-cli + %haskell_install + rm -rf $installdir/{%libdir%,usr/share/pandoc} check : | - cabal test + %haskell_check diff --git a/packages/p/pandoc/pspec_x86_64.xml b/packages/p/pandoc/pspec_x86_64.xml index 56e474f6b35..be977153c4c 100644 --- a/packages/p/pandoc/pspec_x86_64.xml +++ b/packages/p/pandoc/pspec_x86_64.xml @@ -21,6 +21,7 @@ office /usr/bin/pandoc + /usr/share/doc/pandoc/COPYING.md @@ -32,4 +33,4 @@ liontiger23@gmail.com - \ No newline at end of file + From 7dafdc716acd6613320a8b0a4d773c2ed6b9871b Mon Sep 17 00:00:00 2001 From: Ivan Trepakov Date: Sat, 25 Oct 2025 19:21:10 +0700 Subject: [PATCH 3/4] pandoc-crossref: Update build recipe **Summary** - Switch to hackage source for `pandoc-crossref` to avoid ugly hack with rm of `cabal.project.freeze` --- packages/p/pandoc-crossref/package.yml | 5 ++--- packages/p/pandoc-crossref/pspec_x86_64.xml | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/p/pandoc-crossref/package.yml b/packages/p/pandoc-crossref/package.yml index 824e47f7636..3f2939667ba 100644 --- a/packages/p/pandoc-crossref/package.yml +++ b/packages/p/pandoc-crossref/package.yml @@ -2,7 +2,7 @@ name : pandoc-crossref version : 0.3.20 release : 8 source : - - https://github.com/lierdakil/pandoc-crossref/archive/refs/tags/v0.3.20.tar.gz : 935d66e4b52323aba625b2bfa90abfea774816ccf4feb959e8271beac6d9b453 + - https://hackage.haskell.org/package/pandoc-crossref-0.3.20/pandoc-crossref-0.3.20.tar.gz : ca8f548209cb5c7a0e0634f187ddee9ead134843acd404b1f7486d4f5babcf81 homepage : https://lierdakil.github.io/pandoc-crossref/ license : GPL-2.0-only component : office @@ -16,8 +16,7 @@ rundeps : - pandoc networking : true setup : | - rm $workdir/cabal.project.freeze - %cabal_configure --enable-tests + %cabal_configure --constraint="crypton-x509-store == 1.6.11" --enable-tests build : | %haskell_build install : | diff --git a/packages/p/pandoc-crossref/pspec_x86_64.xml b/packages/p/pandoc-crossref/pspec_x86_64.xml index c9d803d6c9c..910f02b99f5 100644 --- a/packages/p/pandoc-crossref/pspec_x86_64.xml +++ b/packages/p/pandoc-crossref/pspec_x86_64.xml @@ -33,4 +33,4 @@ liontiger23@gmail.com - \ No newline at end of file + From ac038c9d372b9b27d74881081bf2939a2364cf79 Mon Sep 17 00:00:00 2001 From: Ivan Trepakov Date: Tue, 28 Oct 2025 12:39:12 +0700 Subject: [PATCH 4/4] sv2v: Update build recipe **Summary** - Update build recipe to use `%haskell-*` macros instead of raw cabal as discussed at https://github.com/getsolus/packages/pull/6540#issuecomment-3425214110 - Tests are disabled because they require following dependencies - [Icarus Verilog](https://steveicarus.github.io/iverilog/) - for Verilog simulation - [shUnit2](https://github.com/kward/shunit2) - test framework --- packages/s/sv2v/package.yml | 11 +++++++---- packages/s/sv2v/pspec_x86_64.xml | 4 +++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/packages/s/sv2v/package.yml b/packages/s/sv2v/package.yml index b7996b49af5..d359a13b405 100644 --- a/packages/s/sv2v/package.yml +++ b/packages/s/sv2v/package.yml @@ -14,10 +14,13 @@ builddeps : - ghc - haskell-cabal-install setup : | + export CABAL_DIR="$HOME/.cabal" cabal update - cabal configure -O2 %JOBS% --disable-executable-dynamic + cabal install alex happy + cp "$HOME/.cabal/bin/alex" "$HOME/.cabal/bin/happy" /usr/bin + %cabal_configure build : | - cabal build exe:sv2v + %haskell_build install : | - mkdir -p $installdir/usr/bin - cabal install exe:sv2v --installdir=$installdir/usr/bin --install-method=copy + %haskell_install exe:sv2v + rm -rf $installdir/%libdir% diff --git a/packages/s/sv2v/pspec_x86_64.xml b/packages/s/sv2v/pspec_x86_64.xml index f01706b38c3..dc5abe90290 100644 --- a/packages/s/sv2v/pspec_x86_64.xml +++ b/packages/s/sv2v/pspec_x86_64.xml @@ -21,6 +21,8 @@ programming.tools /usr/bin/sv2v + /usr/share/doc/sv2v/LICENSE + /usr/share/doc/sv2v/NOTICE @@ -32,4 +34,4 @@ liontiger23@gmail.com - \ No newline at end of file +