|
|
|
@ -4,20 +4,28 @@ package("freetype") |
|
|
|
|
set_description("A freely available software library to render fonts.") |
|
|
|
|
|
|
|
|
|
if is_plat("windows") then |
|
|
|
|
set_urls("https://github.com/ubawurinna/freetype-windows-binaries/releases/download/v$(version)/freetype-$(version).zip") |
|
|
|
|
add_versions("2.9.1", "5238a18447b6611e8838d23c42174e5429b730b91c5aa3747b3eb4e3fc0720a7") |
|
|
|
|
set_urls("https://github.com/ubawurinna/freetype-windows-binaries/archive/v$(version).tar.gz") |
|
|
|
|
add_versions("2.9.1", "60f788b63f1243a30e01611694ed196ee5ad1b89d553527700e5359d57d33b82") |
|
|
|
|
add_versions("2.10.4", "24d7d3ab605e9f9b338adf0c4200ab14f6601a8c41a98741b9d1ecb3e759869c") |
|
|
|
|
else |
|
|
|
|
set_urls("https://downloads.sourceforge.net/project/freetype/freetype2/$(version)/freetype-$(version).tar.bz2", |
|
|
|
|
"https://download.savannah.gnu.org/releases/freetype/freetype-$(version).tar.bz2") |
|
|
|
|
add_versions("2.9.1", "db8d87ea720ea9d5edc5388fc7a0497bb11ba9fe972245e0f7f4c7e8b1e1e84d") |
|
|
|
|
set_urls("https://downloads.sourceforge.net/project/freetype/freetype2/$(version)/freetype-$(version).tar.gz", |
|
|
|
|
"https://download.savannah.gnu.org/releases/freetype/freetype-$(version).tar.gz") |
|
|
|
|
add_versions("2.9.1", "ec391504e55498adceb30baceebd147a6e963f636eb617424bcfc47a169898ce") |
|
|
|
|
add_versions("2.10.4", "5eab795ebb23ac77001cfb68b7d4d50b5d6c7469247b0b01b2c953269f658dac") |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
add_deps("libpng", "bzip2", "zlib") |
|
|
|
|
|
|
|
|
|
if not is_plat("windows") then |
|
|
|
|
add_configs("woff2", {description = "Enable woff2 support.", default = true, type = "boolean"}) |
|
|
|
|
add_includedirs("include/freetype2") |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
on_load("linux", "macosx", function (package) |
|
|
|
|
package:add("deps", "libpng", "bzip2", "zlib") |
|
|
|
|
if package:config("woff2") then |
|
|
|
|
package:add("deps", "brotli") |
|
|
|
|
end |
|
|
|
|
end) |
|
|
|
|
|
|
|
|
|
on_install("windows", function (package) |
|
|
|
|
os.cp("include", package:installdir()) |
|
|
|
|
os.cp(is_arch("x64") and "win64/*" or "win32/*", package:installdir("lib")) |
|
|
|
@ -26,7 +34,8 @@ package("freetype") |
|
|
|
|
on_install("linux", "macosx", function (package) |
|
|
|
|
local configs = { "--enable-freetype-config", |
|
|
|
|
"--without-harfbuzz", |
|
|
|
|
"--enable-shared=no"} |
|
|
|
|
"--disable-shared", |
|
|
|
|
"--with-pic"} |
|
|
|
|
import("package.tools.autoconf").install(package, configs) |
|
|
|
|
end) |
|
|
|
|
|
|
|
|
|