From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 6CjAGqNx0l85SAAA0tVLHw (envelope-from ) for ; Thu, 10 Dec 2020 19:06:11 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id RUd6FqNx0l96VwAAbx9fmQ (envelope-from ) for ; Thu, 10 Dec 2020 19:06:11 +0000 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 C2B4F9400D3 for ; Thu, 10 Dec 2020 19:06:10 +0000 (UTC) Received: from localhost ([::1]:57496 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1knRGT-0006W7-Mx for larch@yhetil.org; Thu, 10 Dec 2020 14:06:09 -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 Content-Transfer-Encoding: 8bit X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw X-Spam-Scanner: SpamAssassin 3.003001 X-Spam-Score-relay: -1.9 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: 3.80 Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=tugraz.at header.s=mailrelay header.b=uuA4thsb; dmarc=fail reason="SPF not aligned (relaxed)" header.from=student.tugraz.at (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: C2B4F9400D3 X-Spam-Score: 3.80 X-Migadu-Scanner: scn1.migadu.com X-TUID: RPtZGSfKHGFQ * 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"]) -- 2.29.2