From 18d16b266328f3e568ab4ee614ae8c054b682c9e Mon Sep 17 00:00:00 2001 From: torque Date: Wed, 5 Mar 2025 19:17:31 -0700 Subject: [PATCH] build: support 0.14.0 Unfortunately, this has irreconcilable incompatibilities with previous versions of zig, due to the build.zig.zon schema changes. Support for older versions has been dropped. --- .github/workflows/ci.yaml | 12 +++++++----- build.zig | 4 ++-- build.zig.zon | 7 ++++--- readme.md | 7 ++++--- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 10902d8..0c1cc54 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -12,15 +12,17 @@ jobs: strategy: fail-fast: false matrix: - zig-version: ["0.13.0"] - os: [ubuntu-latest, macos-latest, windows-latest] + zig-version: ["0.14.0"] + os: [macos-latest, windows-latest] include: - - zig-version: "0.12.1" - os: ubuntu-latest - - zig-version: "master" + - zig-version: "0.14.0" check-format: true os: ubuntu-latest build-options: "-Dbuild-apps" + + - zig-version: "master" + os: ubuntu-latest + runs-on: ${{ matrix.os }} steps: - name: Checkout diff --git a/build.zig b/build.zig index 7b2eb28..e9fe3e2 100644 --- a/build.zig +++ b/build.zig @@ -151,7 +151,7 @@ pub fn build(b: *std.Build) !void { } else { build_asm = false; } - } else if (tinfo.isDarwin() and tinfo.cpu.arch == .x86_64) { + } else if (tinfo.os.tag.isDarwin() and tinfo.cpu.arch == .x86_64) { libressl_common.libcrypto.addCSourceFiles(.{ .root = crypto_srcroot, .files = libcrypto_macos_x86_64_asm, @@ -338,7 +338,7 @@ pub fn build(b: *std.Build) !void { libressl_common.linkSystemLibrary("bcrypt"); }, - else => if (tinfo.isDarwin()) { + else => if (tinfo.os.tag.isDarwin()) { libressl_common.libcrypto.addCSourceFiles(.{ .root = crypto_srcroot, .files = libcrypto_unix_sources, diff --git a/build.zig.zon b/build.zig.zon index 680b69f..cc2dcfc 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -1,11 +1,12 @@ .{ - .name = "libressl", + .name = .libressl, + .fingerprint = 0x203FA82BE0954AFA, .version = "4.0.0", - .minimum_zig_version = "0.12.0", + .minimum_zig_version = "0.14.0", .dependencies = .{ .libressl = .{ .url = "https://github.com/libressl/portable/releases/download/v4.0.0/libressl-4.0.0.tar.gz", - .hash = "1220c6577f1aa9137d3c200b804838fd71315388eec5d4c9313550143d02fe69308b", + .hash = "N-V-__8AAGvDTQHGV38aqRN9PCALgEg4_XExU4juxdTJMTVQ", }, }, .paths = .{ diff --git a/readme.md b/readme.md index c3eee08..4edc2fe 100644 --- a/readme.md +++ b/readme.md @@ -38,7 +38,8 @@ your_exe.linkLibrary(libressl_dependency.artifact("tls")); // or "ssl", or "cryp ## Zig Version Support Matrix -| Refname | LibreSSL Version | Zig `0.12.x` | Zig `0.13.x` | Zig `0.14.0-dev` | +| Refname | LibreSSL Version | Zig `0.12.x` | Zig `0.13.x` | Zig `0.14.x` | |-----------|------------------|--------------|--------------|------------------| -| `3.9.2+1` | `3.9.2` | ✅ | ✅ | ✅ | -| `4.0.0+1` | `4.0.0` | ✅ | ✅ | ✅ | +| `3.9.2+1` | `3.9.2` | ✅ | ✅ | ❌ | +| `4.0.0+1` | `4.0.0` | ✅ | ✅ | ❌ | +| `4.0.0+2` | `4.0.0` | ❌ | ❌ | ✅ |