package("libtasn1") set_homepage("https://www.gnu.org/software/libtasn1/") set_description("Libtasn1 is the ASN.1 library used by GnuTLS, p11-kit and some other packages.") set_license("LGPL-2.1") add_urls("https://ftp.gnu.org/gnu/libtasn1/libtasn1-$(version).tar.gz") add_versions("4.15.0", "dd77509fe8f5304deafbca654dc7f0ea57f5841f41ba530cff9a5bf71382739e") on_install("macosx", "linux", function (package) local configs = {"--disable-doc", "--disable-dependency-tracking", "--with-pic"} if package:config("shared") then table.insert(configs, "--enable-shared") table.insert(configs, "--disable-static") else table.insert(configs, "--disable-shared") table.insert(configs, "--enable-static") end import("package.tools.autoconf").install(package, configs) end) on_test(function (package) assert(package:has_cfuncs("asn1_create_element", {includes = "libtasn1.h"})) end)