From patchwork Mon Aug 8 14:37:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jean Pierre De Jesus DIAZ X-Patchwork-Id: 41377 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 1EA9427BBEA; Mon, 8 Aug 2022 15:38:36 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 8175427BBE9 for ; Mon, 8 Aug 2022 15:38:35 +0100 (BST) Received: from localhost ([::1]:54796 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oL3tq-0004WX-Lw for patchwork@mira.cbaines.net; Mon, 08 Aug 2022 10:38:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46538) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oL3tK-0003S9-DU for guix-patches@gnu.org; Mon, 08 Aug 2022 10:38:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51701) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oL3tK-00029c-4g for guix-patches@gnu.org; Mon, 08 Aug 2022 10:38:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oL3tK-0001xi-15 for guix-patches@gnu.org; Mon, 08 Aug 2022 10:38:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57043] [PATCH] gnu: rust-freetype-sys-0.13: Unbundle freetype2. References: In-Reply-To: Resent-From: Jean Pierre De Jesus DIAZ Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 08 Aug 2022 14:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57043 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: "57043@debbugs.gnu.org" <57043@debbugs.gnu.org> Received: via spool by 57043-submit@debbugs.gnu.org id=B57043.16599694437478 (code B ref 57043); Mon, 08 Aug 2022 14:38:01 +0000 Received: (at 57043) by debbugs.gnu.org; 8 Aug 2022 14:37:23 +0000 Received: from localhost ([127.0.0.1]:41449 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oL3sg-0001wY-Ou for submit@debbugs.gnu.org; Mon, 08 Aug 2022 10:37:23 -0400 Received: from mail-4323.proton.ch ([185.70.43.23]:41325) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oL3sc-0001w1-KL for 57043@debbugs.gnu.org; Mon, 08 Aug 2022 10:37:21 -0400 Date: Mon, 08 Aug 2022 14:37:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jeandudey.tech; s=protonmail3; t=1659969431; x=1660228631; bh=GHS7Qw4WEpnzIbHK+Er0Z3dNZTjCcJY7kgqnm0VxBx8=; h=Date:To:From:Reply-To:Subject:Message-ID:Feedback-ID:From:To:Cc: Date:Subject:Reply-To:Feedback-ID:Message-ID; b=HfgvBYxiEcbaNQjKxrMQijenf68nr6ZwOPF06ycaho38bXb9ciYfn8dDzx04nQQPr 9KPVwM5cN7BO5mvgkLlMwpJJUrIIe2Fzsfw6oCfLL3uGc/lU1XhZLxtWxzxSajPXk0 slA1Dd4CLQZPQtXp6c3ogBk92/r2knAS7DvFqY8aqdh3R+t7kbixfpE8WPhoR5KBds p6SD3XauQGPf/j7SAY3fBbDvwhJLCW0UORTnITxla70SXcuqwjnonGuAEjJMwqqYMf RX6V+VgPSoYQv1WPPdJPFGEUikn6s2EJYNAD0uk3oTuNeXzLWauDY8u2zs1+HAKg1s +lZA8RlxwLS/A== Message-ID: Feedback-ID: 20187791:user:proton MIME-Version: 1.0 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" Reply-to: Jean Pierre De Jesus DIAZ X-ACL-Warn: , Jean Pierre De Jesus DIAZ via Guix-patches X-Patchwork-Original-From: Jean Pierre De Jesus DIAZ via Guix-patches via From: Jean Pierre De Jesus DIAZ X-getmail-retrieved-from-mailbox: Patches >Anyway, this can be done more simple -- all that I needed to do was >deleting the freetype2 subdirectory (in a snippet) and adding 'freetype' >to inputs. Patching the build script or build.rs was not necessary. Thought that the pkg-config `if' block was for Android only, my mistake. Probably influenced by the compilation error caused by not building without the freetype2 directory, because `pkg-config' was not present. >Additionally, I noticed that in the modified build.rs, only >rustc-link-lib (-l) is set, but not rustc-link-search (-L). >Antioxidant needs the latter to be set, otherwise dependents will fail >to link because of not finding the freetype library. This reminds me of also fixing `rust-bzip2-sys-0.1' in the future because it also doesn't specify the linker search path because the default build script was removed like I did in this case. See: https://github.com/alexcrichton/bzip2-rs/blob/bzip2-sys-0.1.9/bzip2-sys/build.rs#L12-L23 I don't know our stance on this though, or if there's a policy that mandates removing compilation support for bundled code or to leave it as is as long as the code compiles. I'd leave it as it though to make maintenance easier and less modifications to the original source code. Thanks for the review! — Jean-Pierre De Jesus DIAZ From a3487eae2c5b7a507929816e60206878c1d2fc0e Mon Sep 17 00:00:00 2001 From: Jean-Pierre De Jesus DIAZ Date: Mon, 8 Aug 2022 16:33:16 +0200 Subject: [PATCH] gnu: rust-freetype-sys-0.13: Unbundle freetype2. * gnu/packages/crates-io.scm (rust-freetype-sys-0.13) [source]: Remove bundled `freetype2' source code. [arguments]: Remove `#:skip-build? #t'. [native-inputs]: Add pkg-config. [inputs]: Add freetype. --- gnu/packages/crates-io.scm | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index cfafce9aa3..b5d4dc7c61 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -27,6 +27,7 @@ ;;; Copyright © 2022 Aleksandr Vityazev ;;; Copyright © 2022 Marius Bakke ;;; Copyright © 2022 Evgenii Lepikhin +;;; Copyright © 2022 Jean-Pierre De Jesus DIAZ ;;; ;;; This file is part of GNU Guix. ;;; @@ -22904,14 +22905,20 @@ (define-public rust-freetype-sys-0.13 (uri (crate-uri "freetype-sys" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 - (base32 "06kkds31s6b1i39dyanwmzbnic7laia1kk3gfvx8sqncq08l0zd3")))) + (base32 "06kkds31s6b1i39dyanwmzbnic7laia1kk3gfvx8sqncq08l0zd3")) + (modules '((guix build utils))) + (snippet + '(delete-file-recursively "freetype2")))) (build-system cargo-build-system) (arguments - `(#:skip-build? #t - #:cargo-inputs + `(#:cargo-inputs (("rust-cmake" ,rust-cmake-0.1) ("rust-libc" ,rust-libc-0.2) ("rust-pkg-config" ,rust-pkg-config-0.3)))) + (native-inputs + (list pkg-config)) + (inputs + (list freetype)) (home-page "https://github.com/PistonDevelopers/freetype-sys") (synopsis "Low level binding for FreeType font library") (description -- 2.36.1