From patchwork Wed Aug 28 15:36:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Faiz X-Patchwork-Id: 67378 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id E787427BBEA; Wed, 28 Aug 2024 16:37:24 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_VALIDITY_CERTIFIED, RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 6634327BBE2 for ; Wed, 28 Aug 2024 16:37:23 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sjKjP-0005Nt-CF; Wed, 28 Aug 2024 11:37:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sjKjN-0005NX-3E for guix-patches@gnu.org; Wed, 28 Aug 2024 11:37:09 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sjKjM-0006jj-QG for guix-patches@gnu.org; Wed, 28 Aug 2024 11:37:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=From:MIME-Version:Date:To:In-Reply-To:References:Subject; bh=ivsuHKSeA72xkjPIYZQ9GCGFsMuhNwuLedtJVyFBQFI=; b=kiHhA1f1yVBggbOVvFmT9Qxj5rX5lfeg4JBGfyi7iyBogWI9KI8unRD+hKumnaCeDzkfEKmdQoBj8O03fRcJTy+iZ/fWMteTkFwt+s03wKrlHE9oYz9Mw3I0C7qmj5wyybBPFQePlK5dWwm9tJe2LTR9Q9YlB99AjvDPw2yLWgh3/7wbb5hPaeM/Op8oUYVlsv45CV5zhlc4P58gxC9RFa8uyzdIcVdrqGT7JkBDuW7ioUcr0QOn7SJSuydfCrsJ2onQil2rWC+f6/+76z4X+aRUN39XWMomhmcNg9J4/wbP4wyWwEGPC0+QobJMasKxK7yD1H+RtJP+15SoMcdnfQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sjKkD-0008BO-Tp for guix-patches@gnu.org; Wed, 28 Aug 2024 11:38:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#72569] [PATCH v2 4/4] gnu: openclonk: Use gexps and new input style. References: <59b04394-4737-6da3-cf9e-3f181431afa8@disroot.org> In-Reply-To: <59b04394-4737-6da3-cf9e-3f181431afa8@disroot.org> Resent-From: Adam Faiz Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 28 Aug 2024 15:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72569 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 72569@debbugs.gnu.org Cc: Liliana Marie Prikler Received: via spool by 72569-submit@debbugs.gnu.org id=B72569.172485944431391 (code B ref 72569); Wed, 28 Aug 2024 15:38:01 +0000 Received: (at 72569) by debbugs.gnu.org; 28 Aug 2024 15:37:24 +0000 Received: from localhost ([127.0.0.1]:49578 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sjKjb-0008AE-Lu for submit@debbugs.gnu.org; Wed, 28 Aug 2024 11:37:24 -0400 Received: from layka.disroot.org ([178.21.23.139]:36480) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sjKjZ-0008A5-9R for 72569@debbugs.gnu.org; Wed, 28 Aug 2024 11:37:21 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id A6E8F41CCA; Wed, 28 Aug 2024 17:36:26 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TywtwFVVxAZ7; Wed, 28 Aug 2024 17:36:25 +0200 (CEST) Message-ID: <57db55ab-980f-3512-e46e-90e68a0dbbb9@disroot.org> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1724859385; bh=sgMWxD+OzwQ7hqNSr/fmdzqLIyFuoIRl0fnoseyao38=; h=Date:To:Cc:From:Subject; b=jtxJAMCKkJCAyV9h0VnubDCB7KRVTVsZITarXODNtuAbgO+GlbT3RSfhUlso4Sti1 8ZpI1oGndxgPapdLPqkwiT2mJP9jCgpPDbQ3rdn9Afb8ULrQ3e/NgcAQD3hVeAo47w +xvieWUS2mahLUPCoOTRkEsbEtYzLpfQvqemmWHHJrHG7Av1X8TdE85tPVU6VY8AEE 8p3nt448DJrEvSx9iyhRpGg9mbkz4PnCfX3j9L8S3scOZABFejKBgfZB3BGiLK9PWe Iq36Uj1nQEHbJ9Wl+3gir01m/Yl3Vuk2Yqp6JD67gCUZxEaqcNQIhBb4sWroqmKVku Rpz2MXIjlUZnA== Date: Wed, 28 Aug 2024 23:36:01 +0800 MIME-Version: 1.0 Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Adam Faiz X-ACL-Warn: , Adam Faiz via Guix-patches X-Patchwork-Original-From: Adam Faiz via Guix-patches via From: Adam Faiz Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From 1b08445834336938d9448a452a38c5c67742ed10 Mon Sep 17 00:00:00 2001 Message-ID: <1b08445834336938d9448a452a38c5c67742ed10.1724859175.git.adam.faiz@disroot.org> In-Reply-To: <91bf9bff2c3c365d006a0e88024db50f416cd436.1724859175.git.adam.faiz@disroot.org> References: <91bf9bff2c3c365d006a0e88024db50f416cd436.1724859175.git.adam.faiz@disroot.org> From: AwesomeAdam54321 Date: Sun, 11 Aug 2024 12:50:34 +0800 Subject: [PATCH v2 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 850d40e66f..f05be5bea2 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 ") - "#include ")) - (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 \n" all))) - (substitute* "src/lib/StdMesh.cpp" - (("#include .timsort/sort\\.h.") - "#include ")))))) + (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 ") + "#include ")) + (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 \n" all))) + (substitute* "src/lib/StdMesh.cpp" + (("#include .timsort/sort\\.h.") + "#include ")))))) (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 - `(("c-template-sort" ,c-template-sort) - ("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) - ("tinyxml" ,tinyxml))) + (list c-template-sort + freealut + freetype + glew + libb2 + libjpeg-turbo + libogg + libpng + libvorbis + libxrandr + mesa + miniupnpc + openal + pcg-cpp + qtbase-5 + readline + sdl2 + tinyxml)) (home-page "https://www.openclonk.org/") (synopsis "Multiplayer action game where you control small and nimble humanoids")