From patchwork Sun Dec 18 15:51:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Liliana Marie Prikler X-Patchwork-Id: 45548 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 4FC2F27BBEB; Fri, 23 Dec 2022 19:31:17 +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_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable 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 9A25427BBE9 for ; Fri, 23 Dec 2022 19:31:12 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p8nl6-00064A-7x; Fri, 23 Dec 2022 14:31:08 -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 1p8nl1-00061I-7k for guix-patches@gnu.org; Fri, 23 Dec 2022 14:31:04 -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 1p8nl1-0002Rk-03 for guix-patches@gnu.org; Fri, 23 Dec 2022 14:31:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p8nl0-0000y5-St for guix-patches@gnu.org; Fri, 23 Dec 2022 14:31:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60153] [PATCH v2 1/3] gnu: python-pygame: Update to 2.1.2. References: <3e37f988-a3ec-ccce-033e-1807fe7859b9@disroot.org> In-Reply-To: <3e37f988-a3ec-ccce-033e-1807fe7859b9@disroot.org> Resent-From: Adam Faiz Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 23 Dec 2022 19:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60153 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Adam Faiz Cc: 60153@debbugs.gnu.org Received: via spool by 60153-submit@debbugs.gnu.org id=B60153.16718238263682 (code B ref 60153); Fri, 23 Dec 2022 19:31:02 +0000 Received: (at 60153) by debbugs.gnu.org; 23 Dec 2022 19:30:26 +0000 Received: from localhost ([127.0.0.1]:38453 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p8nkP-0000xE-C2 for submit@debbugs.gnu.org; Fri, 23 Dec 2022 14:30:25 -0500 Received: from mail-ed1-f67.google.com ([209.85.208.67]:46753) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p8nkK-0000wb-5F for 60153@debbugs.gnu.org; Fri, 23 Dec 2022 14:30:21 -0500 Received: by mail-ed1-f67.google.com with SMTP id c17so8216147edj.13 for <60153@debbugs.gnu.org>; Fri, 23 Dec 2022 11:30:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:cc:to:content-transfer-encoding:mime-version:subject :date:from:from:to:cc:subject:date:message-id:reply-to; bh=Cj8ZnJSRVZ2crPot6t5FAI1AINanR+yaJhHiPoZpeSA=; b=TLqCKXF2qC1i8x7Cav2a9NlmVAeWIk5N/6pf091EKbjX5W5BZNBiW0F9i8E3KkWegz e2fNs9FYeNtSAvoksJNc4/hiqa842QK5prHSbLGoDu3T5+hf+/N4gp/V3X5yBQS/zrfS o2emwRAItmF3oCFkod0ihSidbPofKgDjcwXvA0wqjzLSJl8LHqHL6vC+BwdVrdWWoQ0J XvCNWUnTJMNLiJ8G1kliAisvALUF553Bn59be7IuJpxLdyhCsnV2XoEOrPBiaJ+uEchX fS7TKuBZuPZj99SIq4ytr8IvUFrKBpglyzxzy2dsQveJ6s24C71acIFcXDifNfFZtPnF m4zA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=message-id:cc:to:content-transfer-encoding:mime-version:subject :date:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Cj8ZnJSRVZ2crPot6t5FAI1AINanR+yaJhHiPoZpeSA=; b=6cHEF7P6OuPlfUQaTmLKTVyslAg4K9xOUyRM0bxT5xUD2zQRr31igF0zDzrub9wBrR S56IywOSvHu/yWZKkeiKNauFGwfZJnOGJ3gh3bCIqLLn14+ctvJSxic4cvGpaTuHvC76 Q6gdoNM9vbsWubOO0YLyridnewcGQPtCChQm34UAUrZBtzUAknEOQwfeJvkC97lmnYYG 9FVGQ+ZB3i/nPMAp2r9Etgkno+RcWTDaP1dtm8BFYX1lbsO2a7CTHqREsOoK7TfD0Sy8 L5PoL4pU9ERB3z0xXIbZeZp9u1fFPYxaVJJCVfKtiURkzUzQTIsobFPmYWD5cPrUt2sj vCFw== X-Gm-Message-State: AFqh2krCGLjjbG1NX0aJVeUKz54sens97gWFU2sJLEiW4TQjoSCVSIDs lKhpJqZJFQHcVYI186i9tEg= X-Google-Smtp-Source: AMrXdXvgnTyVfhcoT4TRysWivbnPuoV7IoggeNp0vPJLAe71Yvqh0sbFeO+wGTTFQp/looAxwQfK2g== X-Received: by 2002:a05:6402:4150:b0:47e:1b4a:5491 with SMTP id x16-20020a056402415000b0047e1b4a5491mr9382204eda.20.1671823814248; Fri, 23 Dec 2022 11:30:14 -0800 (PST) Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id l18-20020a1709060cd200b007c0c1e18e28sm1674920ejh.124.2022.12.23.11.30.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Dec 2022 11:30:13 -0800 (PST) From: Adam Faiz X-Google-Original-From: Adam Faiz Date: Sun, 18 Dec 2022 23:51:04 +0800 MIME-Version: 1.0 Message-ID: <8c518a46ea2d8332ccbb55cb00574b75db982558.camel@disroot.org> 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/game-development.scm (python-pygame): Update to 2.1.2. [arguments]<#:phases>: Add ‘fix-build-config’ and ‘fix-sdl2-headers’. [inputs]: Remove “sdl”, “sdl-image”, “sdl-mixer”, “sdl-ttf”, and “sdl-gfx”. Add “sdl2”, “sdl2-image”, “sdl2-mixer”, “sdl2-ttf”, and “sdl2-gfx”. --- gnu/packages/game-development.scm | 95 ++++++++++--------------------- 1 file changed, 31 insertions(+), 64 deletions(-) diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm index 8fec474d0b..07b2c6f3fe 100644 --- a/gnu/packages/game-development.scm +++ b/gnu/packages/game-development.scm @@ -1194,82 +1194,49 @@ (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")))) (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. - (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")) - (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"))))))) + (add-after 'unpack 'fix-build-config + (lambda _ + (substitute* "buildconfig/config_unix.py" + (("origincdirs = \\[.*\\]") + "origincdirs = os.environ['C_INCLUDE_PATH'].split(\":\")") + (("ORIGLIBDIRS") "LIBRARY_PATH") + (("incdirs = \\[\\]") "incdirs = origincdirs") + (("libdirs = \\[\\]") "libdirs = origlibdirs")))) + (add-after 'unpack 'fix-sdl2-headers + (lambda _ + (substitute* "buildconfig/config_unix.py" + (("SDL_ttf.h") "SDL2/SDL_ttf.h") + (("SDL_image.h") "SDL2/SDL_image.h") + (("SDL_mixer.h") "SDL2/SDL_mixer.h")) + (substitute* "src_c/imageext.c" + (("SDL_image.h") "SDL2/SDL_image.h")) + (substitute* "src_c/font.h" + (("SDL_ttf.h") "SDL2/SDL_ttf.h")) + (substitute* "src_c/mixer.h" + (("SDL_mixer.h") "SDL2/SDL_mixer.h")) + (substitute* "src_c/_sdl2/mixer.c" + (("SDL_mixer.h") "SDL2/SDL_mixer.h"))))))) + (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) + ("sdl2" ,sdl2) + ("sdl2-image" ,sdl2-image) + ("sdl2-mixer" ,sdl2-mixer) + ("sdl2-ttf" ,sdl2-ttf) + ("sdl2-gfx" ,sdl2-gfx) ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("libX11" ,libx11)