From patchwork Mon Aug 30 19:02:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Prikler X-Patchwork-Id: 32418 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 E2F1627BBE1; Mon, 30 Aug 2021 20:06:11 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 9CD6227BBE3 for ; Mon, 30 Aug 2021 20:06:09 +0100 (BST) Received: from localhost ([::1]:34536 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mKmbg-00010X-Jw for patchwork@mira.cbaines.net; Mon, 30 Aug 2021 15:06:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48616) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mKmZe-00071a-3L for guix-patches@gnu.org; Mon, 30 Aug 2021 15:04:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:48728) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mKmZd-0005IV-R3 for guix-patches@gnu.org; Mon, 30 Aug 2021 15:04:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mKmZd-00067I-Ip for guix-patches@gnu.org; Mon, 30 Aug 2021 15:04:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50273] [PATCH v2] gnu: Add python-pyxel. References: <20210830153003.27134-1-leo.prikler@student.tugraz.at> In-Reply-To: <20210830153003.27134-1-leo.prikler@student.tugraz.at> Resent-From: Leo Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 30 Aug 2021 19:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50273 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50273@debbugs.gnu.org Cc: maxim.cournoyer@gmail.com Received: via spool by 50273-submit@debbugs.gnu.org id=B50273.163035019623445 (code B ref 50273); Mon, 30 Aug 2021 19:04:01 +0000 Received: (at 50273) by debbugs.gnu.org; 30 Aug 2021 19:03:16 +0000 Received: from localhost ([127.0.0.1]:60274 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKmYq-00065z-Fd for submit@debbugs.gnu.org; Mon, 30 Aug 2021 15:03:16 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:51594) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKmYk-00065l-Rj for 50273@debbugs.gnu.org; Mon, 30 Aug 2021 15:03:11 -0400 Received: from localhost.localdomain (194-118-34-199.adsl.highway.telekom.at [194.118.34.199]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4Gz08304VDz1LB1y; Mon, 30 Aug 2021 21:02:58 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 mailrelay.tugraz.at 4Gz08304VDz1LB1y DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1630350179; bh=enChCpXso9EHpNIhFJo57mJqaetrRvtpP6Zu98rpskI=; h=From:To:Cc:Subject:Date:From; b=quonGRvkTLoMaRt1XghdBQRaAF7DdB3BESYjMdoafhxM/bwPJfu5USnska/eZ0LCt VTUDX2JVMbfnJNbsdHP5z610H91yV4B/GgWRC6D3paufXnn4Nl4ypZ9lkxM9/vki9F xpijlBXYgDoTGj4cHAa3KJpb8/P9oO2k/H4aXAcw= From: Leo Prikler Date: Mon, 30 Aug 2021 21:02:47 +0200 Message-Id: <20210830190246.3454-1-leo.prikler@student.tugraz.at> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw X-Scanned-By: MIMEDefang 2.74 on 129.27.10.116 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/game-development.scm (python-pyxel): New variable. --- Am Montag, den 30.08.2021, 14:40 -0400 schrieb Maxim Cournoyer: > > + (let* ((sdl2 (assoc-ref inputs "sdl2"))) > > + (substitute* "pyxel/core/Makefile" > > + (("`sdl2-config --cflags`") > > + (string-append "-I" sdl2 "/include/SDL2 > > -D_REENTRANT")) > > + (("`sdl2-config --libs`") > > + (string-append "-L" sdl2 "/lib " > > + "-Wl,-rpath," sdl2 "/lib " > > + "-Wl,--enable-new-dtags > > -lSDL2")))))) > > The above could benefit from some extra commenting to explain the > choice of linker options (--enable-new-dtags ?) or C preprocessor variables > (-D_REENTRANT). I'd have to dig a bit deeper than I'd like to have an > understanding of these. These were previously snarfed from a manual invocation of sdl2-config, but iskarian in IRC pointed out, that sdl2-config accepts --prefix, so the patch has been revised to use that. gnu/packages/game-development.scm | 51 +++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm index 2a58848dce..40807450ea 100644 --- a/gnu/packages/game-development.scm +++ b/gnu/packages/game-development.scm @@ -1484,6 +1484,57 @@ visual novels, while its Python scripting is enough for complex simulation games.") (license license:expat))) +(define-public python-pyxel + (package + (name "python-pyxel") + (version "1.4.3") + (source + (origin + (method git-fetch) + (uri + (git-reference + (url "https://github.com/kitao/pyxel") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0bwsgb5yq5s479cnf046v379zsn5ybp5195kbfvzr9l11qbaicm9")) + (modules '((guix build utils))) + (snippet + '(begin + (delete-file-recursively "pyxel/core/bin"))))) + (build-system python-build-system) + (arguments + `(#:tests? #f ; "Tests" are actually example programs that never halt. + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-build-files + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "setup.py" + (("\"pyxel\\.core\\.bin\\.(.*)\"," all arch) + (if (string=? arch "linux") + all + ""))) + (substitute* "pyxel/core/Makefile" + (("`sdl2-config") + (string-append "`sdl2-config --prefix=" + (assoc-ref inputs "sdl2")))))) + (add-before 'build 'prebuild + (lambda _ + (invoke "make" "-C" "pyxel/core")))))) + (inputs + `(("gifsicle" ,gifsicle) + ("sdl2" ,(sdl-union (list sdl2 sdl2-image))))) + (native-inputs + `(("gcc" ,gcc-10))) ; for std::filesystem + (home-page "https://github.com/kitao/pyxel") + (synopsis "Retro game engine for Python") + (description "Pyxel is a game engine inspired by retro gaming consoles. +It has a fixed 16-color palette, can hold up to 3 image banks and 8 tilemaps +(256x256 pixels each) and 4 sound channels with 64 definable sounds. It +also comes with a built-in image and sound editor.") + (license license:expat))) + (define-public grafx2 (package (name "grafx2")