add krb5 and gobject-introspection (#683)
* add krb5 * add gobject-introspection * update harfbuzzpull/684/head
parent
eb4711f89f
commit
ce1446e7a1
3 changed files with 73 additions and 0 deletions
@ -0,0 +1,28 @@ |
||||
package("gobject-introspection") |
||||
|
||||
set_homepage("https://gi.readthedocs.io/en/latest/") |
||||
set_description("GObject introspection is a middleware layer between C libraries (using GObject) and language bindings.") |
||||
set_license("LGPL-2.0") |
||||
|
||||
add_urls("https://download.gnome.org/sources/gobject-introspection/$(version).tar.xz", {version = function (version) |
||||
return format("%d.%d/gobject-introspection-%s", version:major(), version:minor(), version) |
||||
end}) |
||||
add_versions("1.70.0", "902b4906e3102d17aa2fcb6dad1c19971c70f2a82a159ddc4a94df73a3cafc4a") |
||||
|
||||
add_configs("shared", {description = "Build shared library.", default = true, type = "boolean", readonly = true}) |
||||
|
||||
if is_plat("linux") then |
||||
add_extsources("apt::libgirepository1.0-dev") |
||||
end |
||||
|
||||
add_deps("meson", "ninja", "pkg-config", "python 3.x", "flex", "bison") |
||||
add_deps("glib", {configs = {shared = true}}) |
||||
add_includedirs("include/gobject-introspection-1.0") |
||||
on_install("macosx", "linux", function (package) |
||||
import("package.tools.meson").install(package) |
||||
package:addenv("PATH", "bin") |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:has_cfuncs("g_irepository_get_default", {includes = "girepository.h"})) |
||||
end) |
@ -0,0 +1,44 @@ |
||||
package("krb5") |
||||
|
||||
set_homepage("http://web.mit.edu/kerberos/") |
||||
set_description("Kerberos: The Network Authentication Protocol") |
||||
|
||||
add_urls("https://kerberos.org/dist/krb5/$(version).tar.gz", {version = function (version) |
||||
return format("%d.%d/krb5-%s", version:major(), version:minor(), version) |
||||
end}) |
||||
add_versions("1.19.2", "10453fee4e3a8f8ce6129059e5c050b8a65dab1c257df68b99b3112eaa0cdf6a") |
||||
|
||||
add_configs("tls", {description = "Enable TLS/OpenSSL support.", default = false, type = "boolean"}) |
||||
add_configs("shared", {description = "Build shared library.", default = true, type = "boolean", readonly = true}) |
||||
|
||||
add_deps("bison", "libverto") |
||||
add_links("k5crypto", "kdb5", "krad", "gssapi_krb5", "krb5support", "krb5", "gssrpc", "verto", "com_err") |
||||
on_load("macosx", "linux", function (package) |
||||
if package:config("tls") then |
||||
package:add("deps", "openssl") |
||||
end |
||||
end) |
||||
|
||||
on_install("macosx", "linux", function (package) |
||||
os.cd("src") |
||||
local configs = {"--disable-dependency-tracking", "--with-system-verto"} |
||||
table.insert(configs, "--with-tls-impl=" .. (package:config("tls") and "openssl" or "no")) |
||||
local cppflags = {} |
||||
local ldflags = {} |
||||
for _, dep in ipairs(package:orderdeps()) do |
||||
local fetchinfo = dep:fetch() |
||||
if fetchinfo then |
||||
for _, includedir in ipairs(fetchinfo.includedirs or fetchinfo.sysincludedirs) do |
||||
table.insert(cppflags, "-I" .. includedir) |
||||
end |
||||
for _, linkdir in ipairs(fetchinfo.linkdirs) do |
||||
table.insert(ldflags, "-L" .. linkdir) |
||||
end |
||||
end |
||||
end |
||||
import("package.tools.autoconf").install(package, configs, {cppflags = cppflags, ldflags = ldflags}) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:has_cfuncs("krb5_c_encrypt", {includes = "krb5.h"})) |
||||
end) |
Loading…
Reference in new issue