From c86dbdd73601c44752eb7fd1bd893dd21bb84f1a Mon Sep 17 00:00:00 2001 From: James Walmsley Date: Mon, 27 Jun 2022 21:20:30 +0100 Subject: [PATCH] [HARFBUZZ] Always statically build harfbuzz. --- recipes/skia/layers/harfbuzz.mk | 11 ++++++++++- recipes/skia/layers/skia.mk | 7 +++++-- recipes/skia/recipe.mk | 26 +++++++++++++------------- ve-root | 2 +- 4 files changed, 29 insertions(+), 17 deletions(-) diff --git a/recipes/skia/layers/harfbuzz.mk b/recipes/skia/layers/harfbuzz.mk index d457a96..fed91dc 100644 --- a/recipes/skia/layers/harfbuzz.mk +++ b/recipes/skia/layers/harfbuzz.mk @@ -3,9 +3,18 @@ include $(DEFINE_LAYER) HARFBUZZ_GIT_REF?=4.2.1 + + $(call git_clone, harfbuzz, https://github.com/harfbuzz/harfbuzz.git, $(HARFBUZZ_GIT_REF)) -$(call meson, harfbuzz) + +HARFBUZZ_OPTIONS:=-Dtests=disabled + +ifdef WINDOWS + HARFBUZZ_OPTIONS += -Db_vscrt=mt -Ddefault_library=static +endif + +$(call meson, harfbuzz, $(HARFBUZZ_OPTIONS)) include $(BUILD_LAYER) diff --git a/recipes/skia/layers/skia.mk b/recipes/skia/layers/skia.mk index 6de44e5..b0f3142 100644 --- a/recipes/skia/layers/skia.mk +++ b/recipes/skia/layers/skia.mk @@ -34,6 +34,7 @@ $(L) += $(skia_cmake) DEPENDS += fontconfig +DEPENDS += harfbuzz include $(BUILD_LAYER) @@ -110,12 +111,14 @@ ifndef WINDOWS cp -rv $(srcdir)/skia/include $(PKGROOT)/$(PREFIX)/include/skia cp $(builddir)/skia/libskia.a $(SYSROOT)/$(PREFIX)/$(LIBDIR)/ cp $(builddir)/skia/libskia.a $(PKGROOT)/$(PREFIX)/$(LIBDIR)/ + cp $(SYSROOT)/$(PREFIX)/$(LIBDIR)/libharfbuzz.a $(PKGROOT)/$(PREFIX)/$(LIBDIR)/ + cp -r $(SYSROOT)/$(PREFIX)/include/harfbuzz $(PKGROOT)/$(PREFIX)/include/ else mkdir -p $(PKGROOT)/$(PREFIX)/include/skia mkdir -p $(PKGROOT)/$(PREFIX)/$(LIBDIR) cp -rv $(srcdir)/skia/include $(PKGROOT)/$(PREFIX)/include/skia cp $(builddir)/skia/skia.lib $(PKGROOT)/$(PREFIX)/$(LIBDIR)/ - cp $(SYSROOT)/lib/libharfbuzz.a $(PKGROOT)/$(PREFIX)/$(LIBDIR)/ + cp $(SYSROOT)/$(LIBDIR)/libharfbuzz.a $(PKGROOT)/$(PREFIX)/$(LIBDIR)/ cp -r $(SYSROOT)/include/harfbuzz $(PKGROOT)/$(PREFIX)/include/ endif $(stamp) @@ -132,7 +135,7 @@ endif $(skia_cmake): $(skia_install) cp $(BASE_skia)/skia.cmake.in $@ echo "set(SKIA_PREFIX $(PREFIX))" > $@ - echo "set(SKIA_LIBDIR $(PREFIX)/lib64)" >> $@ + echo "set(SKIA_LIBDIR $(PREFIX)/$(LIBDIR))" >> $@ for def in $(shell cat $(skia_describe)) ; do \ echo "list(APPEND SKIA_COMPILE_DEFINES -D$${def})" >> $@ ; \ done diff --git a/recipes/skia/recipe.mk b/recipes/skia/recipe.mk index 3d3707a..856d9c1 100644 --- a/recipes/skia/recipe.mk +++ b/recipes/skia/recipe.mk @@ -10,26 +10,26 @@ SYSROOT?=$(OUT)/buildroot # PKGROOT?=$(OUT)/sysroot -ifeq ($(CC),cc) -ifneq ($(shell which gcc-10 2> /dev/null),) -export CC:=gcc-10 -export CXX:=g++-10 -endif -endif + +PREFIX:=usr/local +LIBDIR:=lib CLANG?=clang-13 CLANGXX?=clang++-13 ifdef WINDOWS -export CC:=cl -export CXX:=cl + export CC:=cl + export CXX:=cl +else + ifeq ($(CC),cc) + ifneq ($(shell which gcc-10 2> /dev/null),) + export CC:=gcc-10 + export CXX:=g++-10 + endif + endif + HOST:=$(shell $(CC) -dumpmachine) endif -HOST:=$(shell $(CC) -dumpmachine) - -PREFIX:=usr/local -LIBDIR:=lib - ifeq ($(HOST),x86_64-linux-gnu) LIBDIR:=lib64 endif diff --git a/ve-root b/ve-root index a273b1b..76da1b6 160000 --- a/ve-root +++ b/ve-root @@ -1 +1 @@ -Subproject commit a273b1bb30b487495841863298e6e7c9f281bab4 +Subproject commit 76da1b6c04f4e47db204a397573a29fdd01798b2