File: patch-build-rs.diff

package info (click to toggle)
rust-jpegxl-sys 0.11.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 424 kB
  • sloc: makefile: 2
file content (33 lines) | stat: -rw-r--r-- 993 bytes parent folder | download
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
--- a/build.rs
+++ b/build.rs
@@ -18,8 +18,6 @@
 //! Build script for jpegxl-sys.
 
 fn main() {
-    #[cfg(all(not(feature = "vendored"), not(feature = "docs")))]
-    {
         use std::env;
         let version = env!("CARGO_PKG_VERSION")
             .split('+')
@@ -27,11 +25,6 @@ fn main() {
             .and_then(|s| s.split('-').nth(1))
             .unwrap();
 
-        if let Ok(path) = env::var("DEP_JXL_LIB") {
-            println!("cargo:rustc-link-search=native={path}");
-            println!("cargo:rustc-link-lib=jxl");
-            println!("cargo:rustc-link-lib=jxl_threads");
-        } else {
             pkg_config::Config::new()
                 .atleast_version(version)
                 .probe("libjxl")
@@ -42,9 +35,4 @@ fn main() {
                 .unwrap_or_else(|_| {
                     panic!("Cannot find `libjxl_threads` with version >= {version}")
                 });
-        }
-    }
-
-    #[cfg(feature = "vendored")]
-    jpegxl_src::build();
 }