diff options
| author | bdunahu <bdunahu@operationnull.com> | 2026-06-25 22:30:30 -0400 |
|---|---|---|
| committer | Cayetano Santos <csantosb@inventati.org> | 2026-07-02 10:42:33 +0200 |
| commit | d11a4d858be332b2c3ccb72671ea61bb645d4c1b (patch) | |
| tree | 2e08fe0a3f45f7180e6fab6f4916a4b3eefc4fe4 /gnu/packages/games.scm | |
| parent | d410120a9e5d456bf87effc8229cf84b9acb8d44 (diff) | |
gnu: hedgewars: Fix build.
* gnu/packages/patches/hedgewars-fix-pascalbasic-name-conflict.patch: New file.
* gnu/packages/patches/hedgewars-support-ffmpegv6.patch: New file.
* gnu/local.mk: Register new patchfiles.
* gnu/packages/games.scm (hedgewars)[source]: Apply them.
[#:configure-flags]: Set NOVERSIONINFOUPDATE to ON.
[#:phases]: Add 'import-control-dot-monad'.
[inputs]: Remove ffmpeg-4; add ffmpeg.
Fixes: guix/guix!9342
Merges: guix/guix!9654
Signed-off-by: Cayetano Santos <csantosb@inventati.org>
Diffstat (limited to 'gnu/packages/games.scm')
| -rw-r--r-- | gnu/packages/games.scm | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 0bac113b9f9..badcd8dc5a2 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm | |||
| @@ -11820,6 +11820,10 @@ play with up to four players simultaneously. It has network support.") | |||
| 11820 | (define-public hedgewars | 11820 | (define-public hedgewars |
| 11821 | (package | 11821 | (package |
| 11822 | (name "hedgewars") | 11822 | (name "hedgewars") |
| 11823 | ;; TODO: Delete phase 'import-control-dot-monad' on versions >1.0.3. | ||
| 11824 | ;; TODO: Remove patch 'hedgewars-support-ffmpegv6' on versions >1.0.2. | ||
| 11825 | ;; TODO: Remove patch 'hedgewars-fix-pascalbasic-name-conflict' | ||
| 11826 | ;; on versions >1.0.3. | ||
| 11823 | (version "1.0.2") | 11827 | (version "1.0.2") |
| 11824 | (source (origin | 11828 | (source (origin |
| 11825 | (method url-fetch) | 11829 | (method url-fetch) |
| @@ -11827,17 +11831,38 @@ play with up to four players simultaneously. It has network support.") | |||
| 11827 | "hedgewars-src-" version ".tar.bz2")) | 11831 | "hedgewars-src-" version ".tar.bz2")) |
| 11828 | (sha256 | 11832 | (sha256 |
| 11829 | (base32 | 11833 | (base32 |
| 11830 | "04pjpkjhpy720n803gv35iygmjdvsrmw13mih4ympjnqbgjfa7r0")))) | 11834 | "04pjpkjhpy720n803gv35iygmjdvsrmw13mih4ympjnqbgjfa7r0")) |
| 11835 | (patches | ||
| 11836 | (search-patches "hedgewars-fix-pascalbasic-name-conflict.patch" | ||
| 11837 | "hedgewars-support-ffmpegv6.patch")))) | ||
| 11831 | (build-system qt-build-system) | 11838 | (build-system qt-build-system) |
| 11832 | (arguments | 11839 | (arguments |
| 11833 | (list | 11840 | (list |
| 11834 | ;; XXX: Engine is built as Pascal source code, requiring Free Pascal | 11841 | ;; XXX: Engine is built as Pascal source code, requiring Free Pascal |
| 11835 | ;; Compiler, which we haven't packaged yet. With the flag below, we use | 11842 | ;; Compiler, which we haven't packaged yet. With the flag below, we use |
| 11836 | ;; a Pascal to C translator and Clang instead. | 11843 | ;; a Pascal to C translator and Clang instead. |
| 11837 | #:configure-flags #~(list "-DBUILD_ENGINE_C=ON" | 11844 | #:configure-flags |
| 11838 | "-Dhaskell_flags=-dynamic;-fPIC") | 11845 | #~'("-DBUILD_ENGINE_C=ON" |
| 11846 | "-DNOVERSIONINFOUPDATE=ON" | ||
| 11847 | "-Dhaskell_flags=-dynamic;-fPIC") | ||
| 11839 | #:phases | 11848 | #:phases |
| 11840 | #~(modify-phases %standard-phases | 11849 | #~(modify-phases %standard-phases |
| 11850 | (add-after 'unpack 'import-control-dot-monad | ||
| 11851 | (lambda _ | ||
| 11852 | (with-directory-excursion "gameServer" | ||
| 11853 | (substitute* '("ClientIO.hs" | ||
| 11854 | "HandlerUtils.hs" | ||
| 11855 | "HWProtoChecker.hs" | ||
| 11856 | "HWProtoCore.hs" | ||
| 11857 | "HWProtoLobbyState.hs" | ||
| 11858 | "HandlerUtils.hs" | ||
| 11859 | "ServerState.hs" | ||
| 11860 | "Votes.hs" | ||
| 11861 | "../tools/pas2c/Pas2C.hs") | ||
| 11862 | ;; All files define `import Control.Monad.{something}`. | ||
| 11863 | ;; Our symbols are in Control.Monad now as well. | ||
| 11864 | (("import Control\\.Monad" all) | ||
| 11865 | (string-append all "\n" "import Control.Monad")))))) | ||
| 11841 | (replace 'check | 11866 | (replace 'check |
| 11842 | (lambda* (#:key tests? #:allow-other-keys) | 11867 | (lambda* (#:key tests? #:allow-other-keys) |
| 11843 | (when tests? | 11868 | (when tests? |
| @@ -11851,7 +11876,7 @@ play with up to four players simultaneously. It has network support.") | |||
| 11851 | (string-append "../hedgewars-src-" #$version) | 11876 | (string-append "../hedgewars-src-" #$version) |
| 11852 | (install-file "misc/hedgewars.png" icons)))))))) | 11877 | (install-file "misc/hedgewars.png" icons)))))))) |
| 11853 | (inputs | 11878 | (inputs |
| 11854 | (list ffmpeg-4 | 11879 | (list ffmpeg |
| 11855 | freeglut | 11880 | freeglut |
| 11856 | ghc-entropy | 11881 | ghc-entropy |
| 11857 | ghc-hslogger | 11882 | ghc-hslogger |
