From f3ccca08f5758733d3ab554affe9cea38dca91de Mon Sep 17 00:00:00 2001 From: angelmixu Date: Wed, 23 Jan 2019 02:50:02 +0100 Subject: [PATCH] fix freetype for macOS (#4774) * added patch to freetype for assigning a value to macros like HAVE_UNISTD_H as using newer macOS Frameworks fail to compile if they have no value * [freetype] Modernize. Bump control version --- ports/freetype/0004-Fix-macOS-defines.patch | 23 +++++++++++++++++++++ ports/freetype/CONTROL | 2 +- ports/freetype/portfile.cmake | 18 +++++++++------- 3 files changed, 34 insertions(+), 9 deletions(-) create mode 100644 ports/freetype/0004-Fix-macOS-defines.patch diff --git a/ports/freetype/0004-Fix-macOS-defines.patch b/ports/freetype/0004-Fix-macOS-defines.patch new file mode 100644 index 0000000000..92e676b520 --- /dev/null +++ b/ports/freetype/0004-Fix-macOS-defines.patch @@ -0,0 +1,23 @@ +--- a/CMakeLists.txt 2018-11-16 10:49:22.000000000 +0100 ++++ b/CMakeLists.txt 2018-11-16 10:50:26.000000000 +0100 +@@ -200,17 +200,17 @@ + FTCONFIG_H) + if (HAVE_UNISTD_H) + string(REGEX REPLACE +- "#undef +(HAVE_UNISTD_H)" "#define \\1" ++ "#undef +(HAVE_UNISTD_H)" "#define \\1 1" + FTCONFIG_H "${FTCONFIG_H}") + endif () + if (HAVE_FCNTL_H) + string(REGEX REPLACE +- "#undef +(HAVE_FCNTL_H)" "#define \\1" ++ "#undef +(HAVE_FCNTL_H)" "#define \\1 1" + FTCONFIG_H "${FTCONFIG_H}") + endif () + if (HAVE_STDINT_H) + string(REGEX REPLACE +- "#undef +(HAVE_STDINT_H)" "#define \\1" ++ "#undef +(HAVE_STDINT_H)" "#define \\1 1" + FTCONFIG_H "${FTCONFIG_H}") + endif () + string(REPLACE "/undef " "#undef " diff --git a/ports/freetype/CONTROL b/ports/freetype/CONTROL index 567cf90202..1052412b41 100644 --- a/ports/freetype/CONTROL +++ b/ports/freetype/CONTROL @@ -1,4 +1,4 @@ Source: freetype -Version: 2.8.1-3 +Version: 2.8.1-4 Build-Depends: zlib, bzip2, libpng Description: A library to render fonts. diff --git a/ports/freetype/portfile.cmake b/ports/freetype/portfile.cmake index d74c53220f..e60f9ecb3a 100644 --- a/ports/freetype/portfile.cmake +++ b/ports/freetype/portfile.cmake @@ -1,18 +1,20 @@ include(vcpkg_common_functions) + set(FT_VERSION 2.8.1) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/freetype-${FT_VERSION}) vcpkg_download_distfile(ARCHIVE URLS "https://download-mirror.savannah.gnu.org/releases/freetype/freetype-${FT_VERSION}.tar.bz2" FILENAME "freetype-${FT_VERSION}.tar.bz2" SHA512 ca59e47f0fceeeb9b8032be2671072604d0c79094675df24187829c05e99757d0a48a0f8062d4d688e056f783aa8f6090d732ad116562e94784fccf1339eb823 ) -vcpkg_extract_source_archive(${ARCHIVE}) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001-Support-Windows-DLLs-via-CMAKE_WINDOWS_EXPORT_ALL_SY.patch - ${CMAKE_CURRENT_LIST_DIR}/0002-Add-CONFIG_INSTALL_PATH-option.patch - ${CMAKE_CURRENT_LIST_DIR}/0003-Fix-UWP.patch +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${FT_VERSION} + PATCHES + 0001-Support-Windows-DLLs-via-CMAKE_WINDOWS_EXPORT_ALL_SY.patch + 0002-Add-CONFIG_INSTALL_PATH-option.patch + 0003-Fix-UWP.patch + 0004-Fix-macOS-defines.patch ) vcpkg_configure_cmake(