From a0b67056ef107f9894de7b9d9382b812c5ac15eb Mon Sep 17 00:00:00 2001 From: Dan Yeaw Date: Sat, 31 Aug 2024 12:20:37 -0400 Subject: [PATCH] Restore building fontconfig --- gvsbuild/projects/__init__.py | 1 + gvsbuild/projects/cairo.py | 3 +-- gvsbuild/projects/fontconfig.py | 38 +++++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 gvsbuild/projects/fontconfig.py diff --git a/gvsbuild/projects/__init__.py b/gvsbuild/projects/__init__.py index 2bbf46c8d..bca783585 100644 --- a/gvsbuild/projects/__init__.py +++ b/gvsbuild/projects/__init__.py @@ -15,6 +15,7 @@ from gvsbuild.projects.enchant import Enchant from gvsbuild.projects.expat import Expat from gvsbuild.projects.ffmpeg import Ffmpeg, NvCodecHeaders +from gvsbuild.projects.fontconfig import Fontconfig from gvsbuild.projects.freerdp import FreeRDP from gvsbuild.projects.freetype import Freetype from gvsbuild.projects.fribidi import Fribidi diff --git a/gvsbuild/projects/cairo.py b/gvsbuild/projects/cairo.py index 05332c05c..20728f942 100644 --- a/gvsbuild/projects/cairo.py +++ b/gvsbuild/projects/cairo.py @@ -28,12 +28,11 @@ def __init__(self): lastversion_even=True, archive_url="https://gitlab.freedesktop.org/cairo/cairo/-/archive/{version}/cairo-{version}.tar.gz", hash="39a78afdc33a435c0f2ab53a5ec2a693c3c9b6d2ec9783ceecb2b94d54d942b0", - dependencies=["freetype", "glib", "pixman", "libpng"], + dependencies=["fontconfig", "freetype", "glib", "pixman", "libpng"], patches=["0001-fix-alloca-unresolved.patch"], ) self.add_param("-Ddwrite=enabled") self.add_param("-Dfreetype=enabled") - self.add_param("-Dfontconfig=disabled") def build(self): Meson.build(self) diff --git a/gvsbuild/projects/fontconfig.py b/gvsbuild/projects/fontconfig.py new file mode 100644 index 000000000..6e2801bc6 --- /dev/null +++ b/gvsbuild/projects/fontconfig.py @@ -0,0 +1,38 @@ +# Copyright (C) 2016 The Gvsbuild Authors +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . + +from gvsbuild.utils.base_builders import Meson +from gvsbuild.utils.base_expanders import Tarball +from gvsbuild.utils.base_project import Project, project_add + + +@project_add +class Fontconfig(Tarball, Meson): + def __init__(self): + Project.__init__( + self, + "fontconfig", + version="2.15.0", + lastversion_even=True, + repository="https://gitlab.freedesktop.org/fontconfig/fontconfig", + archive_url="https://www.freedesktop.org/software/fontconfig/release/fontconfig-{version}.tar.gz", + hash="f5f359d6332861bd497570848fcb42520964a9e83d5e3abe397b6b6db9bcaaf4", + dependencies=["freetype", "gperf", "expat"], + ) + self.add_param("-Dtests=disabled") + + def build(self): + Meson.build(self) + self.install(r".\COPYING share\doc\fontconfig")