30 Commits

Author SHA1 Message Date
Jonathan Marler
a0911c954e windows: fix fontconfig into libxml runtime crash from implicit func decl
Fixes the next issue on windows.  The fontconfig library is calling
the function xmlCreatePushParserCtxt from libxml2, however, the function
declaration was being omitted because fontconfig was not defining
the LIBXML_PUSH_ENABLED preprocessor symbol.  However, instead of a
compile error, C's support for implicit function declrations allows it
to happily call the function anyway, with the wrong ABI.  The main issue
was the return type being implicitly declared as "int" instead of a
pointer.  On my system this was causing the return pointer to be
truncated to 32 bits and then sign-extended which caused a segfault
once it was dereferenced.

I've gone ahead and added the -Werror=implicit-function-declaration
to fontconfig to avoid these issues in the future.  However, this
flag didn't compile on linux so I've left it as Windows only for now.

I also needed to add the LIBXML_STATIC define because not defining it
causes some functions on windows to be declared with
`__declspec(dllimport)` which results in linker errors since we are
actually statically linking libxml2.
2023-09-18 01:12:56 -06:00
Jonathan Marler
a2e881ff4e windows: initial support for zig build test
Makes progress getting "zig build test" to work on windows.  Mostly
fixed issues around build configuration and added some branches throughout
the Zig code to return/throw errors for unimplemented parts.

I also added an initial implementation for getting the home dir.
2023-09-14 03:15:40 -06:00
Kevin Hovsäter
22b8173164 Fix typos 2023-08-08 14:27:34 +02:00
Mitchell Hashimoto
dd18eaab5d fix various build scripts 2023-08-02 15:06:24 -07:00
Mitchell Hashimoto
314f9287b1 Update Zig (#164)
* update zig

* pkg/fontconfig: clean up @as

* pkg/freetype,harfbuzz: clean up @as

* pkg/imgui: clean up @as

* pkg/macos: clean up @as

* pkg/pixman,utf8proc: clean up @as

* clean up @as

* lots more @as cleanup

* undo flatpak changes

* clean up @as
2023-06-30 12:15:31 -07:00
Mitchell Hashimoto
56f8e39e5b Update zig, mach, fmt 2023-06-25 11:08:20 -07:00
Mitchell Hashimoto
7116ce0806 update zig version 2023-05-29 08:24:12 -07:00
Mitchell Hashimoto
97d9157d22 update zig version 2023-05-07 20:50:51 -07:00
Mitchell Hashimoto
8db30107ae pkg: fmt 2023-02-27 21:46:59 -08:00
Mitchell Hashimoto
be75109a1d new build system 2023-02-14 20:58:33 -08:00
Mitchell Hashimoto
7703873142 pkg/fontconfig: charset can add chars 2022-11-17 14:37:36 -08:00
Mitchell Hashimoto
3bd9ed5952 Fix invalid c types with fontconfig 2022-09-23 13:14:08 -07:00
Mitchell Hashimoto
72105fc6cd update to the latest stage2 compiler we can 2022-09-23 12:08:06 -07:00
Mitchell Hashimoto
57a82a26e7 pkg/fontconfig: const pointers 2022-09-17 09:19:00 -07:00
Mitchell Hashimoto
9750ac87fd pkg/fontconfig: pattern get 2022-09-17 09:04:40 -07:00
Mitchell Hashimoto
86f7d0e04e pkg/fontconfig: add some error handling 2022-09-17 08:58:42 -07:00
Mitchell Hashimoto
0d80225977 fontconfig: charset and langset apis 2022-09-16 15:12:02 -07:00
Mitchell Hashimoto
d69f8397f3 pkg/fontconfig: add weights/slants enum 2022-09-16 10:08:49 -07:00
Mitchell Hashimoto
5b215409c6 pkg/fontconfig: pattern.add 2022-09-16 09:55:45 -07:00
Mitchell Hashimoto
77851b30a2 Revert "update to latest Zig nightly"
This reverts commit f3f2c3df268db905b6af6588e5e5008da0f48b60.
2022-09-14 19:39:10 -07:00
Mitchell Hashimoto
f3f2c3df26 update to latest Zig nightly 2022-09-14 19:34:19 -07:00
Mitchell Hashimoto
e4ea27ec37 fontconfig: more APIs 2022-09-14 14:30:18 -07:00
Mitchell Hashimoto
aca36ba79b fontconfig: fc-match 2022-09-14 14:26:42 -07:00
Mitchell Hashimoto
03ab1bedd4 fontconfig: fc-match 2022-09-14 12:49:43 -07:00
Mitchell Hashimoto
eb2ce495b3 fontconfig: font list 2022-09-14 10:14:09 -07:00
Mitchell Hashimoto
ce899dca11 fontconfig: font sets 2022-09-14 10:05:09 -07:00
Mitchell Hashimoto
382f569d65 fontconfig: object sets and patterns 2022-09-14 09:54:48 -07:00
Mitchell Hashimoto
b4d571e018 pkg/fontconfig: disable ubsan (reported upstream) 2022-09-14 09:23:02 -07:00
Mitchell Hashimoto
59191b05cd build fontconfig 2022-09-13 14:34:40 -07:00
Mitchell Hashimoto
d422d1ee78 pkg/fontconfig: starting, not working 2022-09-13 13:53:20 -07:00