1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
| | Force freetype-sys to use system libraries, this removes the need for CMake.
The bundled source is still present at the crate package, it should be removed
through a package snippet.
diff -Naur freetype-sys-0.13.1/Cargo.toml freetype-sys-0.13.1-patch/Cargo.toml > 1.patch
--- freetype-sys-0.13.1/Cargo.toml 2020-07-05 11:15:43.000000000 +0200
+++ freetype-sys-0.13.1-patch/Cargo.toml 2022-08-07 19:53:57.649678214 +0200
@@ -24,8 +24,3 @@
repository = "https://github.com/PistonDevelopers/freetype-sys.git"
[dependencies.libc]
version = "0.2.42"
-[build-dependencies.cmake]
-version = "0.1.42"
-
-[build-dependencies.pkg-config]
-version = "0.3.11"
diff -Naur freetype-sys-0.13.1/build.rs freetype-sys-0.13.1-patch/build.rs > 2.patch
--- freetype-sys-0.13.1/build.rs 2020-05-30 05:59:09.000000000 +0200
+++ freetype-sys-0.13.1-patch/build.rs 2022-08-07 19:54:34.153503846 +0200
@@ -1,30 +1,4 @@
-extern crate cmake;
-extern crate pkg_config;
-
-use cmake::Config;
-use std::env;
-
fn main() {
- let target = env::var("TARGET").unwrap();
- if !target.contains("android")
- && pkg_config::Config::new().atleast_version("18.5.12").find("freetype2").is_ok()
- {
- return
- }
-
- let mut config = Config::new("freetype2");
- if let Ok(s) = env::var("FREETYPE_CMAKE_GENERATOR") {
- config.generator(s);
- }
- let dst = config
- .define("WITH_BZip2", "OFF")
- .define("WITH_HarfBuzz", "OFF")
- .define("WITH_PNG", "OFF")
- .define("WITH_ZLIB", "OFF")
- .profile("Release")
- .build();
- let out_dir = env::var("OUT_DIR").unwrap();
- println!("cargo:rustc-link-search=native={}/lib", dst.display());
- println!("cargo:rustc-link-lib=static=freetype");
+ println!("cargo:rustc-link-lib=freetype");
- println!("cargo:outdir={}", out_dir);
}
+
|