efraim pushed a commit to branch rust-team in repository guix. commit 68911a91e733a146b739279c3dd06b48013c0e39 Author: Efraim Flashner <efr...@flashner.co.il> AuthorDate: Wed Sep 18 14:36:32 2024 +0300
gnu: Add rust-freetype-sys-0.20. * gnu/packages/crates-io.scm (rust-freetype-sys-0.20): New variable. (rust-freetype-sys-0.17): Inherit from rust-freetype-sys-0.20. Change-Id: Ia028c4e411a2d1c09bb59f9429cd97b98c96eb6b --- gnu/packages/crates-io.scm | 46 +++++++++++++++++++++++++++++++++++++--------- 1 file changed, 37 insertions(+), 9 deletions(-) diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index b5bb14e1f5..667b684163 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -27821,25 +27821,22 @@ values to other threads.") ("rust-freetype-sys" ,rust-freetype-sys-0.13) ("rust-libc" ,rust-libc-0.2)))))) -(define-public rust-freetype-sys-0.17 +(define-public rust-freetype-sys-0.20 (package (name "rust-freetype-sys") - (version "0.17.0") + (version "0.20.1") (source (origin (method url-fetch) (uri (crate-uri "freetype-sys" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 - (base32 "127z6hbsfhsw0fg110zy9s65fzald0cvwbxmhk1vxmmsdk54hcb4")) + (base32 "0d5iiv95ap3lwy7b0hxbc8caa9ng1fg3wlwrvb7rld39jrdxqzhf")) (snippet #~(begin (use-modules (guix build utils)) (delete-file-recursively "freetype2") ;; Inspired by Debian's patch for bzip2-sys. - (substitute* "Cargo.toml.orig" - (("cc = .*") "pkg-config = \"0.3\"\n")) - (copy-file "Cargo.toml.orig" "Cargo.toml") (delete-file "build.rs") (with-output-to-file "build.rs" (lambda _ @@ -27848,9 +27845,9 @@ values to other threads.") }~%"))))))) (build-system cargo-build-system) (arguments - `(#:cargo-inputs - (("rust-libc" ,rust-libc-0.2) - ("rust-pkg-config" ,rust-pkg-config-0.3)))) + `(#:cargo-inputs (("rust-cc" ,rust-cc-1) + ("rust-libc" ,rust-libc-0.2) + ("rust-pkg-config" ,rust-pkg-config-0.3)))) (inputs (list freetype)) (home-page "https://github.com/PistonDevelopers/freetype-sys") @@ -27859,6 +27856,37 @@ values to other threads.") "This package provides low level binding for FreeType font library.") (license license:expat))) +(define-public rust-freetype-sys-0.17 + (package + (inherit rust-freetype-sys-0.20) + (name "rust-freetype-sys") + (version "0.17.0") + (source + (origin + (method url-fetch) + (uri (crate-uri "freetype-sys" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "127z6hbsfhsw0fg110zy9s65fzald0cvwbxmhk1vxmmsdk54hcb4")) + (snippet + #~(begin + (use-modules (guix build utils)) + (delete-file-recursively "freetype2") + ;; Inspired by Debian's patch for bzip2-sys. + (substitute* "Cargo.toml.orig" + (("cc = .*") "pkg-config = \"0.3\"\n")) + (copy-file "Cargo.toml.orig" "Cargo.toml") + (delete-file "build.rs") + (with-output-to-file "build.rs" + (lambda _ + (format #t "fn main() {~@ + println!(\"cargo:rustc-link-lib=freetype\");~@ + }~%"))))))) + (arguments + `(#:cargo-inputs + (("rust-libc" ,rust-libc-0.2) + ("rust-pkg-config" ,rust-pkg-config-0.3)))))) + (define-public rust-freetype-sys-0.13 (package (inherit rust-freetype-sys-0.17)