diff --git a/pkg/utf8proc/build.zig b/pkg/utf8proc/build.zig deleted file mode 100644 index 75fb8972c..000000000 --- a/pkg/utf8proc/build.zig +++ /dev/null @@ -1,40 +0,0 @@ -const std = @import("std"); - -pub fn build(b: *std.Build) !void { - const target = b.standardTargetOptions(.{}); - const optimize = b.standardOptimizeOption(.{}); - - const module = b.addModule("utf8proc", .{ .root_source_file = .{ .path = "main.zig" } }); - - const upstream = b.dependency("utf8proc", .{}); - const lib = b.addLibrary(.{ - .name = "utf8proc", - .root_module = b.createModule(.{ - .target = target, - .optimize = optimize, - }), - .linkage = .static, - }); - lib.linkLibC(); - - lib.addIncludePath(upstream.path("")); - module.addIncludePath(upstream.path("")); - - var flags = std.ArrayList([]const u8).init(b.allocator); - try flags.append("-DUTF8PROC_EXPORTS"); - defer flags.deinit(); - lib.addCSourceFiles(.{ - .root = upstream.path(""), - .files = &.{"utf8proc.c"}, - .flags = flags.items, - }); - - lib.installHeadersDirectoryOptions(.{ - .source_dir = upstream.path(""), - .install_dir = .header, - .install_subdir = "", - .include_extensions = &.{".h"}, - }); - - b.installArtifact(lib); -} diff --git a/pkg/utf8proc/build.zig.zon b/pkg/utf8proc/build.zig.zon deleted file mode 100644 index cfb62de55..000000000 --- a/pkg/utf8proc/build.zig.zon +++ /dev/null @@ -1,11 +0,0 @@ -.{ - .name = "utf8proc", - .version = "2.8.0", - .paths = .{""}, - .dependencies = .{ - .utf8proc = .{ - .url = "https://github.com/JuliaStrings/utf8proc/archive/refs/tags/v2.8.0.tar.gz", - .hash = "1220056ce228a8c58f1fa66ab778f5c8965e62f720c1d30603c7d534cb7d8a605ad7", - }, - }, -} diff --git a/pkg/utf8proc/c.zig b/pkg/utf8proc/c.zig deleted file mode 100644 index 53c8afec0..000000000 --- a/pkg/utf8proc/c.zig +++ /dev/null @@ -1,3 +0,0 @@ -pub const c = @cImport({ - @cInclude("utf8proc.h"); -}); diff --git a/pkg/utf8proc/main.zig b/pkg/utf8proc/main.zig deleted file mode 100644 index 1653c76db..000000000 --- a/pkg/utf8proc/main.zig +++ /dev/null @@ -1,20 +0,0 @@ -pub const c = @import("c.zig").c; - -/// Given a codepoint, return a character width analogous to `wcwidth(codepoint)`, -/// except that a width of 0 is returned for non-printable codepoints -/// instead of -1 as in `wcwidth`. -pub fn charwidth(codepoint: u21) u8 { - return @intCast(c.utf8proc_charwidth(@intCast(codepoint))); -} - -/// Given a pair of consecutive codepoints, return whether a grapheme break is -/// permitted between them (as defined by the extended grapheme clusters in UAX#29). -pub fn graphemeBreakStateful(cp1: u21, cp2: u21, state: *i32) bool { - return c.utf8proc_grapheme_break_stateful( - @intCast(cp1), - @intCast(cp2), - state, - ); -} - -test {}