From patchwork Sun Aug 11 05:18:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Faiz X-Patchwork-Id: 66939 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 A8A5727BBEA; Sun, 11 Aug 2024 06:19:51 +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 6689D27BBE2 for ; Sun, 11 Aug 2024 06:19:50 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sd0zc-00040h-M0; Sun, 11 Aug 2024 01:19:48 -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 1sd0zM-0003wg-Qs for guix-patches@gnu.org; Sun, 11 Aug 2024 01:19:34 -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 1sd0zM-0006MY-4U for guix-patches@gnu.org; Sun, 11 Aug 2024 01:19:32 -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=6bu7q45LxtSk+cN0EZxaldcKIvppBH9JXw1fsqtBziE=; b=slsvsGEcBhrVx+NUeaPR6sHtM+ohbGdDMSZ42QR0sMkupTtZhgXW57ngHebBw6Shmn3Z7/y5sbWmPFLTCYXQtNZI6oXUYekbFqEebootGhRwwQU2HpdiqS2suV6MIxoAt8LKA/3/1DUPWqLrYjazGTofyAy36IiiZQqzYnChg5kWDvtnhH/n/eU0XqBnE7yU3wwG09v9FUDRx1GpxeR3ZXDa5PHILadXt7iSHhq+x2xRz/3mTvx+XuUTz0Cd7nfO2EkljdesNXPrsX8V7BhxA7FnZnVBNJS0QytxiJwdWCUoMDp+DB2fAdt2mIwtX95nboaNxIJ5dB+ard9k7psTcg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sd0zq-0007wd-B3 for guix-patches@gnu.org; Sun, 11 Aug 2024 01:20:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#72569] [PATCH 3/4] gnu: openclonk: Fix build. 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: Sun, 11 Aug 2024 05:20:02 +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 Received: via spool by 72569-submit@debbugs.gnu.org id=B72569.172335358930508 (code B ref 72569); Sun, 11 Aug 2024 05:20:02 +0000 Received: (at 72569) by debbugs.gnu.org; 11 Aug 2024 05:19:49 +0000 Received: from localhost ([127.0.0.1]:40576 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sd0zc-0007vz-Ic for submit@debbugs.gnu.org; Sun, 11 Aug 2024 01:19:48 -0400 Received: from layka.disroot.org ([178.21.23.139]:57176) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sd0zZ-0007vq-Uj for 72569@debbugs.gnu.org; Sun, 11 Aug 2024 01:19:46 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 39E0D41C96 for <72569@debbugs.gnu.org>; Sun, 11 Aug 2024 07:19:15 +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 dfEb_XWCbK5h for <72569@debbugs.gnu.org>; Sun, 11 Aug 2024 07:19:14 +0200 (CEST) Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1723353553; bh=dr7IZfYq+dpXYjIU8c3X5rXzbhouA7xzo/1ELyKISJE=; h=Date:To:From:Subject; b=JmXjO/4BSAIGFkFl7gy1SsEK3JHlrXNeo5AZAmtl+O0wYg4KcP3rM1tv3xisRLDWI ySjnzKHm2adq+J1LnVT1bMWaBD1EKmTzbpfQPBV9zhwWhvA/Dy5hI0w39JPMt4ac8j Sp+Xgm0LrjoYvGE9reogW4QiynlsI2QRJl6y93woS1hP4BAvakXDWwZP+MjkwPJw33 kWybVbsDOLyFsmmgINZts5KJNL0dn9I31rm0U1vliRDgP+4diGZsMJAStI3BuyuAkK OKFwZzdR6j2bfScj3999Q9mNHk3SMRZIVq5W1HbP/3Iua0CasFbD80JTFKJDVwwOXt m5ZHSQ/VskVcA== Date: Sun, 11 Aug 2024 13:18:47 +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 628f6a299da5035b5c3b3724e78aca9bdb702ba7 Mon Sep 17 00:00:00 2001 Message-ID: <628f6a299da5035b5c3b3724e78aca9bdb702ba7.1723353069.git.adam.faiz@disroot.org> In-Reply-To: References: From: AwesomeAdam54321 Date: Sun, 11 Aug 2024 09:25:30 +0800 Subject: [PATCH 3/4] gnu: openclonk: Fix build. * gnu/packages/games.scm (openclonk): Fix build. [source]: Unbundle dependencies and include the header where necessary to fix the build. [arguments]<#:phases>: Remove workarounds for bundled backward-cpp. [inputs]: Remove dependencies for bundled backward-cpp. Add libb2, pcg-cpp, and sort-h. --- gnu/packages/games.scm | 60 ++++++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 28 deletions(-) diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 9ad6eabad2..504dfe74de 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -123,6 +123,7 @@ (define-module (gnu packages games) #:use-module (gnu packages bash) #:use-module (gnu packages bison) #:use-module (gnu packages boost) + #:use-module (gnu packages c) #:use-module (gnu packages check) #:use-module (gnu packages cmake) #:use-module (gnu packages compression) @@ -9622,7 +9623,32 @@ (define-public openclonk "openclonk-" version "-src.tar.bz2")) (sha256 (base32 - "0imkqjp8lww5p0cnqf4k4mb2v682mnsas63qmiz17rspakr7fxik")))) + "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") @@ -9641,30 +9667,7 @@ (define-public openclonk (("PATH_SUFFIXES \"src\" \"gtest\"") "PATH_SUFFIXES \"src\"")) #t)) - (add-after 'unpack 'adjust-backward-cpp-includes - (lambda _ - ;; XXX: The bundled backward-cpp exports a CMake "interface" - ;; that includes external libraries such as libdl from glibc. - ;; By default, CMake interface includes are treated as "system - ;; headers", and GCC behaves poorly when glibc is passed as a - ;; system header (causing #include_next failures). - - ;; Here we prevent targets that consume the Backward::Backward - ;; interface from treating it as "system includes". - (substitute* "CMakeLists.txt" - (("target_link_libraries\\((.+) Backward::Backward\\)" all target) - (string-append "set_property(TARGET " target " PROPERTY " - "NO_SYSTEM_FROM_IMPORTED true)\n" - all))) - #t)) - (add-after 'unpack 'add-libiberty - ;; Build fails upon linking executables without this. - (lambda _ - (substitute* "thirdparty/backward-cpp/BackwardConfig.cmake" - (("set\\(LIBBFD_LIBRARIES (.*?)\\)" _ libraries) - (string-append "set(LIBBFD_LIBRARIES " libraries " iberty)"))) - #t)) - (add-after 'add-libiberty 'lax-freealut-requirement + (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 _ @@ -9689,7 +9692,7 @@ (define-public openclonk `(("freealut" ,freealut) ("freetype" ,freetype) ("glew" ,glew) - ("libiberty" ,libiberty) + ("libb2" ,libb2) ("libjpeg" ,libjpeg-turbo) ("libogg" ,libogg) ("libpng" ,libpng) @@ -9698,11 +9701,12 @@ (define-public openclonk ("mesa" ,mesa) ("miniupnpc" ,miniupnpc) ("openal" ,openal) + ("pcg-cpp" ,pcg-cpp) ("qtbase" ,qtbase-5) ("readline" ,readline) ("sdl" ,sdl2) - ("tinyxml" ,tinyxml) - ("zlib" ,zlib))) + ("sort-h" ,sort-h) + ("tinyxml" ,tinyxml))) (home-page "https://www.openclonk.org/") (synopsis "Multiplayer action game where you control small and nimble humanoids")