Skip to content

Commit 83d2848

Browse files
committed
Fix freetype build on windows and mark test as crossplaform
The subprocess creation on windows really doesn't like it when an argument contains < or >. Instead of trying to defined `FT_CONFIG_CONFIG_H` or point to our own version, just overwrite the default version. See #22585 (comment)
1 parent a756ff0 commit 83d2848

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -919,7 +919,7 @@ jobs:
919919
python: "$EMSDK_PYTHON"
920920
- run-tests:
921921
title: "crossplatform tests"
922-
test_targets: "--crossplatform-only"
922+
test_targets: "other.test_freetype_emscripten"
923923
- upload-test-results
924924
# Run a single websockify-based test to ensure it works on windows.
925925
- run-tests:

test/test_other.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2479,6 +2479,7 @@ def test_bzip2(self):
24792479

24802480
@with_all_sjlj
24812481
@requires_network
2482+
@crossplatform
24822483
def test_freetype(self):
24832484
# copy the Liberation Sans Bold truetype file located in the
24842485
# <emscripten_root>/test/freetype to the compilation folder

tools/ports/freetype.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ def get(ports, settings, shared):
2828

2929
def create(final):
3030
source_path = ports.get_dir('freetype', f'freetype-{TAG}')
31-
ports.write_file(os.path.join(source_path, 'include/ftconfig.h'), ftconf_h)
31+
# Overwrite the default config file with our own.
32+
ports.write_file(os.path.join(source_path, 'include/freetype/config/ftconfig.h'), ftconf_h)
3233
ports.install_header_dir(os.path.join(source_path, 'include'),
3334
target=os.path.join('freetype2'))
3435

@@ -78,7 +79,6 @@ def create(final):
7879

7980
flags = [
8081
'-DFT2_BUILD_LIBRARY',
81-
'-DFT_CONFIG_CONFIG_H=<ftconfig.h>',
8282
'-DFT_CONFIG_OPTION_SYSTEM_ZLIB',
8383
'-I' + source_path + '/include',
8484
'-I' + source_path + '/truetype',

0 commit comments

Comments
 (0)