diff options
| author | angelmixu <salemixu@gmail.com> | 2019-02-08 00:24:33 +0100 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2019-02-07 15:24:33 -0800 |
| commit | 1eceb88c71b3ed2a12e9a56823c658ebb2e57cc1 (patch) | |
| tree | 2649c23cfa8293b7fdac5f3b43ca5d61a6ff859c | |
| parent | 0b79c4bb74aa1a1908c23edb3ca07b5e6dd39141 (diff) | |
| download | vcpkg-1eceb88c71b3ed2a12e9a56823c658ebb2e57cc1.tar.gz vcpkg-1eceb88c71b3ed2a12e9a56823c658ebb2e57cc1.zip | |
fix build for harfbuzz on macOS (#4776)
* fix library exports for iconv on macOS, add Threads dependency for cairo, add the iconv, intl and Threads dependencies to harfbuzz
* updated portfile from harfbuzz fix
* fix indenting and order
* fix portfile
* [gettext] Add unofficial-gettext targets
* [gettext] Fixup for Linux
| -rw-r--r-- | ports/cairo/CMakeLists.txt | 3 | ||||
| -rw-r--r-- | ports/cairo/CONTROL | 2 | ||||
| -rw-r--r-- | ports/gettext/CMakeLists.txt | 14 | ||||
| -rw-r--r-- | ports/gettext/CONTROL | 4 | ||||
| -rw-r--r-- | ports/gettext/portfile.cmake | 26 | ||||
| -rw-r--r-- | ports/gettext/unofficial-gettext-config.cmake | 1 | ||||
| -rw-r--r-- | ports/harfbuzz/0002-fix-macos-build.patch | 21 | ||||
| -rw-r--r-- | ports/harfbuzz/CONTROL | 4 | ||||
| -rw-r--r-- | ports/harfbuzz/portfile.cmake | 1 |
9 files changed, 61 insertions, 15 deletions
diff --git a/ports/cairo/CMakeLists.txt b/ports/cairo/CMakeLists.txt index 9fc476539..a23d776ed 100644 --- a/ports/cairo/CMakeLists.txt +++ b/ports/cairo/CMakeLists.txt @@ -167,6 +167,9 @@ find_package(Freetype REQUIRED) find_package(unofficial-glib CONFIG REQUIRED) find_package(unofficial-fontconfig CONFIG REQUIRED) find_package(unofficial-pixman CONFIG REQUIRED) +if(APPLE) + find_package(Threads REQUIRED) +endif() # Cairo needs to be told which features of FreeType are availible add_definitions( diff --git a/ports/cairo/CONTROL b/ports/cairo/CONTROL index 365fe38e7..d33147b18 100644 --- a/ports/cairo/CONTROL +++ b/ports/cairo/CONTROL @@ -1,4 +1,4 @@ Source: cairo -Version: 1.15.8-4 +Version: 1.15.8-5 Description: Cairo is a 2D graphics library with support for multiple output devices. Currently supported output targets include the X Window System (via both Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB. Build-Depends: zlib, libpng, pixman, glib, freetype, fontconfig diff --git a/ports/gettext/CMakeLists.txt b/ports/gettext/CMakeLists.txt index c94ab4c13..edf46624d 100644 --- a/ports/gettext/CMakeLists.txt +++ b/ports/gettext/CMakeLists.txt @@ -116,8 +116,22 @@ if(NOT WIN32) endif()
install(TARGETS libintl
+ EXPORT unofficial-gettext-targets
RUNTIME DESTINATION bin
LIBRARY DESTINATION bin
ARCHIVE DESTINATION lib
)
+install(
+ EXPORT unofficial-gettext-targets
+ FILE unofficial-gettext-targets.cmake
+ NAMESPACE unofficial::gettext::
+ DESTINATION share/unofficial-gettext
+)
+
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/unofficial-gettext-config.cmake" "
+include(CMakeFindDependencyMacro)
+find_dependency(unofficial-iconv)
+find_dependency(Threads)
+include(\${CMAKE_CURRENT_LIST_DIR}/unofficial-gettext-targets.cmake)
+")
diff --git a/ports/gettext/CONTROL b/ports/gettext/CONTROL index 76e1d22d4..1f96ff735 100644 --- a/ports/gettext/CONTROL +++ b/ports/gettext/CONTROL @@ -1,4 +1,4 @@ Source: gettext -Version: 0.19-5 -Description: The GNU gettext utilities are a set of tools that provides a framework to help other GNU packages produce multi-lingual messages +Version: 0.19-7 +Description: The GNU gettext utilities are a set of tools that provides a framework to help other GNU packages produce multi-lingual messages. Provides libintl. Build-Depends: libiconv diff --git a/ports/gettext/portfile.cmake b/ports/gettext/portfile.cmake index 2a26817d7..d7283cc90 100644 --- a/ports/gettext/portfile.cmake +++ b/ports/gettext/portfile.cmake @@ -1,18 +1,28 @@ if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + file(COPY ${CMAKE_CURRENT_LIST_DIR}/unofficial-gettext-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/unofficial-gettext) return() endif() #Based on https://github.com/winlibs/gettext include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/gettext-0.19) + +set(GETTEXT_VERSION 0.19) + vcpkg_download_distfile(ARCHIVE - URLS "https://ftp.gnu.org/pub/gnu/gettext/gettext-0.19.tar.gz" "https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gettext/gettext-0.19.tar.gz" - FILENAME "gettext-0.19.tar.gz" + URLS "https://ftp.gnu.org/pub/gnu/gettext/gettext-${GETTEXT_VERSION}.tar.gz" "https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gettext/gettext-${GETTEXT_VERSION}.tar.gz" + FILENAME "gettext-${GETTEXT_VERSION}.tar.gz" SHA512 a5db035c582ff49d45ee6eab9466b2bef918e413a882019c204a9d8903cb3770ddfecd32c971ea7c7b037c7b69476cf7c56dcabc8b498b94ab99f132516c9922 ) -vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${GETTEXT_VERSION} + PATCHES + 0001-Fix-macro-definitions.patch + 0002-Fix-uwp-build.patch +) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt @@ -24,12 +34,6 @@ file(REMOVE ${SOURCE_PATH}/gettext-runtime/intl/libgnuintl.h ${SOURCE_PATH}/gett file(COPY ${CMAKE_CURRENT_LIST_DIR}/libgnuintl.win32.h DESTINATION ${SOURCE_PATH}/gettext-runtime/intl) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-Fix-macro-definitions.patch" - "${CMAKE_CURRENT_LIST_DIR}/0002-Fix-uwp-build.patch" -) - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}/gettext-runtime PREFER_NINJA @@ -38,6 +42,8 @@ vcpkg_configure_cmake( vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-gettext TARGET_PATH share/unofficial-gettext) + # Handle copyright file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/gettext) file(RENAME ${CURRENT_PACKAGES_DIR}/share/gettext/COPYING ${CURRENT_PACKAGES_DIR}/share/gettext/copyright) diff --git a/ports/gettext/unofficial-gettext-config.cmake b/ports/gettext/unofficial-gettext-config.cmake new file mode 100644 index 000000000..3b872142a --- /dev/null +++ b/ports/gettext/unofficial-gettext-config.cmake @@ -0,0 +1 @@ +add_library(unofficial::gettext::libintl INTERFACE IMPORTED)
diff --git a/ports/harfbuzz/0002-fix-macos-build.patch b/ports/harfbuzz/0002-fix-macos-build.patch new file mode 100644 index 000000000..3b32092c1 --- /dev/null +++ b/ports/harfbuzz/0002-fix-macos-build.patch @@ -0,0 +1,21 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 5c613e0..32d3a29 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-cmake_minimum_required(VERSION 2.8.0)
++cmake_minimum_required(VERSION 3.5.0)
+ project(harfbuzz)
+
+ enable_testing()
+@@ -316,6 +316,10 @@ if (HB_HAVE_GLIB)
+
+ find_package(Threads REQUIRED)
+ find_package(unofficial-iconv REQUIRED)
++ if(APPLE)
++ find_package(unofficial-gettext CONFIG REQUIRED)
++ list(APPEND THIRD_PARTY_LIBS unofficial::gettext::libintl)
++ endif()
+ find_package(unofficial-glib CONFIG REQUIRED)
+
+ list(APPEND project_sources ${PROJECT_SOURCE_DIR}/src/hb-glib.cc)
diff --git a/ports/harfbuzz/CONTROL b/ports/harfbuzz/CONTROL index 32d70f5ec..fccb549ff 100644 --- a/ports/harfbuzz/CONTROL +++ b/ports/harfbuzz/CONTROL @@ -1,7 +1,7 @@ Source: harfbuzz -Version: 1.8.4-3 +Version: 1.8.4-4 Description: HarfBuzz OpenType text shaping engine -Build-Depends: freetype, ragel +Build-Depends: freetype, ragel, gettext (osx) Default-Features: ucdn Feature: graphite2 diff --git a/ports/harfbuzz/portfile.cmake b/ports/harfbuzz/portfile.cmake index 382b045e1..d1455e5dc 100644 --- a/ports/harfbuzz/portfile.cmake +++ b/ports/harfbuzz/portfile.cmake @@ -11,6 +11,7 @@ vcpkg_from_github( find-package-freetype-2.patch glib-cmake.patch 0001-fix-cmake-export.patch + 0002-fix-macos-build.patch ) SET(HB_HAVE_ICU "OFF") |
