From patchwork Sat Dec 17 10:01:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Faiz X-Patchwork-Id: 45395 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 1CA1B27BBED; Sat, 17 Dec 2022 10:02:15 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,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 66A5F27BBEB for ; Sat, 17 Dec 2022 10:02:13 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p6U15-0008Fq-KP; Sat, 17 Dec 2022 05:02:03 -0500 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 1p6U14-0008Dh-6Y for guix-patches@gnu.org; Sat, 17 Dec 2022 05:02:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p6U13-0007Is-Ri for guix-patches@gnu.org; Sat, 17 Dec 2022 05:02:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p6U13-0005sg-M0 for guix-patches@gnu.org; Sat, 17 Dec 2022 05:02:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60153] [PATCH] gnu: python-pygame: Update to 2.1.2. Resent-From: Adam Faiz Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 17 Dec 2022 10:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 60153 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 60153@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.167127130022578 (code B ref -1); Sat, 17 Dec 2022 10:02:01 +0000 Received: (at submit) by debbugs.gnu.org; 17 Dec 2022 10:01:40 +0000 Received: from localhost ([127.0.0.1]:54963 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6U0h-0005s4-Lt for submit@debbugs.gnu.org; Sat, 17 Dec 2022 05:01:40 -0500 Received: from lists.gnu.org ([209.51.188.17]:45868) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6U0e-0005ry-BK for submit@debbugs.gnu.org; Sat, 17 Dec 2022 05:01:37 -0500 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 1p6U0d-0007vS-OT for guix-patches@gnu.org; Sat, 17 Dec 2022 05:01:36 -0500 Received: from knopi.disroot.org ([178.21.23.139]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p6U0Z-0007Cs-W2 for guix-patches@gnu.org; Sat, 17 Dec 2022 05:01:35 -0500 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 6EE8241305 for ; Sat, 17 Dec 2022 11:01:28 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FQv_kQ9sD-Fq for ; Sat, 17 Dec 2022 11:01:26 +0100 (CET) Message-ID: <3e37f988-a3ec-ccce-033e-1807fe7859b9@disroot.org> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1671271286; bh=uRHVolBO3M0LPlDICcR14wN4k0PjKi9prl4yR4yY4RY=; h=Date:To:From:Subject; b=KL1XbLtwrH61gf5U5Fxh6KCqga13zjY5kLpgndQalTdAwSVJB8yhPCSqyJrXDPuas wymGuoZuf/fGajJeJgD5f7twrDeyTAyNOUXEAE8nbSNIdmPL2fu92hC3lRx3lrYRfp kHUCZnhwh9OeRLkcQqIfiWGITheXnxXFto/mXAXNh3bbiBl/SdfZrNd+SxYOc5rEfS AGmXc2ZDpDiD/17gDQMNiDj419W8YFix81lo7wYd8YC/cM1ZVvKdrDiNe7mKFAjLO+ Kr9afwGGRmd0N6eDj37BuOZ06vatR9jDjHOIFqRIjgPxk8kSL/jKTUH7oJ9dqp2Xvq uLMerWZDdYCrg== Date: Sat, 17 Dec 2022 18:01:23 +0800 MIME-Version: 1.0 Content-Language: en-US Received-SPF: pass client-ip=178.21.23.139; envelope-from=adam.faiz@disroot.org; helo=knopi.disroot.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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 2641ac309552016f5095b8f50259cd92b760ebad Mon Sep 17 00:00:00 2001 From: AwesomeAdam54321 Date: Sat, 17 Dec 2022 17:37:21 +0800 Subject: [PATCH] gnu: python-pygame: Update to 2.1.2. * gnu/packages/game-development.scm (python-pygame): Update to 2.1.2. [inputs]: Use the new style. [description]: Re-indent. --- gnu/packages/game-development.scm | 119 +++++++++++++----------------- 1 file changed, 51 insertions(+), 68 deletions(-) (home-page "https://www.pygame.org") (synopsis "SDL wrapper for Python") (description "Pygame is a set of Python modules designed for writing games. -Pygame adds functionality on top of the excellent SDL library. This allows you + Pygame adds functionality on top of the excellent SDL library. This allows you to create fully featured games and multimedia programs in the python language.") (license (list license:bsd-2 ;; python numeric license as listed by Debian looks like diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm index 4a0435045b..c3d8d9a8a9 100644 --- a/gnu/packages/game-development.scm +++ b/gnu/packages/game-development.scm @@ -1194,92 +1194,75 @@ (define-public quesoglc (define-public python-pygame (package (name "python-pygame") - (version "1.9.4") + (version "2.1.2") (source (origin (method url-fetch) (uri (pypi-uri "pygame" version)) (sha256 (base32 - "1dn0nb86jl7yr8709cncxdr0yrmviqakw7zx3g8jbbwrr60if3bh")))) + "0g6j79naab7583kymf1bgxc5l5c9h5laq887rmvh8vw8iyifrl6n")) + (modules '((guix build utils))) + ;; Fix the configure script to allow passing the dependencies as + ;; environment variables. + (snippet + #~(begin + (substitute* "buildconfig/config_unix.py" + (("localbase.d") "d") + (("origincdirs = .*/include.*") + "origincdirs = os.environ['ORIGINCDIRS'].split(\":\")\n")))))) (build-system python-build-system) (arguments `(#:tests? #f ; tests require pygame to be installed first #:phases (modify-phases %standard-phases - ;; Set the paths to the dependencies manually because - ;; the configure script does not allow passing them as - ;; parameters. This also means we can skip the configure - ;; phase. + ;; Pass the dependencies to the configure script + ;; through environment variables. (add-before 'build 'set-library-paths (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((sdl-ref (assoc-ref inputs "sdl")) - (font-ref (assoc-ref inputs "sdl-ttf")) - (image-ref (assoc-ref inputs "sdl-image")) - (mixer-ref (assoc-ref inputs "sdl-mixer")) + (let ((font-ref (assoc-ref inputs "sdl2-ttf")) + (image-ref (assoc-ref inputs "sdl2-image")) + (mixer-ref (assoc-ref inputs "sdl2-mixer")) (smpeg-ref (assoc-ref inputs "libsmpeg")) (png-ref (assoc-ref inputs "libpng")) - (jpeg-ref (assoc-ref inputs "libjpeg")) - (freetype-ref (assoc-ref inputs "freetype")) - (v4l-ref (assoc-ref inputs "v4l-utils")) - (out-ref (assoc-ref outputs "out"))) - (substitute* "Setup.in" - (("SDL = -I/usr/include/SDL") - (string-append "SDL = -I" sdl-ref "/include/SDL -I."))) - (substitute* "Setup.in" - (("FONT = -lSDL_ttf") - (string-append "FONT = -I" font-ref "/include/SDL -L" - font-ref "/lib -lSDL_ttf"))) - (substitute* "Setup.in" - (("IMAGE = -lSDL_image") - (string-append "IMAGE = -I" image-ref "/include/SDL -L" - image-ref "/lib -lSDL_image"))) - (substitute* "Setup.in" - (("MIXER = -lSDL_mixer") - (string-append "MIXER = -I" mixer-ref "/include/SDL -L" - mixer-ref "/lib -lSDL_mixer"))) - (substitute* "Setup.in" - (("SMPEG = -lsmpeg") - (string-append "SMPEG = -I" smpeg-ref "/include/smpeg -L" - smpeg-ref "/lib -lsmpeg"))) - (substitute* "Setup.in" - (("PNG = -lpng") - (string-append "PNG = -I" png-ref "/include -L" - png-ref "/lib -lpng"))) - (substitute* "Setup.in" - (("JPEG = -ljpeg") - (string-append "JPEG = -I" jpeg-ref "/include -L" - jpeg-ref "/lib -ljpeg"))) - - (substitute* "Setup.in" - (("FREETYPE = -lfreetype") - (string-append "FREETYPE = -I" freetype-ref "/include/freetype2 -L" - freetype-ref "/lib -lfreetype"))) - - (substitute* "Setup.in" - (("^pypm") "#pypm")) - ;; Create a path to a header file provided by v4l-utils. - (system* "mkdir" "linux") - (system* "ln" "--symbolic" - (string-append v4l-ref "/include/libv4l1-videodev.h") - "linux/videodev.h") - (system* "ln" "--symbolic" "Setup.in" "Setup"))))))) + (jpeg-ref (assoc-ref inputs "libjpeg-turbo")) + (libx11-ref (assoc-ref inputs "libx11")) + (portmidi-ref (assoc-ref inputs "portmidi"))) + (setenv "LOCALBASE" " ") + (setenv "ORIGLIBDIRS" + (string-append + font-ref "/lib:" image-ref "/lib:" image-ref "/lib:" + mixer-ref "/lib:" smpeg-ref "/lib:" png-ref "/lib:" + jpeg-ref "/lib:" libx11-ref "/lib:" portmidi-ref "/lib")) + (setenv "ORIGINCDIRS" + (string-append + font-ref "/include/SDL2:" + image-ref "/include/SDL2:" + image-ref "/include/SDL:" + mixer-ref "/include/SDL2:" + smpeg-ref "/include/smpeg:" + png-ref "/include:" + jpeg-ref "/include:" + libx11-ref "/include/X11:" + portmidi-ref "/include")))))))) + (native-inputs + (list pkg-config)) (inputs - `(("freetype" ,freetype) - ("sdl" ,sdl) - ("sdl-image" ,sdl-image) - ("sdl-mixer" ,sdl-mixer) - ("sdl-ttf" ,sdl-ttf) - ("sdl-gfx" ,sdl-gfx) - ("libjpeg" ,libjpeg-turbo) - ("libpng" ,libpng) - ("libX11" ,libx11) - ("libsmpeg" ,libsmpeg) - ("portmidi" ,portmidi) - ("v4l-utils" ,v4l-utils))) + (list freetype + sdl2 + sdl2-image + sdl2-mixer + sdl2-ttf + sdl2-gfx + libjpeg-turbo + libpng + libx11 + libsmpeg + portmidi + v4l-utils))