@@ -385,18 +385,9 @@ pub fn build(b: *std.Build) !void {
385385 else = > @panic ("unsupported target CPU arch" ),
386386 });
387387
388- libressl_common .installHeader (conf_header , "openssl/opensslconf.h" );
389-
390- try libressl_common .installHeaders (
391- b ,
392- upstream ,
393- source_header_prefix ,
394- &.{
395- .{ .starts_with = "compat" },
396- .{ .starts_with = "arch" },
397- .{ .ends_with = "pqueue.h" },
398- },
399- );
388+ libressl_common .libtls .installHeader (upstream .path ("include/tls.h" ), "tls.h" );
389+ libressl_common .libssl .installHeader (conf_header , "openssl/opensslconf.h" );
390+ libressl_common .libssl .installHeadersDirectory (upstream .path ("include/openssl" ), "openssl" , .{});
400391
401392 for (libcrypto_include_paths ) | path | {
402393 libressl_common .libcrypto .root_module .addIncludePath (upstream .path (path ));
@@ -559,32 +550,6 @@ const LibreSslCommon = struct {
559550 self .libssl .installHeader (source , dest );
560551 self .libtls .installHeader (source , dest );
561552 }
562-
563- pub fn installHeaders (
564- self : LibreSslCommon ,
565- b : * std.Build ,
566- upstream : * std.Build.Dependency ,
567- base : []const u8 ,
568- skiplist : []const SkipSpec ,
569- ) ! void {
570- const dir = try upstream .builder .build_root .handle .openDir (b .graph .io , base , .{ .iterate = true });
571- defer dir .close (b .graph .io );
572- var walker = try dir .walk (b .allocator );
573- defer walker .deinit ();
574-
575- walker : while (try walker .next (b .graph .io )) | child | {
576- for (skiplist ) | entry | {
577- switch (entry ) {
578- .starts_with = > | name | if (std .mem .startsWith (u8 , child .path , name )) continue :walker ,
579- .ends_with = > | name | if (std .mem .endsWith (u8 , child .path , name )) continue :walker ,
580- }
581- }
582-
583- if (std .mem .endsWith (u8 , child .basename , ".h" )) {
584- self .installHeader (upstream .path (base ).path (b , child .path ), child .path );
585- }
586- }
587- }
588553};
589554
590555const SkipSpec = union (enum ) {
0 commit comments