diff --git a/srcpkgs/hedgewars/patches/importmonad.patch b/srcpkgs/hedgewars/patches/importmonad.patch new file mode 100644 index 00000000000..f8c1451f53c --- /dev/null +++ b/srcpkgs/hedgewars/patches/importmonad.patch @@ -0,0 +1,10 @@ +--- a/tools/pas2c/Pas2C.hs 2025-07-07 21:51:17.117166690 +0100 ++++ b/tools/pas2c/Pas2C.hs 2025-07-07 21:47:34.842095704 +0100 +@@ -6,6 +6,7 @@ + import Data.Maybe + import Data.Char + import Text.Parsec.Prim hiding (State) ++import Control.Monad (void, unless, guard, liftM, liftM2) + import Control.Monad.State + import System.IO + import PascalPreprocessor diff --git a/srcpkgs/hedgewars/patches/string.patch b/srcpkgs/hedgewars/patches/string.patch new file mode 100644 index 00000000000..18e1ea8128d --- /dev/null +++ b/srcpkgs/hedgewars/patches/string.patch @@ -0,0 +1,81 @@ +--- a/tools/pas2c/PascalPreprocessor.hs 2025-07-07 21:31:06.082177207 +0100 ++++ b/tools/pas2c/PascalPreprocessor.hs 2025-07-07 21:32:06.163172477 +0100 +@@ -11,8 +11,8 @@ + char' :: Char -> ParsecT String u IO () + char' = void . char + +-string' :: String -> ParsecT String u IO () +-string' = void . string ++stringlmao :: String -> ParsecT String u IO () ++stringlmao = void . string + + -- comments are removed + comment :: ParsecT String u IO String +@@ -59,7 +59,7 @@ + return $ c:s + + switch = do +- try $ string' "{$" ++ try $ stringlmao "{$" + s <- choice [ + include + , ifdef +@@ -72,7 +72,7 @@ + return s + + include = do +- try $ string' "INCLUDE" ++ try $ stringlmao "INCLUDE" + spaces + (char' '"') + ifn <- many1 $ noneOf "\"\n" +@@ -102,7 +102,7 @@ + return "" + + if' = do +- try (string' "IF" >> notFollowedBy alphaNum) ++ try (stringlmao "IF" >> notFollowedBy alphaNum) + + void $ manyTill anyChar (char' '}') + --char '}' +@@ -113,15 +113,15 @@ + return "" + + elseSwitch = do +- try $ string' "ELSE}" ++ try $ stringlmao "ELSE}" + updateState $ \(m, b:bs) -> (m, (not b):bs) + return "" + endIf = do +- try $ string' "ENDIF}" ++ try $ stringlmao "ENDIF}" + updateState $ \(m, _:bs) -> (m, bs) + return "" + define = do +- try $ string' "DEFINE" ++ try $ stringlmao "DEFINE" + spaces + i <- identifier + d <- ((string ":=" >> return ()) <|> spaces) >> many (noneOf "}") +--- a/tools/pas2c/PascalBasics.hs 2025-07-07 21:34:14.466383776 +0100 ++++ b/tools/pas2c/PascalBasics.hs 2025-07-07 21:34:44.872576888 +0100 +@@ -13,8 +13,8 @@ + char' :: Char -> Parsec String u () + char' = void . char + +-string' :: String -> Parsec String u () +-string' = void . string ++stringggggggg :: String -> Parsec String u () ++stringggggggg = void . string + + builtin :: [String] + builtin = ["succ", "pred", "low", "high", "ord", "inc", "dec", "exit", "break", "continue", "length", "copy"] +@@ -43,7 +43,7 @@ + + preprocessorSwitch :: Stream String Identity Char => Parsec String u String + preprocessorSwitch = do +- try $ string' "{$" ++ try $ stringggggggg "{$" + s <- manyTill (noneOf "\n") $ char '}' + return s +