add harfbuzz (#434)
* add harfbuzz * switch freetype default to false * fix harfbuzz again * update util-linux * disable cairo * disable glib * fix util-linuxpull/435/head
parent
c802d49ba0
commit
51a1598458
5 changed files with 75 additions and 2 deletions
@ -0,0 +1,37 @@ |
||||
package("harfbuzz") |
||||
|
||||
set_homepage("https://harfbuzz.github.io/") |
||||
set_description("HarfBuzz is a text shaping library.") |
||||
set_license("MIT") |
||||
|
||||
add_urls("https://github.com/harfbuzz/harfbuzz/archive/refs/tags/$(version).tar.gz", |
||||
"https://github.com/harfbuzz/harfbuzz.git") |
||||
add_versions("2.8.1", "b3f17394c5bccee456172b2b30ddec0bb87e9c5df38b4559a973d14ccd04509d") |
||||
|
||||
add_configs("icu", {description = "Use the ICU library.", default = false, type = "boolean"}) |
||||
|
||||
add_deps("meson") |
||||
if not is_plat("windows") then |
||||
add_deps("freetype") |
||||
end |
||||
on_load("windows", "linux", "macosx", function (package) |
||||
if package:config("icu") then |
||||
package:add("deps", "icu4c") |
||||
end |
||||
end) |
||||
|
||||
on_install("windows", "linux", "macosx", function (package) |
||||
local configs = {"-Dtests=disabled", "-Ddocs=disabled", "-Dbenchmark=disabled", "-Dcairo=disabled", "-Dfontconfig=disabled", "-Dglib=disabled", "-Dgobject=disabled"} |
||||
table.insert(configs, "-Ddefault_library=" .. (package:config("shared") and "shared" or "static")) |
||||
if package:config("icu") then |
||||
table.insert(configs, "-Dicu=enabled") |
||||
end |
||||
if package:is_plat("windows") then |
||||
table.insert(configs, "-Dfreetype=disabled") |
||||
end |
||||
import("package.tools.meson").install(package, configs) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:has_cfuncs("hb_buffer_add_utf8", {includes = "harfbuzz/hb.h"})) |
||||
end) |
@ -0,0 +1,30 @@ |
||||
diff --git a/lib/procutils.c b/lib/procutils.c
|
||||
--- a/lib/procutils.c
|
||||
+++ b/lib/procutils.c
|
||||
@@ -13,7 +13,12 @@
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <sys/stat.h>
|
||||
+#ifndef __APPLE__
|
||||
#include <sys/vfs.h>
|
||||
+#else
|
||||
+#include <sys/param.h>
|
||||
+#include <sys/mount.h>
|
||||
+#endif
|
||||
#include <sys/types.h>
|
||||
#include <dirent.h>
|
||||
#include <ctype.h>
|
||||
|
||||
diff --git a/include/statfs_magic.c b/include/statfs_magic.c
|
||||
--- a/include/statfs_magic.h
|
||||
+++ b/include/statfs_magic.h
|
||||
@@ -1,7 +1,9 @@
|
||||
#ifndef UTIL_LINUX_STATFS_MAGIC_H
|
||||
#define UTIL_LINUX_STATFS_MAGIC_H
|
||||
|
||||
+#ifndef __APPLE__
|
||||
#include <sys/statfs.h>
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* If possible then don't depend on internal libc __SWORD_TYPE type.
|
Loading…
Reference in new issue