Ports: Fix building harfbuzz against freetype

This commit is contained in:
Dominika Liberda 2023-07-02 07:48:00 +02:00 committed by Jelle Raaijmakers
parent ff402b1b42
commit 815fc034ff
3 changed files with 37 additions and 1 deletions

View file

@ -5,7 +5,12 @@ files="https://github.com/harfbuzz/harfbuzz/releases/download/${version}/harfbuz
useconfigure='true'
auth_type='sha256'
depends=("freetype" "libicu")
configopts=("-DCMAKE_TOOLCHAIN_FILE=${SERENITY_BUILD_DIR}/CMakeToolchain.txt" "-DHB_HAVE_FREETYPE=ON" "-DHB_HAVE_ICU=ON")
configopts=(
"-DCMAKE_TOOLCHAIN_FILE=${SERENITY_BUILD_DIR}/CMakeToolchain.txt"
'-DHB_HAVE_FREETYPE=ON'
'-DHB_HAVE_ICU=ON'
'-DCMAKE_C_FLAGS=-lfreetype'
)
configure() {
run mkdir -p build

View file

@ -0,0 +1,26 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dominika Liberda <ja@sdomi.pl>
Date: Tue, 13 Jun 2023 23:09:19 +0200
Subject: [PATCH] Build against freetype
---
CMakeLists.txt | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9a1d9032fcde002c27ab5b06c9665c1ca843d13a..c654284a3e6b9511b0433b8c0d25fccb57df30fb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -37,10 +37,8 @@ option(HB_HAVE_FREETYPE "Enable freetype interop helpers" OFF)
option(HB_HAVE_GRAPHITE2 "Enable Graphite2 complementary shaper" OFF)
option(HB_HAVE_GLIB "Enable glib unicode functions" OFF)
option(HB_HAVE_ICU "Enable icu unicode functions" OFF)
-if (TARGET freetype)
- set (HB_HAVE_FREETYPE ON)
- add_definitions(-DHAVE_FREETYPE=1)
-endif ()
+set (HB_HAVE_FREETYPE ON)
+add_definitions(-DHAVE_FREETYPE=1)
if (APPLE)
option(HB_HAVE_CORETEXT "Enable CoreText shaper backend on macOS" ON)
set (CMAKE_MACOSX_RPATH ON)

View file

@ -5,3 +5,8 @@
Mark a possibly-unused variable as [[maybe_unused]]
## `0002-Build-against-freetype.patch`
Build against freetype