guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

28/194: gnu: Add rust-freetype-sys-0.17.


From: guix-commits
Subject: 28/194: gnu: Add rust-freetype-sys-0.17.
Date: Tue, 3 Oct 2023 14:57:15 -0400 (EDT)

efraim pushed a commit to branch rust-team
in repository guix.

commit 8040af7de06c91e914d977d51ed9072dfac04df3
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Sun Oct 1 16:23:36 2023 +0300

    gnu: Add rust-freetype-sys-0.17.
    
    * gnu/packages/crates-io.scm (rust-freetype-sys-0.17): New variable.
    (rust-freetype-sys-0.13): Inherit from rust-freetype-sys-0.17.
---
 gnu/packages/crates-io.scm | 47 ++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 39 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 3fa0fb71fc..a5d648ea9f 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -25462,37 +25462,68 @@ values to other threads.")
     (description "This package provides bindings for FreeType font library.")
     (license license:expat)))
 
-(define-public rust-freetype-sys-0.13
+(define-public rust-freetype-sys-0.17
   (package
     (name "rust-freetype-sys")
-    (version "0.13.1")
+    (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 "06kkds31s6b1i39dyanwmzbnic7laia1kk3gfvx8sqncq08l0zd3"))
+        (base32 "127z6hbsfhsw0fg110zy9s65fzald0cvwbxmhk1vxmmsdk54hcb4"))
        (snippet
         #~(begin
             (use-modules (guix build utils))
-            (delete-file-recursively "freetype2")))))
+            (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\");~@
+                        }~%")))))))
     (build-system cargo-build-system)
     (arguments
      `(#:cargo-inputs
-       (("rust-cmake" ,rust-cmake-0.1)
-        ("rust-libc" ,rust-libc-0.2)
+       (("rust-libc" ,rust-libc-0.2)
         ("rust-pkg-config" ,rust-pkg-config-0.3))))
     (inputs
      (list freetype))
-    (native-inputs
-     (list pkg-config))
     (home-page "https://github.com/PistonDevelopers/freetype-sys";)
     (synopsis "Low level binding for FreeType font library")
     (description
      "This package provides low level binding for FreeType font library.")
     (license license:expat)))
 
+(define-public rust-freetype-sys-0.13
+  (package
+    (inherit rust-freetype-sys-0.17)
+    (name "rust-freetype-sys")
+    (version "0.13.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "freetype-sys" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "06kkds31s6b1i39dyanwmzbnic7laia1kk3gfvx8sqncq08l0zd3"))
+       (snippet
+        #~(begin
+            (use-modules (guix build utils))
+            (delete-file-recursively "freetype2")))))
+    (arguments
+     `(#: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))))
+
 (define-public rust-fs2-0.4
   (package
     (name "rust-fs2")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]