From: Adam Faiz via Guix-patches via <guix-patches@gnu.org>
To: 72569@debbugs.gnu.org
Subject: [bug#72569] [PATCH 4/4] gnu: openclonk: Use gexps and new input style.
Date: Sun, 11 Aug 2024 13:20:14 +0800 [thread overview]
Message-ID: <0b7c8992-c811-a2bb-9229-52c50698b925@disroot.org> (raw)
In-Reply-To: <59b04394-4737-6da3-cf9e-3f181431afa8@disroot.org>
From 6059afbbe3f6a841021193775c1bf1d317dafefe Mon Sep 17 00:00:00 2001
Message-ID: <6059afbbe3f6a841021193775c1bf1d317dafefe.1723353069.git.adam.faiz@disroot.org>
In-Reply-To: <cover.1723353069.git.adam.faiz@disroot.org>
References: <cover.1723353069.git.adam.faiz@disroot.org>
From: AwesomeAdam54321 <adam.faiz@disroot.org>
Date: Sun, 11 Aug 2024 12:50:34 +0800
Subject: [PATCH 4/4] gnu: openclonk: Use gexps and new input style.
* gnu/packages/games.scm (openclonk)[arguments]: Use gexps.
[source]: Reindent.
[native-inputs]: Drop labels.
[inputs]: Drop labels.
---
gnu/packages/games.scm | 177 +++++++++++++++++++++--------------------
1 file changed, 90 insertions(+), 87 deletions(-)
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 504dfe74de..d8e7dc88fa 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -9616,97 +9616,100 @@ (define-public openclonk
(package
(name "openclonk")
(version "8.1")
- (source (origin
- (method url-fetch)
- (uri (string-append
- "https://www.openclonk.org/builds/release/" version "/"
- "openclonk-" version "-src.tar.bz2"))
- (sha256
- (base32
- "0imkqjp8lww5p0cnqf4k4mb2v682mnsas63qmiz17rspakr7fxik"))
- (modules '((guix build utils)))
- (snippet
- #~(begin
- (delete-file-recursively "thirdparty")
- (substitute* "CMakeLists.txt"
- (("add_subdirectory\\(thirdparty/.*\\)") "")
- (("set_property\\(.*Third-party.*\\)") "")
- (("blake2") "b2")
- (("thirdparty/timsort/sort\\.h") "")
- (("thirdparty/pcg/.*\\.hpp") ""))
- (substitute* '("src/lib/C4Random.cpp"
- "src/landscape/C4Particles.h")
- (("#include <pcg/pcg_random.hpp>")
- "#include <pcg_random.hpp>"))
- (substitute* "src/script/C4ScriptLibraries.cpp"
- (("blake2b.hash_output.get.., raw_output_length, data, data_length, nullptr, 0.")
- "blake2b(hash_output.get(), (const void*)raw_output_length, data, data_length, (size_t)(0), 0)"))
- (substitute* '("src/script/C4AulParse.cpp"
- "src/editor/C4EditCursor.cpp"
- "src/gui/C4ScriptGuiWindow.cpp")
- (("#include .C4Include\\.h." all)
- (string-append "#include <limits>\n" all)))
- (substitute* "src/lib/StdMesh.cpp"
- (("#include .timsort/sort\\.h.")
- "#include <sort.h>"))))))
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://www.openclonk.org/builds/release/" version "/"
+ "openclonk-" version "-src.tar.bz2"))
+ (sha256
+ (base32
+ "0imkqjp8lww5p0cnqf4k4mb2v682mnsas63qmiz17rspakr7fxik"))
+ (modules '((guix build utils)))
+ (snippet
+ #~(begin
+ (delete-file-recursively "thirdparty")
+ (substitute* "CMakeLists.txt"
+ (("add_subdirectory\\(thirdparty/.*\\)") "")
+ (("set_property\\(.*Third-party.*\\)") "")
+ (("blake2") "b2")
+ (("thirdparty/timsort/sort\\.h") "")
+ (("thirdparty/pcg/.*\\.hpp") ""))
+ (substitute* '("src/lib/C4Random.cpp"
+ "src/landscape/C4Particles.h")
+ (("#include <pcg/pcg_random.hpp>")
+ "#include <pcg_random.hpp>"))
+ (substitute* "src/script/C4ScriptLibraries.cpp"
+ (("blake2b.hash_output.get.., raw_output_length, data, data_length, nullptr, 0.")
+ "blake2b(hash_output.get(), (const void*)raw_output_length, data, data_length, (size_t)(0), 0)"))
+ (substitute* '("src/script/C4AulParse.cpp"
+ "src/editor/C4EditCursor.cpp"
+ "src/gui/C4ScriptGuiWindow.cpp")
+ (("#include .C4Include\\.h." all)
+ (string-append "#include <limits>\n" all)))
+ (substitute* "src/lib/StdMesh.cpp"
+ (("#include .timsort/sort\\.h.")
+ "#include <sort.h>"))))))
(build-system cmake-build-system)
(arguments
- `(#:configure-flags '("-DAudio_TK=OpenAL")
- #:test-target "tests"
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'prepare-gmock
- (lambda* (#:key inputs #:allow-other-keys)
- (mkdir "gmock")
- (copy-recursively (assoc-ref inputs "googlemock") "gmock")
- (substitute* "tests/CMakeLists.txt"
- (("/usr/src/gmock")
- (string-append (getcwd) "/gmock/googlemock"))
- (("/usr/src/gtest")
- (string-append (getcwd) "/gmock/googletest"))
- (("PATH_SUFFIXES \"src\" \"gtest\"")
- "PATH_SUFFIXES \"src\""))
- #t))
- (add-after 'prepare-gmock 'lax-freealut-requirement
- ;; TODO: We provide freealut 1.1.0, but pkg-config somehow detects
- ;; it as 1.0.1. Force minimal version.
- (lambda _
- (substitute* "cmake/FindAudio.cmake"
- (("freealut>=1.1.0") "freealut>=1.0.1"))
- #t))
- (add-after 'lax-freealut-requirement 'fix-directories
- ;; Prefer "$out/share/openclonk" over
- ;; "$out/share/games/openclonk". Also install "openclonk"
- ;; binary in "bin/", not "games/".
- (lambda _
- (substitute* "CMakeLists.txt"
- (("share/games/openclonk") "share/openclonk")
- (("TARGETS openclonk DESTINATION games")
- "TARGETS openclonk DESTINATION bin"))
- #t)))))
+ (list
+ #:configure-flags
+ #~(list "-DAudio_TK=OpenAL")
+ #:test-target "tests"
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'prepare-gmock
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((gmock (search-input-directory inputs "/googlemock"))
+ (gtest (search-input-directory inputs "/googletest")))
+ (mkdir "gmock")
+ (copy-recursively gmock "gmock/googlemock")
+ (copy-recursively gtest "gmock/googletest")
+ (substitute* "tests/CMakeLists.txt"
+ (("/usr/src/gmock")
+ (string-append (getcwd) "/gmock/googlemock"))
+ (("/usr/src/gtest")
+ (string-append (getcwd) "/gmock/googletest"))
+ (("PATH_SUFFIXES \"src\" \"gtest\"")
+ "PATH_SUFFIXES \"src\"")))))
+ (add-after 'prepare-gmock 'lax-freealut-requirement
+ ;; TODO: We provide freealut 1.1.0, but pkg-config somehow detects
+ ;; it as 1.0.1. Force minimal version.
+ (lambda _
+ (substitute* "cmake/FindAudio.cmake"
+ (("freealut>=1.1.0") "freealut>=1.0.1"))))
+ (add-after 'lax-freealut-requirement 'fix-directories
+ ;; Prefer "$out/share/openclonk" over
+ ;; "$out/share/games/openclonk". Also install "openclonk"
+ ;; binary in "bin/", not "games/".
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("share/games/openclonk") "share/openclonk")
+ (("TARGETS openclonk DESTINATION games")
+ "TARGETS openclonk DESTINATION bin")))))))
(native-inputs
- `(("googlemock" ,(package-source googletest))
- ("googletest" ,googletest)
- ("pkg-config" ,pkg-config)))
+ (list (package-source googletest)
+ googletest
+ pkg-config))
(inputs
- `(("freealut" ,freealut)
- ("freetype" ,freetype)
- ("glew" ,glew)
- ("libb2" ,libb2)
- ("libjpeg" ,libjpeg-turbo)
- ("libogg" ,libogg)
- ("libpng" ,libpng)
- ("libvorbis" ,libvorbis)
- ("libxrandr" ,libxrandr)
- ("mesa" ,mesa)
- ("miniupnpc" ,miniupnpc)
- ("openal" ,openal)
- ("pcg-cpp" ,pcg-cpp)
- ("qtbase" ,qtbase-5)
- ("readline" ,readline)
- ("sdl" ,sdl2)
- ("sort-h" ,sort-h)
- ("tinyxml" ,tinyxml)))
+ (list freealut
+ freetype
+ glew
+ libb2
+ libjpeg-turbo
+ libogg
+ libpng
+ libvorbis
+ libxrandr
+ mesa
+ miniupnpc
+ openal
+ pcg-cpp
+ qtbase-5
+ readline
+ sdl2
+ sort-h
+ tinyxml))
(home-page "https://www.openclonk.org/")
(synopsis
"Multiplayer action game where you control small and nimble humanoids")
--
2.41.0
next prev parent reply other threads:[~2024-08-11 5:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-11 5:13 [bug#72569] [PATCH 0/4] gnu: openclonk: Fix build Adam Faiz via Guix-patches via
2024-08-11 5:16 ` [bug#72569] [PATCH 1/4] gnu: Add backward-cpp Adam Faiz via Guix-patches via
2024-08-17 12:15 ` Liliana Marie Prikler
2024-08-11 5:17 ` [bug#72569] [PATCH 2/4] gnu: Add sort-h Adam Faiz via Guix-patches via
2024-08-17 12:26 ` Liliana Marie Prikler
2024-08-11 5:18 ` [bug#72569] [PATCH 3/4] gnu: openclonk: Fix build Adam Faiz via Guix-patches via
2024-08-11 5:20 ` Adam Faiz via Guix-patches via [this message]
2024-08-28 15:25 ` [bug#72569] [PATCH v2 1/4] gnu: Add backward-cpp Adam Faiz via Guix-patches via
2024-08-28 15:27 ` [bug#72569] [PATCH v2 2/4] gnu: Add c-template-sort Adam Faiz via Guix-patches via
2024-08-28 15:34 ` [bug#72569] [PATCH v2 3/4] gnu: openclonk: Fix build Adam Faiz via Guix-patches via
2024-08-28 15:36 ` [bug#72569] [PATCH v2 4/4] gnu: openclonk: Use gexps and new input style Adam Faiz via Guix-patches via
2024-08-31 16:32 ` bug#72569: " Liliana Marie Prikler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0b7c8992-c811-a2bb-9229-52c50698b925@disroot.org \
--to=guix-patches@gnu.org \
--cc=72569@debbugs.gnu.org \
--cc=adam.faiz@disroot.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.