From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id 6Ft5Gp0LEWar1wAA62LTzQ:P1 (envelope-from ) for ; Sat, 06 Apr 2024 10:45:17 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id 6Ft5Gp0LEWar1wAA62LTzQ (envelope-from ) for ; Sat, 06 Apr 2024 10:45:17 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=araneo.si header.s=20230811 header.b=s+2xhpwY; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=araneo.si (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1712393117; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=bXnvK9bzToBhXa8hGeA9ZG1X371uftvQflL8CyCgsK8=; b=YHv0eS3A5zPtMXSUzHhq8hoiahMXiV+/IHu7Bkp7XlG4F8fsHPm/AYdQnNGI7nBNTur14u B3h0RHcwu6eAb5aKFmZiinB9NNZ1jUR3f5nMDclK5EzAWnAgFCxwklFMSiUGaFk0cSPBec opLKwJ+QTyGXRHmKBJHp20H8EBytn1jJlsMBSWsCobWpXgyise7USmgKm6ySYgic2DceLJ lXqpnZRQShcVkFM5VQbTV654Iwrm7gs2bZfzx/s+LWOeJHQzarPgSD9XOjHreOpmwyIJT2 2fTaQCyxUmX93PV5n9ib4npsy7uRnj+VspTzAbyNF7aahF8ZKd+14sTsly2fjw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1712393117; a=rsa-sha256; cv=none; b=q/iROHKjd2ehx8XRd0ePjphcadOwwNRr2y2EbABKiiixOXsyMw5i+GXQHAC38cHhI2Ep0V L86ejNteZCaHqSUyOy8jnK1eeUNn3x5phUGBwZykz/RmzCu0fvT2nqOHwo0q8k6Ck/IUxS FwqKRdN5tUq2tjkcXWGEO7hQQxdrgbm88FhCscE+9HYcrwkDYaIvoV6TlQtwCvnW67Wunk YZO3YxcV5deQF914h50J9FTC7zFnmr3GF52mKnriA5v7UV1gPrn8jZVaFpiOAid0UdnGEv Q1RxzJs3DtYxbgsE18O3rRgtNJhs97coJ7TF/d43fuuUtbFEZt383+ofoh8gJw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=araneo.si header.s=20230811 header.b=s+2xhpwY; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=araneo.si (policy=none) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 26F593C028 for ; Sat, 6 Apr 2024 10:45:17 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rt1fW-0005tO-Hf; Sat, 06 Apr 2024 04:44:58 -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 1rt1fV-0005tE-11 for guix-patches@gnu.org; Sat, 06 Apr 2024 04:44:57 -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 1rt1fU-0004ZJ-Mt for guix-patches@gnu.org; Sat, 06 Apr 2024 04:44:56 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rt1fa-0005mj-Nb; Sat, 06 Apr 2024 04:45:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70235] [PATCH 2/2] gnu: widelands: Improve package style. Resent-From: Timotej Lazar Original-Sender: "Debbugs-submit" Resent-CC: adam.faiz@disroot.org, liliana.prikler@gmail.com, iyzsong@envs.net, guix-patches@gnu.org Resent-Date: Sat, 06 Apr 2024 08:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70235 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70235@debbugs.gnu.org Cc: Timotej Lazar , Adam Faiz , Liliana Marie Prikler , =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= X-Debbugs-Original-Xcc: Adam Faiz , Liliana Marie Prikler , =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Received: via spool by 70235-submit@debbugs.gnu.org id=B70235.171239306022030 (code B ref 70235); Sat, 06 Apr 2024 08:45:02 +0000 Received: (at 70235) by debbugs.gnu.org; 6 Apr 2024 08:44:20 +0000 Received: from localhost ([127.0.0.1]:38213 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rt1eu-0005jE-6d for submit@debbugs.gnu.org; Sat, 06 Apr 2024 04:44:20 -0400 Received: from static.51.243.21.65.clients.your-server.de ([65.21.243.51]:39694 helo=araneo.si) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rt1es-0005ir-3o for 70235@debbugs.gnu.org; Sat, 06 Apr 2024 04:44:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=20230811; bh=q/KBTrKGd30 1YIiqFHi1X4rKvgMkN2A+m0nySAMe7cg=; h=references:in-reply-to:date: subject:cc:to:from; d=araneo.si; b=s+2xhpwYkPcVz8Y41g1ilQ9VYmqb17E54Z/ 0qM+BGaen1bk4TrR2A7q9KVYoGLnaIptzE80A8fgbXnTCo59+m3BTfmWyNnz/9dwzXfdPZ ZrROpjxjHCG75JEHDPprRb3nUUu7ZhjafUXAl/O0vmnzZTrTxElL05L15HCiX42yEA= Received: by araneo.si (OpenSMTPD) with ESMTPSA id 194259fe (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sat, 6 Apr 2024 08:44:10 +0000 (UTC) From: Timotej Lazar Date: Sat, 6 Apr 2024 10:44:03 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.76 X-Spam-Score: -2.76 X-Migadu-Queue-Id: 26F593C028 X-Migadu-Scanner: mx13.migadu.com X-TUID: XDWiSVe9NK2D * gnu/packages/games.scm (widelands): Use new package style. [snippet]: Simplify and drop trailing #t. [arguments]: Use gexps. Tweak #:configure-flags to install the binary in bin/ instead of bin/games/ and data under share/ instead of bin/share/. Modify 'unbundle-fonts phase to not depend on input labels. [inputs, native-inputs]: Drop input labels. [home-page]: Drop trailing slash. Change-Id: I75c535005ad1325ad170205b6e80b1039125619a --- gnu/packages/games.scm | 85 +++++++++++++++++++++--------------------- 1 file changed, 42 insertions(+), 43 deletions(-) diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 78aedca434..b788c7c774 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -5791,58 +5791,57 @@ (define-public widelands (origin (method git-fetch) (uri (git-reference - (url "https://github.com/widelands/widelands") - (commit (string-append "v" version)))) + (url "https://github.com/widelands/widelands") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1m9hn1sh1siggribzsq79k7p0lggdw41ji7zdl6h648cjak9mdsp")) (modules '((guix build utils))) (snippet - '(begin - (delete-file-recursively "src/third_party/minizip") - #t)))) + #~(delete-file-recursively "src/third_party/minizip")))) (build-system cmake-build-system) (arguments - `(#:configure-flags - (let* ((out (assoc-ref %outputs "out")) - (share (string-append out "/share"))) - (list (string-append "-DCMAKE_INSTALL_PREFIX=" out "/bin") - (string-append "-DWL_INSTALL_BASEDIR=" share "/widelands") - (string-append "-DWL_INSTALL_DATADIR=" share "/widelands") - "-DOPTION_BUILD_WEBSITE_TOOLS=OFF" - ;; CMakeLists.txt does not handle properly RelWithDebInfo build - ;; type. When used, no game data is installed! - "-DCMAKE_BUILD_TYPE=Release")) - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'unbundle-fonts - ;; Unbundle fonts already packaged in Guix. XXX: missing fonts are - ;; amiri, Culmus, mmrCensus, Nakula, and Sinhala. - (lambda* (#:key inputs #:allow-other-keys) - (with-directory-excursion "data/i18n/fonts" - (for-each (lambda (font) - (delete-file-recursively font) - (symlink (string-append (assoc-ref inputs font) - "/share/fonts/truetype") - font)) - '("DejaVu" "MicroHei"))) - #t))))) + (list + #:configure-flags + #~(let ((share (string-append #$output "/share/widelands"))) + (list (string-append "-DCMAKE_INSTALL_PREFIX=" #$output) + (string-append "-DWL_INSTALL_BINDIR=" #$output "/bin") + (string-append "-DWL_INSTALL_BASEDIR=" share) + (string-append "-DWL_INSTALL_DATADIR=" share) + "-DOPTION_BUILD_WEBSITE_TOOLS=OFF" + ;; CMakeLists.txt does not handle properly RelWithDebInfo build + ;; type. When used, no game data is installed! + "-DCMAKE_BUILD_TYPE=Release")) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'unbundle-fonts + ;; Unbundle fonts already packaged in Guix. XXX: missing fonts are + ;; amiri, Culmus, mmrCensus, Nakula, and Sinhala. + (lambda* (#:key inputs #:allow-other-keys) + (for-each + (lambda (font) + (let* ((path (string-append "share/fonts/truetype/" (basename font))) + (target (false-if-exception (search-input-file inputs path)))) + (when target + (delete-file font) + (symlink target font)))) + (find-files "data/i18n/fonts" "\\.tt[cf]$"))))))) (native-inputs - `(("gettext" ,gettext-minimal) - ("pkg-config" ,pkg-config) - ("python" ,python))) + (list gettext-minimal pkg-config python)) (inputs - `(("asio" ,asio) - ("glew" ,glew) - ("icu4c" ,icu4c) - ("libpng" ,libpng) - ("minizip" ,minizip) - ("sdl" ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf))) - ("zlib" ,zlib) - ;; Fonts for the ‘unbundle-fonts’ phase. Case matters in name! - ("DejaVu" ,font-dejavu) - ("MicroHei" ,font-wqy-microhei))) - (home-page "https://www.widelands.org/") + (list asio + font-dejavu + font-wqy-microhei + glew + icu4c + libpng + minizip + sdl2 + sdl2-image + sdl2-mixer + sdl2-ttf + zlib)) + (home-page "https://www.widelands.org") (synopsis "Fantasy real-time strategy game") (description "In Widelands, you are the regent of a small clan. You start out with -- 2.41.0