pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
rust179: re-introduce and adapt openssl{-sys,-src*} vendor crate patches
Module Name: pkgsrc-wip
Committed By: Havard Eidnes <he%NetBSD.org@localhost>
Pushed By: he
Date: Tue Jul 23 16:09:48 2024 +0000
Changeset: c965d6ad93715b927b5f85150edcbc3e05795ce1
Modified Files:
rust179/distinfo
Added Files:
rust179/patches/patch-vendor_openssl-src-111.28.1+1.1.1w_openssl_Configurations_10-main.conf
rust179/patches/patch-vendor_openssl-src-111.28.1+1.1.1w_src_lib.rs
rust179/patches/patch-vendor_openssl-sys-0.9.102_build_find__normal.rs
rust179/patches/patch-vendor_openssl-sys-0.9.102_build_main.rs
rust179/patches/patch-vendor_openssl-sys-0.9.92_build_find__normal.rs
rust179/patches/patch-vendor_openssl-sys-0.9.92_build_main.rs
Log Message:
rust179: re-introduce and adapt openssl{-sys,-src*} vendor crate patches
...from rust178.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=c965d6ad93715b927b5f85150edcbc3e05795ce1
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
rust179/distinfo | 6 ++
...28.1+1.1.1w_openssl_Configurations_10-main.conf | 18 ++++++
...h-vendor_openssl-src-111.28.1+1.1.1w_src_lib.rs | 64 ++++++++++++++++++++++
...endor_openssl-sys-0.9.102_build_find__normal.rs | 30 ++++++++++
.../patch-vendor_openssl-sys-0.9.102_build_main.rs | 23 ++++++++
...vendor_openssl-sys-0.9.92_build_find__normal.rs | 30 ++++++++++
.../patch-vendor_openssl-sys-0.9.92_build_main.rs | 23 ++++++++
7 files changed, 194 insertions(+)
diffs:
diff --git a/rust179/distinfo b/rust179/distinfo
index 39f41d1afe..275b913ac3 100644
--- a/rust179/distinfo
+++ b/rust179/distinfo
@@ -135,4 +135,10 @@ SHA1 (patch-vendor_crossbeam-utils-0.8.18_no__atomic.rs) = d4d9288cb199af9bc7e32
SHA1 (patch-vendor_libc-0.2.148_src_unix_bsd_netbsdlike_netbsd_mips.rs) = 0895df54084281263b9dae67e57f68168fb66bd4
SHA1 (patch-vendor_libc-0.2.148_src_unix_bsd_netbsdlike_netbsd_riscv64.rs) = 8699853de4225d4e5953d6bf17b59bc463fa7b5d
SHA1 (patch-vendor_libc-0.2.151_src_unix_solarish_mod.rs) = 50a296ba939f8c12a445526b16f50e8111a762a7
+SHA1 (patch-vendor_openssl-src-111.28.1+1.1.1w_openssl_Configurations_10-main.conf) = f14fa72626a831ca56a3b9d63d33f4ed72486e42
+SHA1 (patch-vendor_openssl-src-111.28.1+1.1.1w_src_lib.rs) = ab83fe8e2e6a0ee4df75ba90388e10b815ef6ce9
+SHA1 (patch-vendor_openssl-sys-0.9.102_build_find__normal.rs) = 2cf1432ed2be79677d41f267f9a08ff3082e9cbc
+SHA1 (patch-vendor_openssl-sys-0.9.102_build_main.rs) = 8861b7d3acc1643f7fe6f494b18d452ac70cf810
+SHA1 (patch-vendor_openssl-sys-0.9.92_build_find__normal.rs) = 91ad0d3e78055a5a205d55cd2c260cde70233bfe
+SHA1 (patch-vendor_openssl-sys-0.9.92_build_main.rs) = a47c0b7144466592aca3b622cb77498d59c5dfc4
SHA1 (patch-vendor_rustc-ap-rustc__target_src_spec_aarch64__be__unknown__netbsd.rs) = 4e86aec4c89db9a331950a12f8ec7b8aaa50eed7
diff --git a/rust179/patches/patch-vendor_openssl-src-111.28.1+1.1.1w_openssl_Configurations_10-main.conf b/rust179/patches/patch-vendor_openssl-src-111.28.1+1.1.1w_openssl_Configurations_10-main.conf
new file mode 100644
index 0000000000..f1f7e6d135
--- /dev/null
+++ b/rust179/patches/patch-vendor_openssl-src-111.28.1+1.1.1w_openssl_Configurations_10-main.conf
@@ -0,0 +1,18 @@
+$NetBSD$
+
+Replicate part of
+https://github.com/openssl/openssl/pull/15086
+
+--- vendor/openssl-src-111.28.1+1.1.1w/openssl/Configurations/10-main.conf.orig 2006-07-24 01:21:28.000000000 +0000
++++ vendor/openssl-src-111.28.1+1.1.1w/openssl/Configurations/10-main.conf
+@@ -950,6 +950,10 @@ my %targets = (
+ shared_cflag => "-fPIC",
+ shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
+ },
++ "NetBSD-generic32" => {
++ inherit_from => [ "BSD-generic32" ],
++ ex_libs => add(threads("-latomic")),
++ },
+ "BSD-generic64" => {
+ inherit_from => [ "BSD-generic32" ],
+ bn_ops => "SIXTY_FOUR_BIT_LONG",
diff --git a/rust179/patches/patch-vendor_openssl-src-111.28.1+1.1.1w_src_lib.rs b/rust179/patches/patch-vendor_openssl-src-111.28.1+1.1.1w_src_lib.rs
new file mode 100644
index 0000000000..b8076e65bc
--- /dev/null
+++ b/rust179/patches/patch-vendor_openssl-src-111.28.1+1.1.1w_src_lib.rs
@@ -0,0 +1,64 @@
+$NetBSD$
+
+Provide defaults for the various NetBSD targets.
+
+--- vendor/openssl-src-111.28.1+1.1.1w/src/lib.rs.orig 2006-07-24 01:21:28.000000000 +0000
++++ vendor/openssl-src-111.28.1+1.1.1w/src/lib.rs
+@@ -239,6 +239,8 @@ impl Build {
+ "aarch64-unknown-freebsd" => "BSD-generic64",
+ "aarch64-unknown-linux-gnu" => "linux-aarch64",
+ "aarch64-unknown-linux-musl" => "linux-aarch64",
++ "aarch64-unknown-netbsd" => "BSD-generic64",
++ "aarch64_be-unknown-netbsd" => "BSD-generic64",
+ "aarch64-pc-windows-msvc" => "VC-WIN64-ARM",
+ "arm-linux-androideabi" => "linux-armv4",
+ "armv7-linux-androideabi" => "linux-armv4",
+@@ -249,14 +251,17 @@ impl Build {
+ "armv5te-unknown-linux-gnueabi" => "linux-armv4",
+ "armv5te-unknown-linux-musleabi" => "linux-armv4",
+ "armv6-unknown-freebsd" => "BSD-generic32",
++ "armv6-unknown-netbsd-eabihf" => "BSD-generic32",
+ "armv7-unknown-freebsd" => "BSD-generic32",
+ "armv7-unknown-linux-gnueabi" => "linux-armv4",
+ "armv7-unknown-linux-musleabi" => "linux-armv4",
+ "armv7-unknown-linux-gnueabihf" => "linux-armv4",
+ "armv7-unknown-linux-musleabihf" => "linux-armv4",
++ "armv7-unknown-netbsd-eabihf" => "BSD-generic32",
+ "asmjs-unknown-emscripten" => "gcc",
+ "i586-unknown-linux-gnu" => "linux-elf",
+ "i586-unknown-linux-musl" => "linux-elf",
++ "i586-unknown-netbsd" => "BSD-x86-elf",
+ "i686-apple-darwin" => "darwin-i386-cc",
+ "i686-linux-android" => "linux-elf",
+ "i686-pc-windows-gnu" => "mingw",
+@@ -264,6 +269,7 @@ impl Build {
+ "i686-unknown-freebsd" => "BSD-x86-elf",
+ "i686-unknown-linux-gnu" => "linux-elf",
+ "i686-unknown-linux-musl" => "linux-elf",
++ "i686-unknown-netbsd" => "BSD-x86-elf",
+ "loongarch64-unknown-linux-gnu" => "linux-generic64",
+ "mips-unknown-linux-gnu" => "linux-mips32",
+ "mips-unknown-linux-musl" => "linux-mips32",
+@@ -273,9 +279,11 @@ impl Build {
+ "mips64el-unknown-linux-muslabi64" => "linux64-mips64",
+ "mipsel-unknown-linux-gnu" => "linux-mips32",
+ "mipsel-unknown-linux-musl" => "linux-mips32",
++ "mipsel-unknown-netbsd" => "NetBSD-generic32",
+ "powerpc-unknown-freebsd" => "BSD-generic32",
+ "powerpc-unknown-linux-gnu" => "linux-ppc",
+ "powerpc-unknown-linux-gnuspe" => "linux-ppc",
++ "powerpc-unknown-netbsd" => "BSD-generic32",
+ "powerpc64-unknown-freebsd" => "BSD-generic64",
+ "powerpc64-unknown-linux-gnu" => "linux-ppc64",
+ "powerpc64-unknown-linux-musl" => "linux-ppc64",
+@@ -283,8 +291,10 @@ impl Build {
+ "powerpc64le-unknown-linux-gnu" => "linux-ppc64le",
+ "powerpc64le-unknown-linux-musl" => "linux-ppc64le",
+ "riscv64gc-unknown-linux-gnu" => "linux-generic64",
++ "riscv64gc-unknown-netbsd" => "BSD-generic64",
+ "s390x-unknown-linux-gnu" => "linux64-s390x",
+ "s390x-unknown-linux-musl" => "linux64-s390x",
++ "sparc64-unknown-netbsd" => "BSD-generic64",
+ "x86_64-apple-darwin" => "darwin64-x86_64-cc",
+ "x86_64-linux-android" => "linux-x86_64",
+ "x86_64-pc-windows-gnu" => "mingw64",
diff --git a/rust179/patches/patch-vendor_openssl-sys-0.9.102_build_find__normal.rs b/rust179/patches/patch-vendor_openssl-sys-0.9.102_build_find__normal.rs
new file mode 100644
index 0000000000..80d98e247b
--- /dev/null
+++ b/rust179/patches/patch-vendor_openssl-sys-0.9.102_build_find__normal.rs
@@ -0,0 +1,30 @@
+$NetBSD$
+
+Add hack for Darwin when homebrew is installed.
+
+--- vendor/openssl-sys-0.9.102/build/find_normal.rs.orig 2006-07-24 01:21:28.000000000 +0000
++++ vendor/openssl-sys-0.9.102/build/find_normal.rs
+@@ -72,23 +72,6 @@ fn resolve_with_wellknown_location(dir:
+ fn find_openssl_dir(target: &str) -> OsString {
+ let host = env::var("HOST").unwrap();
+
+- if host == target && target.ends_with("-apple-darwin") {
+- let homebrew_dir = match target {
+- "aarch64-apple-darwin" => "/opt/homebrew",
+- _ => "/usr/local",
+- };
+-
+- if let Some(dir) = resolve_with_wellknown_homebrew_location(homebrew_dir) {
+- return dir.into();
+- } else if let Some(dir) = resolve_with_wellknown_location("/opt/pkg") {
+- // pkgsrc
+- return dir.into();
+- } else if let Some(dir) = resolve_with_wellknown_location("/opt/local") {
+- // MacPorts
+- return dir.into();
+- }
+- }
+-
+ try_pkg_config();
+ try_vcpkg();
+
diff --git a/rust179/patches/patch-vendor_openssl-sys-0.9.102_build_main.rs b/rust179/patches/patch-vendor_openssl-sys-0.9.102_build_main.rs
new file mode 100644
index 0000000000..a15188f472
--- /dev/null
+++ b/rust179/patches/patch-vendor_openssl-sys-0.9.102_build_main.rs
@@ -0,0 +1,23 @@
+$NetBSD$
+
+Patterned after Linux and Android, on 32-bit NetBSD ports
+include -latomic. Parts of this inspired by
+https://github.com/sfackler/rust-openssl/commit/a0a1d1d29263abb7c47fc2e58cef8dab13762a45
+
+--- vendor/openssl-sys-0.9.102/build/main.rs.orig 2006-07-24 01:21:28.000000000 +0000
++++ vendor/openssl-sys-0.9.102/build/main.rs
+@@ -142,6 +142,14 @@ fn main() {
+ println!("cargo:rustc-link-lib=atomic");
+ }
+
++ // Patterned of the above, make sure we include -latomic
++ // on ilp32 ports (yes, this only tests the "p32" part).
++ if env::var("CARGO_CFG_TARGET_OS").unwrap() == "netbsd"
++ && env::var("CARGO_CFG_TARGET_POINTER_WIDTH").unwrap() == "32"
++ {
++ println!("cargo:rustc-link-lib=atomic");
++ }
++
+ if kind == "static" && target.contains("windows") {
+ println!("cargo:rustc-link-lib=dylib=gdi32");
+ println!("cargo:rustc-link-lib=dylib=user32");
diff --git a/rust179/patches/patch-vendor_openssl-sys-0.9.92_build_find__normal.rs b/rust179/patches/patch-vendor_openssl-sys-0.9.92_build_find__normal.rs
new file mode 100644
index 0000000000..99108643b7
--- /dev/null
+++ b/rust179/patches/patch-vendor_openssl-sys-0.9.92_build_find__normal.rs
@@ -0,0 +1,30 @@
+$NetBSD$
+
+Add hack for Darwin when homebrew is installed.
+
+--- vendor/openssl-sys-0.9.92/build/find_normal.rs.orig 2006-07-24 01:21:28.000000000 +0000
++++ vendor/openssl-sys-0.9.92/build/find_normal.rs
+@@ -72,23 +72,6 @@ fn resolve_with_wellknown_location(dir:
+ fn find_openssl_dir(target: &str) -> OsString {
+ let host = env::var("HOST").unwrap();
+
+- if host == target && target.ends_with("-apple-darwin") {
+- let homebrew_dir = match target {
+- "aarch64-apple-darwin" => "/opt/homebrew",
+- _ => "/usr/local",
+- };
+-
+- if let Some(dir) = resolve_with_wellknown_homebrew_location(homebrew_dir) {
+- return dir.into();
+- } else if let Some(dir) = resolve_with_wellknown_location("/opt/pkg") {
+- // pkgsrc
+- return dir.into();
+- } else if let Some(dir) = resolve_with_wellknown_location("/opt/local") {
+- // MacPorts
+- return dir.into();
+- }
+- }
+-
+ try_pkg_config();
+ try_vcpkg();
+
diff --git a/rust179/patches/patch-vendor_openssl-sys-0.9.92_build_main.rs b/rust179/patches/patch-vendor_openssl-sys-0.9.92_build_main.rs
new file mode 100644
index 0000000000..0a70272949
--- /dev/null
+++ b/rust179/patches/patch-vendor_openssl-sys-0.9.92_build_main.rs
@@ -0,0 +1,23 @@
+$NetBSD$
+
+Patterned after Linux and Android, on 32-bit NetBSD ports
+include -latomic. Parts of this inspired by
+https://github.com/sfackler/rust-openssl/commit/a0a1d1d29263abb7c47fc2e58cef8dab13762a45
+
+--- vendor/openssl-sys-0.9.92/build/main.rs.orig 2006-07-24 01:21:28.000000000 +0000
++++ vendor/openssl-sys-0.9.92/build/main.rs
+@@ -115,6 +115,14 @@ fn main() {
+ println!("cargo:rustc-link-lib={}={}", kind, lib);
+ }
+
++ // Patterned of the above, make sure we include -latomic
++ // on ilp32 ports (yes, this only tests the "p32" part).
++ if env::var("CARGO_CFG_TARGET_OS").unwrap() == "netbsd"
++ && env::var("CARGO_CFG_TARGET_POINTER_WIDTH").unwrap() == "32"
++ {
++ println!("cargo:rustc-link-lib=atomic");
++ }
++
+ if kind == "static" && target.contains("windows") {
+ println!("cargo:rustc-link-lib=dylib=gdi32");
+ println!("cargo:rustc-link-lib=dylib=user32");
Home |
Main Index |
Thread Index |
Old Index