Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
strategy:
fail-fast: false
matrix:
zig-version: ["0.14.1"]
os: [macos-latest, windows-latest]
zig-version: ["0.15.2"]
os: [macos-latest, windows-latest, ubuntu-latest]
include:
- zig-version: "0.14.1"
check-format: true
os: ubuntu-latest

- zig-version: "master"
check-format: true
build-options: "-Dbuild-apps"
Expand Down
41 changes: 3 additions & 38 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -385,18 +385,9 @@ pub fn build(b: *std.Build) !void {
else => @panic("unsupported target CPU arch"),
});

libressl_common.installHeader(conf_header, "openssl/opensslconf.h");

try libressl_common.installHeaders(
b,
upstream,
source_header_prefix,
&.{
.{ .starts_with = "compat" },
.{ .starts_with = "arch" },
.{ .ends_with = "pqueue.h" },
},
);
libressl_common.libtls.installHeader(upstream.path("include/tls.h"), "tls.h");
libressl_common.libssl.installHeader(conf_header, "openssl/opensslconf.h");
libressl_common.libssl.installHeadersDirectory(upstream.path("include/openssl"), "openssl", .{});

for (libcrypto_include_paths) |path| {
libressl_common.libcrypto.root_module.addIncludePath(upstream.path(path));
Expand Down Expand Up @@ -559,32 +550,6 @@ const LibreSslCommon = struct {
self.libssl.installHeader(source, dest);
self.libtls.installHeader(source, dest);
}

pub fn installHeaders(
self: LibreSslCommon,
b: *std.Build,
upstream: *std.Build.Dependency,
base: []const u8,
skiplist: []const SkipSpec,
) !void {
const dir = try upstream.builder.build_root.handle.openDir(base, .{ .iterate = true });
var walker = try dir.walk(b.allocator);
defer walker.deinit();

walker: while (try walker.next()) |child| {
for (skiplist) |entry| {
switch (entry) {
.starts_with => |name| if (std.mem.startsWith(u8, child.path, name)) continue :walker,
.ends_with => |name| if (std.mem.endsWith(u8, child.path, name)) continue :walker,
}
}

if (std.mem.endsWith(u8, child.basename, ".h")) {
const full = b.pathJoin(&.{ base, child.path });
self.installHeader(upstream.path(full), child.path);
}
}
}
};

const SkipSpec = union(enum) {
Expand Down
5 changes: 1 addition & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,5 @@ your_exe.linkLibrary(libressl_dependency.artifact("tls")); // or "ssl", or "cryp

| Refname | LibreSSL Version | Zig `0.16.0-dev` | Zig `0.15.x` | Zig `0.14.x` | Zig `0.13.x` | Zig `0.12.x` |
|-----------|------------------|------------------|--------------|--------------|--------------|--------------|
| `4.0.0+4` | `4.0.0` | ✅ | ✅ | ✅ | ❌ | ❌ |
| `4.0.0+3` | `4.0.0` | ❌ | ✅ | ✅ | ❌ | ❌ |
| `4.0.0+2` | `4.0.0` | ❌ | ❌ | ✅ | ❌ | ❌ |
| `4.0.0+5` | `4.0.0` | ✅ | ✅ | ✅ | ❌ | ❌ |
| `4.0.0+1` | `4.0.0` | ❌ | ❌ | ❌ | ✅ | ✅ |
| `3.9.2+1` | `3.9.2` | ❌ | ❌ | ❌ | ✅ | ✅ |