[Git][haskell-team/DHG_packages][master] 2 commits: misfortune: Add patch to switch from old pcre to pcre2

Scott Talbert (@swt2c) gitlab at salsa.debian.org
Wed Sep 24 15:07:34 BST 2025



Scott Talbert pushed to branch master at Debian Haskell Group / DHG_packages


Commits:
3445107f by Jeremy Bícha at 2025-09-24T10:05:57-04:00
misfortune: Add patch to switch from old pcre to pcre2

Closes: #1061618
LP: #2103907

- - - - -
a0f8151a by Jeremy Bícha at 2025-09-24T10:05:57-04:00
misfortune: Update dependencies

- - - - -


3 changed files:

- p/haskell-misfortune/debian/control
- + p/haskell-misfortune/debian/patches/pcre2.patch
- + p/haskell-misfortune/debian/patches/series


Changes:

=====================================
p/haskell-misfortune/debian/control
=====================================
@@ -23,8 +23,8 @@ Build-Depends:
  libghc-random-fu-prof,
  libghc-regex-base-dev,
  libghc-regex-base-prof,
- libghc-regex-pcre-dev,
- libghc-regex-pcre-prof,
+ libghc-regex-pcre2-dev,
+ libghc-regex-pcre2-prof,
  libghc-utf8-string-dev,
  libghc-utf8-string-prof,
  libghc-vector-dev,
@@ -37,7 +37,7 @@ Build-Depends-Indep:
  libghc-random-doc,
  libghc-random-fu-doc,
  libghc-regex-base-doc,
- libghc-regex-pcre-doc,
+ libghc-regex-pcre2-doc,
  libghc-utf8-string-doc,
  libghc-vector-doc,
 Standards-Version: 4.7.0


=====================================
p/haskell-misfortune/debian/patches/pcre2.patch
=====================================
@@ -0,0 +1,44 @@
+From: =?utf-8?q?Jeremy_B=C3=ADcha?= <jbicha at ubuntu.com>
+Date: Tue, 23 Sep 2025 14:51:01 -0400
+Subject: Switch to pcre2
+
+---
+ misfortune.cabal | 2 +-
+ src/Fortune.hs   | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/misfortune.cabal b/misfortune.cabal
+index 8df609f..0ab676c 100644
+--- a/misfortune.cabal
++++ b/misfortune.cabal
+@@ -142,7 +142,7 @@ executable misfortune
+   other-modules:        Data.Fortune
+   build-depends:        monad-loops,
+                         regex-base,
+-                        regex-pcre
++                        regex-pcre2
+ 
+ executable misfortune-strfile
+   import:               main
+diff --git a/src/Fortune.hs b/src/Fortune.hs
+index bda6576..4b54bbf 100644
+--- a/src/Fortune.hs
++++ b/src/Fortune.hs
+@@ -23,7 +23,7 @@ import System.IO
+ import System.Random.Stateful (newIOGenM, newStdGen)
+ import Text.Printf
+ import Text.Regex.Base
+-import Text.Regex.PCRE
++import Text.Regex.PCRE2
+ 
+ versionString = "misfortune " ++ showVersion version
+ printVersion = do
+@@ -144,7 +144,7 @@ parseFilter opts opt = case opt of
+         filterRegex   _  _ Nothing       = return True
+         
+         mkRegex :: String -> Regex
+-        mkRegex = makeRegexOpts (compUTF8 + caseOpt) execBlank
++        mkRegex = makeRegexOpts (compUTF + caseOpt) matchBlank
+         
+         caseOpt = if I `elem` opts then compCaseless else 0
+         threshold = fromMaybe defaultThreshold (listToMaybe (opts >>= f))


=====================================
p/haskell-misfortune/debian/patches/series
=====================================
@@ -0,0 +1 @@
+pcre2.patch



View it on GitLab: https://salsa.debian.org/haskell-team/DHG_packages/-/compare/ed7754a343461370222128ae99078a36e96eac23...a0f8151adcc8991d0be226a4b9b842f1e1a03bdf

-- 
View it on GitLab: https://salsa.debian.org/haskell-team/DHG_packages/-/compare/ed7754a343461370222128ae99078a36e96eac23...a0f8151adcc8991d0be226a4b9b842f1e1a03bdf
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-haskell-commits/attachments/20250924/fcf764db/attachment-0001.htm>


More information about the Pkg-haskell-commits mailing list