From c1be388203161e75e5b095dcaf89a3413ea2804d Mon Sep 17 00:00:00 2001 From: Kyle Benesch <4b796c65+github@gmail.com> Date: Sat, 31 Jan 2026 23:36:20 -0800 Subject: [PATCH 1/2] Fetch Freetype source tarballs from GitLab The old host is still unavailable. This is needed to fix build scripts and CI. Resolves #200 GitLab is picked over GitHub because of the archive format, GitHub only has zips. `tarfile.open` call modified to use universal compression since there's no `.tar.xz` file available. Test rexgex updated to understand the new source file syntax. FreeType 2.13.2 accidentally pinned its CMake version to 3.0 which is no longer supported by CMake. `-DCMAKE_POLICY_VERSION_MINIMUM=3.5` is added as a workaround and must be removed after updating FreeType. --- setup-build-freetype.py | 9 +++++---- tests/smoke_test.py | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/setup-build-freetype.py b/setup-build-freetype.py index 9d2ee8c..19a2385 100644 --- a/setup-build-freetype.py +++ b/setup-build-freetype.py @@ -25,10 +25,10 @@ # Needed for the GitHub Actions macOS CI runner, which appears to come without CAs. import certifi -FREETYPE_HOST = "https://mirrors.sarata.com/non-gnu/freetype/" -FREETYPE_TARBALL = "freetype-2.13.2.tar.xz" +FREETYPE_HOST = "https://gitlab.freedesktop.org/freetype/freetype/-/archive/VER-2-13-2/" +FREETYPE_TARBALL = "freetype-VER-2-13-2.tar.bz2" FREETYPE_URL = FREETYPE_HOST + FREETYPE_TARBALL -FREETYPE_SHA256 = "12991c4e55c506dd7f9b765933e62fd2be2e06d421505d7950a132e4f1bb484d" +FREETYPE_SHA256 = "175f39fd796410d136451ce9637f26d359b44258c8a2005682bacb326db80478" HARFBUZZ_HOST = "https://github.com/harfbuzz/harfbuzz/releases/download/8.3.0/" HARFBUZZ_TARBALL = "harfbuzz-8.3.0.tar.xz" HARFBUZZ_URL = HARFBUZZ_HOST + HARFBUZZ_TARBALL @@ -43,6 +43,7 @@ build_dir_hb = path.join(build_dir, HARFBUZZ_TARBALL.split(".tar")[0], "build") CMAKE_GLOBAL_SWITCHES = ( + "-DCMAKE_POLICY_VERSION_MINIMUM=3.5 " # FT==2.13.2 hack, remove after updating "-DCMAKE_COLOR_MAKEFILE=false " '-DCMAKE_PREFIX_PATH="{}" ' '-DCMAKE_INSTALL_PREFIX="{}" ' @@ -146,7 +147,7 @@ def ensure_downloaded(url, sha256_sum): hasher.update(tb.read()) assert hasher.hexdigest() == sha256_sum - with tarfile.open(tarball, "r:xz") as tb: + with tarfile.open(tarball, "r:*") as tb: tb.extractall(build_dir) diff --git a/tests/smoke_test.py b/tests/smoke_test.py index ba99ff3..18cc7c3 100644 --- a/tests/smoke_test.py +++ b/tests/smoke_test.py @@ -31,7 +31,7 @@ def test_bundle_version(): import re p = os.path.join(test_folder, "..", "setup-build-freetype.py") with open(p) as f: - m = re.findall(r"freetype-(\d+)\.(\d+)\.?(\d+)?\.tar", f.read()) + m = re.findall(r"freetype-(?:VER-)?(\d+)\D(\d+)\D?(\d+)?\.tar", f.read()) version = m[0] if not version[2]: version = (int(version[0]), int(version[1]), 0) From 4c7fc12e0a06964c7e90fc1393024f25568abc8c Mon Sep 17 00:00:00 2001 From: Kyle Benesch <4b796c65+github@gmail.com> Date: Sun, 1 Feb 2026 02:36:45 -0800 Subject: [PATCH 2/2] Fetch FreeType from download.savannah.gnu.org --- setup-build-freetype.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup-build-freetype.py b/setup-build-freetype.py index 19a2385..109f9bf 100644 --- a/setup-build-freetype.py +++ b/setup-build-freetype.py @@ -25,10 +25,10 @@ # Needed for the GitHub Actions macOS CI runner, which appears to come without CAs. import certifi -FREETYPE_HOST = "https://gitlab.freedesktop.org/freetype/freetype/-/archive/VER-2-13-2/" -FREETYPE_TARBALL = "freetype-VER-2-13-2.tar.bz2" +FREETYPE_HOST = "https://download.savannah.gnu.org/releases/freetype/" +FREETYPE_TARBALL = "freetype-2.13.2.tar.xz" FREETYPE_URL = FREETYPE_HOST + FREETYPE_TARBALL -FREETYPE_SHA256 = "175f39fd796410d136451ce9637f26d359b44258c8a2005682bacb326db80478" +FREETYPE_SHA256 = "12991c4e55c506dd7f9b765933e62fd2be2e06d421505d7950a132e4f1bb484d" HARFBUZZ_HOST = "https://github.com/harfbuzz/harfbuzz/releases/download/8.3.0/" HARFBUZZ_TARBALL = "harfbuzz-8.3.0.tar.xz" HARFBUZZ_URL = HARFBUZZ_HOST + HARFBUZZ_TARBALL