-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathcompat.freetype.lua
More file actions
105 lines (103 loc) · 4.25 KB
/
Copy pathcompat.freetype.lua
File metadata and controls
105 lines (103 loc) · 4.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
-- compat.freetype — FreeType 2.13.3 font rendering engine.
-- Built from aggregate source files (~20 .c files), depends on compat.libpng.
-- EUI-NEO uses FreeType for all text/font rendering.
--
-- Build strategy: aggregate source files (one per module directory).
-- This is the recommended approach for non-CMake/autotools builds.
--
-- All `mcpp` paths are GLOBS relative to the verdir; the leading `*/`
-- absorbs the tarball's `freetype-VER-2-13-3/` wrap layer.
package = {
spec = "1",
namespace = "compat",
name = "freetype",
description = "FreeType 2 — portable font engine with TrueType/CFF/WOFF/SVG support",
licenses = {"FreeType"},
repo = "https://gitlab.freedesktop.org/freetype/freetype",
type = "package",
xpm = {
linux = {
["2.13.3"] = {
url = "https://github.com/freetype/freetype/archive/refs/tags/VER-2-13-3.tar.gz",
sha256 = "bc5c898e4756d373e0d991bab053036c5eb2aa7c0d5c67e8662ddc6da40c4103",
},
},
macosx = {
["2.13.3"] = {
url = "https://github.com/freetype/freetype/archive/refs/tags/VER-2-13-3.tar.gz",
sha256 = "bc5c898e4756d373e0d991bab053036c5eb2aa7c0d5c67e8662ddc6da40c4103",
},
},
windows = {
["2.13.3"] = {
url = "https://github.com/freetype/freetype/archive/refs/tags/VER-2-13-3.tar.gz",
sha256 = "bc5c898e4756d373e0d991bab053036c5eb2aa7c0d5c67e8662ddc6da40c4103",
},
},
},
mcpp = {
language = "c++23",
import_std = false,
c_standard = "gnu11",
include_dirs = { "*/include" },
sources = {
-- Base (aggregate + required extra files)
"*/src/base/ftbase.c",
"*/src/base/ftinit.c",
"*/src/base/ftglyph.c",
"*/src/base/ftbitmap.c",
"*/src/base/ftbbox.c",
-- Base extra (individual)
"*/src/base/ftmm.c",
-- Modules (aggregates)
"*/src/autofit/autofit.c",
"*/src/bdf/bdf.c",
"*/src/cff/cff.c",
"*/src/cid/type1cid.c",
"*/src/cache/ftcache.c",
"*/src/gzip/ftgzip.c",
"*/src/lzw/ftlzw.c",
"*/src/pcf/pcf.c",
"*/src/pfr/pfr.c",
"*/src/psaux/psaux.c",
"*/src/pshinter/pshinter.c",
"*/src/psnames/psnames.c",
"*/src/raster/raster.c",
"*/src/sdf/sdf.c",
"*/src/sfnt/sfnt.c",
"*/src/smooth/smooth.c",
"*/src/svg/svg.c",
"*/src/truetype/truetype.c",
"*/src/type1/type1.c",
"*/src/type42/type42.c",
"*/src/winfonts/winfnt.c",
},
targets = { ["freetype"] = { kind = "lib" } },
deps = { ["compat.libpng"] = "1.6.43" },
-- Only the FT_* configuration defines are portable. `cl` accepts -D, so
-- these reach MSVC unchanged; a -W switch does not -- see below.
cflags = { "-DFT2_BUILD_LIBRARY", "-DFT_DISABLE_ZLIB", "-DFT_DISABLE_BZIP2", "-DFT_DISABLE_HARFBUZZ", "-DFT_DISABLE_BROTLI" },
linux = {
ldflags = { "-lm" },
sources = { "*/builds/unix/ftsystem.c", "*/src/base/ftdebug.c" },
-- -Wno-implicit-function-declaration is a GCC/Clang switch. It used
-- to sit in the common cflags, where MSVC rejected it outright with
-- `D8021: invalid numeric argument`, so the package could not build
-- on Windows at all.
cflags = { "-include", "fcntl.h", "-Wno-implicit-function-declaration" },
},
macosx = {
ldflags = { "-lm" },
sources = { "*/builds/unix/ftsystem.c", "*/src/base/ftdebug.c" },
-- _DARWIN_C_SOURCE belongs here and nowhere else; it was in the
-- common cflags, which put an Apple feature macro on every platform.
cflags = { "-include", "fcntl.h", "-Wno-implicit-function-declaration", "-D_DARWIN_C_SOURCE" },
},
windows = {
sources = {
"*/builds/windows/ftdebug.c",
"*/builds/windows/ftsystem.c",
},
},
},
}