deps: removing utf8proc
utf8proc is no longer being used Per #808, it should be removed. Link: https://github.com/ghostty-org/ghostty/discussions/6931 Link: https://github.com/ghostty-org/ghostty/discussions/2563pull/8866/head
parent
f8472cb32b
commit
bd9bc5f1b9
|
|
@ -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);
|
||||
}
|
||||
|
|
@ -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",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
pub const c = @cImport({
|
||||
@cInclude("utf8proc.h");
|
||||
});
|
||||
|
|
@ -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 {}
|
||||
Loading…
Reference in New Issue