aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHennadii Zabula <zabulus12@gmail.com>2017-05-29 12:26:27 +0300
committerHennadii Zabula <zabulus12@gmail.com>2017-06-01 11:18:55 +0300
commit33dd3ee38d2dae173db756beabb9fd2f87bb524c (patch)
tree861546d84667e1cad9e7a1e55b3ef082c64ea75c
parent3ebcdd384b58ff5d5f92996a6eb2e9fed0be1710 (diff)
downloadvcpkg-33dd3ee38d2dae173db756beabb9fd2f87bb524c.tar.gz
vcpkg-33dd3ee38d2dae173db756beabb9fd2f87bb524c.zip
Fix harbuzz build for arm
-rw-r--r--ports/harfbuzz/0001-fix-uwp-build.patch15
-rw-r--r--ports/harfbuzz/CONTROL2
-rw-r--r--ports/harfbuzz/portfile.cmake17
3 files changed, 31 insertions, 3 deletions
diff --git a/ports/harfbuzz/0001-fix-uwp-build.patch b/ports/harfbuzz/0001-fix-uwp-build.patch
new file mode 100644
index 000000000..532ce668e
--- /dev/null
+++ b/ports/harfbuzz/0001-fix-uwp-build.patch
@@ -0,0 +1,15 @@
+diff --git "a/harfbuzz-1.4.6/src/hb-ft.cc" "b/harfbuzz-1.4.6/src/hb-ft.cc"
+index 48d6a0ef..f4ce6608 100644
+--- "a/harfbuzz-1.4.6/src/hb-ft.cc"
++++ "b/harfbuzz-1.4.6/src/hb-ft.cc"
+@@ -31,6 +31,10 @@
+
+ #include "hb-ft.h"
+
++#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP)
++#define generic GenericFromFreeTypeLibrary
++#endif
++
+ #include "hb-font-private.hh"
+
+ #include "hb-cache-private.hh" // Maybe use in the future?
diff --git a/ports/harfbuzz/CONTROL b/ports/harfbuzz/CONTROL
index 6ebe28f37..1544982e2 100644
--- a/ports/harfbuzz/CONTROL
+++ b/ports/harfbuzz/CONTROL
@@ -1,4 +1,4 @@
Source: harfbuzz
Version: 1.4.6
Description: HarfBuzz OpenType text shaping engine
-Build-Depends: freetype, glib
+Build-Depends: freetype, glib [windows]
diff --git a/ports/harfbuzz/portfile.cmake b/ports/harfbuzz/portfile.cmake
index 8c77d1efe..367d12246 100644
--- a/ports/harfbuzz/portfile.cmake
+++ b/ports/harfbuzz/portfile.cmake
@@ -7,13 +7,26 @@ vcpkg_download_distfile(ARCHIVE
)
vcpkg_extract_source_archive(${ARCHIVE})
+vcpkg_apply_patches(
+ SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/
+ PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-fix-uwp-build.patch"
+)
+
+if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
+ SET(HAVE_GLIB "OFF")
+ SET(BUILTIN_UCDN "ON")
+else()
+ SET(HAVE_GLIB "ON")
+ SET(BUILTIN_UCDN "OFF")
+endif()
+
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DHB_HAVE_FREETYPE=ON
- -DHB_HAVE_GLIB=ON
- -DHB_BUILTIN_UCDN=OFF
+ -DHB_HAVE_GLIB=${HAVE_GLIB}
+ -DHB_BUILTIN_UCDN=${BUILTIN_UCDN}
OPTIONS_DEBUG
-DSKIP_INSTALL_HEADERS=ON
)