From nobody Fri Jun 24 18:38:54 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 5317987CF3D; Fri, 24 Jun 2022 18:38:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LV5Vk66cTz4Rbh; Fri, 24 Jun 2022 18:38:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656095935; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EOsIvn0ciSXyLk4C8yU5hi6tTYXOEX0SaKwPmXGF6kw=; b=WC0Zc3fCHgXrKIux+1pmwrnUlogzwCAdeD/OuBC5FUwQiVh49MZkRo+y6O9zAVEslt3jrl JrmW8xTQKAWszXZvZjtMlROJhDLSe01m1kybWfap3OxB3PShr3VhTntvq+bYtoPnOKvvOS LpwltuI+RUVGKOqdwHhabp0MZR8SLNPJgduaXZq6LjZ3xPyFxjYy0Tf72MWJwcZ3EaI927 UnRFh34b3oRujPklcFjESgmdPdaHlR/Lll9kbH4/Shc9l390Y5xSloGT1q2p9Ky+imUbD2 gXo4Wg01lj11GAUk7pSs4v7IYyIXzeJaLJ/Vkk/ztHV2TG94NFTQtgRRrkleHg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9056A15474; Fri, 24 Jun 2022 18:38:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 25OIcsF3001919; Fri, 24 Jun 2022 18:38:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25OIcsr8001918; Fri, 24 Jun 2022 18:38:54 GMT (envelope-from git) Date: Fri, 24 Jun 2022 18:38:54 GMT Message-Id: <202206241838.25OIcsr8001918@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Piotr Kubaj Subject: git: 318ca527e27a - main - sysutils/onefetch: fix build on big-endian architectures List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pkubaj X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 318ca527e27ad9ca7e081d2fd1fa61a7aab4f0f3 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656095935; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EOsIvn0ciSXyLk4C8yU5hi6tTYXOEX0SaKwPmXGF6kw=; b=eepAD9sjfkokAwF7giQLAZlOr3SUq7cuCo9aTeCV8wiWTByKPfQt4R1Tr6HFubjZFtdMAM cT4DwY8r5tv5qmFM9HfVjgXr+zIIc/UYQKTUK62gF6IzXabVxrExJNiRjF6xuYdkhrCLt9 /gTOM8ynRCA5kxErdZAtL0PhyUWJ/FwtlHAPLi8TPQPPZ7HL9g9VocGXhbrUIYfi/T58k+ aYWsgNmEOyf6bvol7pKS7P6t3UE+y0edkorl2wZHjYJl64+UrSETl+EmLk+yCHyKq1KMHl cggsPgZrAmEuk75t8PIjCBQTF1owjU4vlCnfpIrqR0spqXBCxk4o4MrhnDloMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1656095935; a=rsa-sha256; cv=none; b=PFFEj1niqhZR957miYtaPOr1LNDmSlR03izmqzhpUBRm4Sbeqegz8hJ6pS1PD5Iz5cieFv WxFw7v2msb2vnXdOgIhrrKGw1WUAWgmFgHOELdqLXSOCgYt+6+lV1nUmJiuuvNKRD7oHIs tWVf5iFiCYvIxK+FXplEtjgiDph9+7NR9mf/9swt2TENkBuntIYg5Bm4delYuMMOtLVDF6 T2yovjDwv/4eYYb6KR790gL8AoKQhW0wIwijqm2QQ4vAv/cL+i4o4fHbEZhHhC+aOENZju hllRKuvyaABakNdD4+LuKY+zqiGkehy+k2Jzmp64YyJAuCsHc6D8lrvk6lNBqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/ports/commit/?id=318ca527e27ad9ca7e081d2fd1fa61a7aab4f0f3 commit 318ca527e27ad9ca7e081d2fd1fa61a7aab4f0f3 Author: Piotr Kubaj AuthorDate: 2022-06-24 18:37:23 +0000 Commit: Piotr Kubaj CommitDate: 2022-06-24 18:38:37 +0000 sysutils/onefetch: fix build on big-endian architectures Backport https://github.com/image-rs/image/commit/ed8337afc795571795482882236acf14196e10db to fix build. Approved by: Tier 2 blanket --- .../patch-cargo-crates_image-0.24.1_Cargo.toml | 11 +++++++++++ ...cargo-crates_image-0.24.1_src_codecs_openexr.rs | 11 +++++++++++ .../patch-cargo-crates_image-0.24.1_src_image.rs | 22 ++++++++++++++++++++++ ...o-crates_image-0.24.1_src_io_free__functions.rs | 22 ++++++++++++++++++++++ .../patch-cargo-crates_image-0.24.1_src_lib.rs | 12 ++++++++++++ 5 files changed, 78 insertions(+) diff --git a/sysutils/onefetch/files/patch-cargo-crates_image-0.24.1_Cargo.toml b/sysutils/onefetch/files/patch-cargo-crates_image-0.24.1_Cargo.toml new file mode 100644 index 000000000000..e91f7c00ee42 --- /dev/null +++ b/sysutils/onefetch/files/patch-cargo-crates_image-0.24.1_Cargo.toml @@ -0,0 +1,11 @@ +--- cargo-crates/image-0.24.1/Cargo.toml.orig 1970-01-01 00:00:01 UTC ++++ cargo-crates/image-0.24.1/Cargo.toml +@@ -59,7 +59,7 @@ optional = true + version = "0.4.0" + optional = true + +-[dependencies.exr] ++[target.'cfg(target_endian = "little")'.dependencies.exr] + version = "1.4.1" + optional = true + diff --git a/sysutils/onefetch/files/patch-cargo-crates_image-0.24.1_src_codecs_openexr.rs b/sysutils/onefetch/files/patch-cargo-crates_image-0.24.1_src_codecs_openexr.rs new file mode 100644 index 000000000000..a04173ae29c6 --- /dev/null +++ b/sysutils/onefetch/files/patch-cargo-crates_image-0.24.1_src_codecs_openexr.rs @@ -0,0 +1,11 @@ +--- cargo-crates/image-0.24.1/src/codecs/openexr.rs.orig 1973-11-29 21:33:09 UTC ++++ cargo-crates/image-0.24.1/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}; diff --git a/sysutils/onefetch/files/patch-cargo-crates_image-0.24.1_src_image.rs b/sysutils/onefetch/files/patch-cargo-crates_image-0.24.1_src_image.rs new file mode 100644 index 000000000000..2086b1094162 --- /dev/null +++ b/sysutils/onefetch/files/patch-cargo-crates_image-0.24.1_src_image.rs @@ -0,0 +1,22 @@ +--- cargo-crates/image-0.24.1/src/image.rs.orig 1973-11-29 21:33:09 UTC ++++ cargo-crates/image-0.24.1/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 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, diff --git a/sysutils/onefetch/files/patch-cargo-crates_image-0.24.1_src_io_free__functions.rs b/sysutils/onefetch/files/patch-cargo-crates_image-0.24.1_src_io_free__functions.rs new file mode 100644 index 000000000000..07e2f2f5ff07 --- /dev/null +++ b/sysutils/onefetch/files/patch-cargo-crates_image-0.24.1_src_io_free__functions.rs @@ -0,0 +1,22 @@ +--- cargo-crates/image-0.24.1/src/io/free_functions.rs.orig 1973-11-29 21:33:09 UTC ++++ cargo-crates/image-0.24.1/src/io/free_functions.rs +@@ -72,7 +72,8 @@ pub(crate) fn load_decoder 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 { + 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) + } diff --git a/sysutils/onefetch/files/patch-cargo-crates_image-0.24.1_src_lib.rs b/sysutils/onefetch/files/patch-cargo-crates_image-0.24.1_src_lib.rs new file mode 100644 index 000000000000..ed43d9f76a8e --- /dev/null +++ b/sysutils/onefetch/files/patch-cargo-crates_image-0.24.1_src_lib.rs @@ -0,0 +1,12 @@ +--- cargo-crates/image-0.24.1/src/lib.rs.orig 1973-11-29 21:33:09 UTC ++++ cargo-crates/image-0.24.1/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;