x11/kickoff: fix build on big-endian architectures
Backport
ed8337afc7
to fix build.
Approved by: Tier 2 blanket
This commit is contained in:
parent
b3c647eb67
commit
c8cc97dbaa
11
x11/kickoff/files/patch-cargo-crates_image-0.24.2_Cargo.toml
Normal file
11
x11/kickoff/files/patch-cargo-crates_image-0.24.2_Cargo.toml
Normal file
@ -0,0 +1,11 @@
|
||||
--- cargo-crates/image-0.24.2/Cargo.toml.orig 1970-01-01 00:00:01 UTC
|
||||
+++ cargo-crates/image-0.24.2/Cargo.toml
|
||||
@@ -60,7 +60,7 @@ optional = true
|
||||
version = "0.4.0"
|
||||
optional = true
|
||||
|
||||
-[dependencies.exr]
|
||||
+[target.'cfg(target_endian = "little")'.dependencies.exr]
|
||||
version = "1.4.2"
|
||||
optional = true
|
||||
|
@ -0,0 +1,11 @@
|
||||
--- cargo-crates/image-0.24.2/src/codecs/openexr.rs.orig 1973-11-29 21:33:09 UTC
|
||||
+++ cargo-crates/image-0.24.2/src/codecs/openexr.rs
|
||||
@@ -20,8 +20,6 @@
|
||||
//! - meta data is lost
|
||||
//! - dwaa/dwab compressed images not supported yet by the exr library
|
||||
//! - (chroma) subsampling not supported yet by the exr library
|
||||
-
|
||||
-extern crate exr;
|
||||
use exr::prelude::*;
|
||||
|
||||
use crate::error::{DecodingError, EncodingError, ImageFormatHint};
|
@ -0,0 +1,22 @@
|
||||
--- cargo-crates/image-0.24.2/src/image.rs.orig 1973-11-29 21:33:09 UTC
|
||||
+++ cargo-crates/image-0.24.2/src/image.rs
|
||||
@@ -290,7 +290,8 @@ pub enum ImageOutputFormat {
|
||||
/// An Image in TGA Format
|
||||
Tga,
|
||||
|
||||
- #[cfg(feature = "openexr")]
|
||||
+ #[cfg(feature = "exr")]
|
||||
+ #[cfg(target_endian = "little")]
|
||||
/// An Image in OpenEXR Format
|
||||
OpenExr,
|
||||
|
||||
@@ -327,7 +328,8 @@ impl From<ImageFormat> for ImageOutputFormat {
|
||||
ImageFormat::Farbfeld => ImageOutputFormat::Farbfeld,
|
||||
#[cfg(feature = "tga")]
|
||||
ImageFormat::Tga => ImageOutputFormat::Tga,
|
||||
- #[cfg(feature = "openexr")]
|
||||
+ #[cfg(feature = "exr")]
|
||||
+ #[cfg(target_endian = "little")]
|
||||
ImageFormat::OpenExr => ImageOutputFormat::OpenExr,
|
||||
#[cfg(feature = "tiff")]
|
||||
ImageFormat::Tiff => ImageOutputFormat::Tiff,
|
@ -0,0 +1,22 @@
|
||||
--- cargo-crates/image-0.24.2/src/io/free_functions.rs.orig 1973-11-29 21:33:09 UTC
|
||||
+++ cargo-crates/image-0.24.2/src/io/free_functions.rs
|
||||
@@ -72,7 +72,8 @@ pub(crate) fn load_decoder<R: BufRead + Seek, V: Decod
|
||||
image::ImageFormat::Ico => visitor.visit_decoder(ico::IcoDecoder::new(r)?),
|
||||
#[cfg(feature = "hdr")]
|
||||
image::ImageFormat::Hdr => visitor.visit_decoder(hdr::HdrAdapter::new(BufReader::new(r))?),
|
||||
- #[cfg(feature = "openexr")]
|
||||
+ #[cfg(feature = "exr")]
|
||||
+ #[cfg(target_endian = "little")]
|
||||
image::ImageFormat::OpenExr => visitor.visit_decoder(openexr::OpenExrDecoder::new(r)?),
|
||||
#[cfg(feature = "pnm")]
|
||||
image::ImageFormat::Pnm => visitor.visit_decoder(pnm::PnmDecoder::new(r)?),
|
||||
@@ -230,7 +231,8 @@ pub(crate) fn write_buffer_impl<W: std::io::Write + Se
|
||||
ImageOutputFormat::Tga => {
|
||||
tga::TgaEncoder::new(buffered_write).write_image(buf, width, height, color)
|
||||
}
|
||||
- #[cfg(feature = "openexr")]
|
||||
+ #[cfg(feature = "exr")]
|
||||
+ #[cfg(target_endian = "little")]
|
||||
ImageOutputFormat::OpenExr => {
|
||||
openexr::OpenExrEncoder::new(buffered_write).write_image(buf, width, height, color)
|
||||
}
|
12
x11/kickoff/files/patch-cargo-crates_image-0.24.2_src_lib.rs
Normal file
12
x11/kickoff/files/patch-cargo-crates_image-0.24.2_src_lib.rs
Normal file
@ -0,0 +1,12 @@
|
||||
--- cargo-crates/image-0.24.2/src/lib.rs.orig 1973-11-29 21:33:09 UTC
|
||||
+++ cargo-crates/image-0.24.2/src/lib.rs
|
||||
@@ -234,7 +234,8 @@ pub mod codecs {
|
||||
pub mod ico;
|
||||
#[cfg(feature = "jpeg")]
|
||||
pub mod jpeg;
|
||||
- #[cfg(feature = "openexr")]
|
||||
+ #[cfg(feature = "exr")]
|
||||
+ #[cfg(target_endian = "little")]
|
||||
pub mod openexr;
|
||||
#[cfg(feature = "png")]
|
||||
pub mod png;
|
Loading…
Reference in New Issue
Block a user