1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-08 06:48:28 +00:00

graphics/librsvg2-rust: fix build on big-endian

patch-vendor_crossbeam-* patches are necessary on powerpc. They may be removed
after Rust 1.56.0 is released, upstream for crossbeam* crates regenerates
no_atomic.rs and those changes flow into ports.

Same for the patch for builtns.rs (except that it also affects powerpc64le
which is already in the upstream cfg_expr crate, but powerpc has not yet landed
there).

To fix build generally on big-endian (so powerpc and powerpc64 at the moment),
merging 92df18a3fa
is also necessary.
This commit is contained in:
Piotr Kubaj 2021-10-01 10:28:25 +00:00
parent c1945ff2eb
commit a79bfc5158
5 changed files with 50 additions and 8 deletions

View File

@ -7,6 +7,9 @@ MASTER_SITES= GNOME
PKGNAMESUFFIX= 2-rust
DIST_SUBDIR= gnome2
PATCH_SITES= https://gitlab.gnome.org/GNOME/librsvg/-/commit/
PATCHFILES= 92df18a3faf80c1d6d35899d9a5d22c74adfb8f8.patch:-p1
MAINTAINER= desktop@FreeBSD.org
COMMENT= Library for parsing and rendering SVG vector-graphic files

View File

@ -1,3 +1,5 @@
TIMESTAMP = 1631578579
TIMESTAMP = 1633082129
SHA256 (gnome2/librsvg-2.52.0.tar.xz) = bd821fb3e16494b61f5185addd23b726b064f203122b3ab4b3d5d7a44e6bf393
SIZE (gnome2/librsvg-2.52.0.tar.xz) = 23196792
SHA256 (gnome2/92df18a3faf80c1d6d35899d9a5d22c74adfb8f8.patch) = 0fcdd9f890b93e0128bd2fd948ffbffdaa7fe888ba4ce066e14e4cc50d5444f4
SIZE (gnome2/92df18a3faf80c1d6d35899d9a5d22c74adfb8f8.patch) = 10895

View File

@ -1,11 +1,30 @@
https://github.com/EmbarkStudios/cfg-expr/commit/f8c59a8dccd0
--- vendor/cfg-expr/src/targets/builtins.rs.orig 2021-09-30 14:33:28 UTC
--- vendor/cfg-expr/src/targets/builtins.rs.orig 2021-09-16 01:15:26 UTC
+++ vendor/cfg-expr/src/targets/builtins.rs
@@ -1004,6 +1004,16 @@ pub const ALL_BUILTINS: &[TargetInfo<'static>] = &[
endian: Endian::big,
@@ -894,6 +894,16 @@ pub const ALL_BUILTINS: &[TargetInfo<'static>] = &[
endian: Endian::little,
},
TargetInfo {
+ triple: "powerpc-unknown-freebsd",
+ os: Some(Os::freebsd),
+ arch: Arch::powerpc,
+ env: None,
+ vendor: Some(Vendor::unknown),
+ family: Some(Family::unix),
+ pointer_width: 32,
+ endian: Endian::big,
+ },
+ TargetInfo {
triple: "powerpc-unknown-linux-gnu",
os: Some(Os::linux),
arch: Arch::powerpc,
@@ -1002,6 +1012,16 @@ pub const ALL_BUILTINS: &[TargetInfo<'static>] = &[
family: Some(Family::unix),
pointer_width: 64,
endian: Endian::big,
+ },
+ TargetInfo {
+ triple: "powerpc64le-unknown-freebsd",
+ os: Some(Os::freebsd),
+ arch: Arch::powerpc64,
@ -14,8 +33,6 @@ https://github.com/EmbarkStudios/cfg-expr/commit/f8c59a8dccd0
+ family: Some(Family::unix),
+ pointer_width: 64,
+ endian: Endian::little,
+ },
+ TargetInfo {
},
TargetInfo {
triple: "powerpc64le-unknown-linux-gnu",
os: Some(Os::linux),
arch: Arch::powerpc64,

View File

@ -0,0 +1,10 @@
--- vendor/crossbeam-epoch/no_atomic.rs.orig 2021-09-16 01:15:26 UTC
+++ vendor/crossbeam-epoch/no_atomic.rs
@@ -30,6 +30,7 @@ const NO_ATOMIC_64: &[&str] = &[
"mipsel-unknown-none",
"mipsisa32r6-unknown-linux-gnu",
"mipsisa32r6el-unknown-linux-gnu",
+ "powerpc-unknown-freebsd",
"powerpc-unknown-linux-gnu",
"powerpc-unknown-linux-gnuspe",
"powerpc-unknown-linux-musl",

View File

@ -0,0 +1,10 @@
--- vendor/crossbeam-utils/no_atomic.rs.orig 2021-09-16 01:15:26 UTC
+++ vendor/crossbeam-utils/no_atomic.rs
@@ -30,6 +30,7 @@ const NO_ATOMIC_64: &[&str] = &[
"mipsel-unknown-none",
"mipsisa32r6-unknown-linux-gnu",
"mipsisa32r6el-unknown-linux-gnu",
+ "powerpc-unknown-freebsd",
"powerpc-unknown-linux-gnu",
"powerpc-unknown-linux-gnuspe",
"powerpc-unknown-linux-musl",