From patchwork Thu Dec 10 19:03:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Prikler X-Patchwork-Id: 25687 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 CF0E527BC04; Thu, 10 Dec 2020 19:04:49 +0000 (GMT) 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_H4,RCVD_IN_MSPIKE_WL,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 7BA3127BC03 for ; Thu, 10 Dec 2020 19:04:49 +0000 (GMT) Received: from localhost ([::1]:55078 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1knRFA-0005KS-HO for patchwork@mira.cbaines.net; Thu, 10 Dec 2020 14:04:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46294) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1knREQ-0005JL-L9 for guix-patches@gnu.org; Thu, 10 Dec 2020 14:04:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:55977) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1knREQ-0003I4-D1 for guix-patches@gnu.org; Thu, 10 Dec 2020 14:04:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1knREQ-0004QR-8v for guix-patches@gnu.org; Thu, 10 Dec 2020 14:04:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#45132] [PATCH v2 1/2] gnu: pygame-sdl2-for-renpy: Drop generated sources in snippet. References: <02e03c983db083b554991ee295b366adedd95bc5.camel@student.tugraz.at> In-Reply-To: <02e03c983db083b554991ee295b366adedd95bc5.camel@student.tugraz.at> Resent-From: Leo Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 10 Dec 2020 19:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45132 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 45132@debbugs.gnu.org Received: via spool by 45132-submit@debbugs.gnu.org id=B45132.160762701816970 (code B ref 45132); Thu, 10 Dec 2020 19:04:02 +0000 Received: (at 45132) by debbugs.gnu.org; 10 Dec 2020 19:03:38 +0000 Received: from localhost ([127.0.0.1]:39288 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1knRE1-0004Pe-VR for submit@debbugs.gnu.org; Thu, 10 Dec 2020 14:03:38 -0500 Received: from mailrelay.tugraz.at ([129.27.2.202]:54893) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1knRDx-0004PR-Ku for 45132@debbugs.gnu.org; Thu, 10 Dec 2020 14:03:36 -0500 Received: from localhost.localdomain (217-149-174-13.nat.highway.telekom.at [217.149.174.13]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4CsNc069k1z1LLyX; Thu, 10 Dec 2020 20:03:28 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 mailrelay.tugraz.at 4CsNc069k1z1LLyX DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1607627009; bh=Yfi9v35AXfvYSOLpyORgtBZKtIh6aY+6M8YMVI8zOWs=; h=From:To:Cc:Subject:Date:From; b=Swm+Xi5MJtCepxl6C9xziiziW1F9N7A666asz9I31Ka5t4NomhqFIGoZCE1DCmqKu Wyo0PmaWnslX21yHL7uDiDq3XDPXKMxb+aMGQbtCkZpE/hey8FJsMUKBE5nnNbO8Hm 3d57BfwIw6Bew19gNmJ0mwjbp2FoMD35KO5dzGsY= From: Leo Prikler Date: Thu, 10 Dec 2020 20:03:11 +0100 Message-Id: <20201210190312.19632-1-leo.prikler@student.tugraz.at> X-Mailer: git-send-email 2.29.2 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 (pygame-sdl2-for-renpy)[source]: Add (guix build utils). [#:phases]: Move from here... [source]: ... to here. --- gnu/packages/game-development.scm | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm index c57ea5a908..557f02f564 100644 --- a/gnu/packages/game-development.scm +++ b/gnu/packages/game-development.scm @@ -1071,7 +1071,14 @@ to create fully featured games and multimedia programs in the python language.") (method url-fetch) (uri (string-append "https://www.renpy.org/dl/" renpy-version "/pygame_sdl2-" version ".tar.gz")) - (sha256 (base32 "1bmr7j9mlsc4czpgw70ld15ymyp4wxrk9hdsqad40wjwdxvvg2dr")))) + (sha256 (base32 "1bmr7j9mlsc4czpgw70ld15ymyp4wxrk9hdsqad40wjwdxvvg2dr")) + (modules '((guix build utils))) + (snippet + '(begin + ;; drop generated sources + (delete-file-recursively "gen") + (delete-file-recursively "gen3") + #t)))) (build-system python-build-system) (arguments `(#:tests? #f ; tests require pygame to be installed first @@ -1090,11 +1097,6 @@ to create fully featured games and multimedia programs in the python language.") "/lib -Wl,-rpath," (assoc-ref inputs "sdl-union") "/lib -Wl,--enable-new-dtags -lSDL2")) - #t)) - (add-before 'build 'drop-generated-files - (lambda args - (delete-file-recursively "gen") - (delete-file-recursively "gen3") #t))))) (inputs `(("sdl-union" From patchwork Thu Dec 10 19:03:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Prikler X-Patchwork-Id: 25688 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 EEC0127BC04; Thu, 10 Dec 2020 19:06:09 +0000 (GMT) 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_H4,RCVD_IN_MSPIKE_WL,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 5F38527BC03 for ; Thu, 10 Dec 2020 19:06:09 +0000 (GMT) Received: from localhost ([::1]:57496 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1knRGS-0006W7-Fo for patchwork@mira.cbaines.net; Thu, 10 Dec 2020 14:06:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46296) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1knRER-0005JO-1I for guix-patches@gnu.org; Thu, 10 Dec 2020 14:04:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:55978) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1knREQ-0003IB-QO for guix-patches@gnu.org; Thu, 10 Dec 2020 14:04:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1knREQ-0004QZ-LZ for guix-patches@gnu.org; Thu, 10 Dec 2020 14:04:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#45132] [PATCH v2 2/2] gnu: renpy: Use system fribidi and drop generated sources. Resent-From: Leo Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 10 Dec 2020 19:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45132 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 45132@debbugs.gnu.org Received: via spool by 45132-submit@debbugs.gnu.org id=B45132.160762702416987 (code B ref 45132); Thu, 10 Dec 2020 19:04:02 +0000 Received: (at 45132) by debbugs.gnu.org; 10 Dec 2020 19:03:44 +0000 Received: from localhost ([127.0.0.1]:39290 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1knRE4-0004Ps-6n for submit@debbugs.gnu.org; Thu, 10 Dec 2020 14:03:44 -0500 Received: from mailrelay.tugraz.at ([129.27.2.202]:5185) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1knRDy-0004PU-7T for 45132@debbugs.gnu.org; Thu, 10 Dec 2020 14:03:38 -0500 Received: from localhost.localdomain (217-149-174-13.nat.highway.telekom.at [217.149.174.13]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4CsNc40gnyz1LBMx; Thu, 10 Dec 2020 20:03:32 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 mailrelay.tugraz.at 4CsNc40gnyz1LBMx DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1607627012; bh=gcT9+GxW7c93kgll3MX70U7ogOCvMYUq4U0WI6KAK68=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uuA4thsbYxvDsZ9kZOaJ3wGUBjHgYVTUV/ItAX2W0gJpxDkhpt+o1wICdCCoVPBVf JvTEyND4vWpQiGJciYWhNhMhILkEM8KAGCTV/6CY89Q0veMPMqcmsbK7aR1c+WAlMD YsO63ipSBIWp6XI1BbB+wZLTmsLig+z8VCYEmN5o= From: Leo Prikler Date: Thu, 10 Dec 2020 20:03:12 +0100 Message-Id: <20201210190312.19632-2-leo.prikler@student.tugraz.at> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201210190312.19632-1-leo.prikler@student.tugraz.at> References: <20201210190312.19632-1-leo.prikler@student.tugraz.at> 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/patches/renpy-use-system-fribidi.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it here. * gnu/packages/game-development.scm (renpy)[source] Use it here. : Add (guix build utils). : Drop generated sources and fribidi sources. (arguments)[phases]: Add fix-include-paths. (inputs): Add fribidi. --- gnu/local.mk | 1 + gnu/packages/game-development.scm | 21 +++++++- .../patches/renpy-use-system-fribidi.patch | 52 +++++++++++++++++++ 3 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/renpy-use-system-fribidi.patch diff --git a/gnu/local.mk b/gnu/local.mk index 90df6f3966..b0af8f29b5 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1568,6 +1568,7 @@ dist_patch_DATA = \ %D%/packages/patches/rct-add-missing-headers.patch \ %D%/packages/patches/readline-link-ncurses.patch \ %D%/packages/patches/readline-6.2-CVE-2014-2524.patch \ + %D%/packages/patches/renpy-use-system-fribidi.patch \ %D%/packages/patches/reposurgeon-add-missing-docbook-files.patch \ %D%/packages/patches/r-httpuv-1.5.4-unvendor-libuv.patch \ %D%/packages/patches/ri-li-modernize_cpp.patch \ diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm index 557f02f564..21f7f7e880 100644 --- a/gnu/packages/game-development.scm +++ b/gnu/packages/game-development.scm @@ -1120,7 +1120,18 @@ developed mainly for Ren'py.") (method url-fetch) (uri (string-append "https://www.renpy.org/dl/" version "/renpy-" version "-source.tar.bz2")) - (sha256 (base32 "1anr5cfbvbsbik4v4rvrkdkciwhg700k4lydfbs4n85raimz9mw4")))) + (sha256 (base32 "1anr5cfbvbsbik4v4rvrkdkciwhg700k4lydfbs4n85raimz9mw4")) + (modules '((guix build utils))) + (patches + (search-patches + "renpy-use-system-fribidi.patch")) + (snippet + '(with-directory-excursion "module" + ;; drop generated sources + (delete-file-recursively "gen") + ;; drop fribidi sources + (delete-file-recursively "fribidi-src") + #t)))) (build-system python-build-system) (arguments `(#:tests? #f ; Ren'py doesn't seem to package tests @@ -1133,6 +1144,13 @@ developed mainly for Ren'py.") (("xdg-open") (which "xdg-open"))) #t)) + (add-after 'unpack 'fix-include-paths + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "module/setup.py" + (("/usr/include/fribidi") + (string-append (assoc-ref inputs "fribidi") + "/include/fribidi"))) + #t)) (add-after 'set-paths 'set-build-vars (lambda* (#:key inputs #:allow-other-keys) (setenv "RENPY_CYTHON" @@ -1170,6 +1188,7 @@ developed mainly for Ren'py.") (inputs `(("ffmpeg" ,ffmpeg) ("freetype" ,freetype) + ("fribidi" ,fribidi) ("glew" ,glew) ("libpng" ,libpng) ("python2-pygame" ,python2-pygame-sdl2) diff --git a/gnu/packages/patches/renpy-use-system-fribidi.patch b/gnu/packages/patches/renpy-use-system-fribidi.patch new file mode 100644 index 0000000000..1437274bcc --- /dev/null +++ b/gnu/packages/patches/renpy-use-system-fribidi.patch @@ -0,0 +1,52 @@ +See also [Arch] and [Gentoo] for similar patches in other distros. +[Arch] https://github.com/archlinux/svntogit-community/blob/packages/renpy/trunk/renpy-system-fribidi.patch +[Gentoo] https://gitweb.gentoo.org/repo/gentoo.git/tree/games-engines/renpy/files/renpy-7.3.5-use-system-fribidi.patch + +Index: renpy-7.3.5-source/module/renpybidicore.c +=================================================================== +--- renpy-7.3.5-source.orig/module/renpybidicore.c ++++ renpy-7.3.5-source/module/renpybidicore.c +@@ -1,5 +1,5 @@ + #include +-#include ++#include + #include + + #ifndef alloca +Index: renpy-7.3.5-source/module/setup.py +=================================================================== +--- renpy-7.3.5-source.orig/module/setup.py ++++ renpy-7.3.5-source/module/setup.py +@@ -119,30 +119,13 @@ cython( + sdl + [ png, 'z', 'm' ]) + + FRIBIDI_SOURCES = """ +-fribidi-src/lib/fribidi.c +-fribidi-src/lib/fribidi-arabic.c +-fribidi-src/lib/fribidi-bidi.c +-fribidi-src/lib/fribidi-bidi-types.c +-fribidi-src/lib/fribidi-deprecated.c +-fribidi-src/lib/fribidi-joining.c +-fribidi-src/lib/fribidi-joining-types.c +-fribidi-src/lib/fribidi-mem.c +-fribidi-src/lib/fribidi-mirroring.c +-fribidi-src/lib/fribidi-run.c +-fribidi-src/lib/fribidi-shape.c + renpybidicore.c + """.split() + cython( + "_renpybidi", + FRIBIDI_SOURCES, +- includes=[ +- BASE + "/fribidi-src/", +- BASE + "/fribidi-src/lib/", +- ], +- define_macros=[ +- ("FRIBIDI_ENTRY", ""), +- ("HAVE_CONFIG_H", "1"), +- ]) ++ includes=["/usr/include/fribidi"], ++ libs=["fribidi"]) + + + cython("_renpysteam", language="c++", compile_if=steam_sdk, libs=["steam_api"])