From 3095c9f5bb11b157eb141ed3bea62eea02ed4e8e Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Thu, 27 Apr 2017 01:39:05 +0300 Subject: [PATCH 1/2] [pango] update to 1.40.5 --- ports/pango/CONTROL | 2 +- ports/pango/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/pango/CONTROL b/ports/pango/CONTROL index fbc4047522..89a742b797 100644 --- a/ports/pango/CONTROL +++ b/ports/pango/CONTROL @@ -1,4 +1,4 @@ Source: pango -Version: 1.40.4 +Version: 1.40.5-1 Description: Text and font handling library. Build-Depends: glib, gettext, cairo, fontconfig, freetype, harfbuzz diff --git a/ports/pango/portfile.cmake b/ports/pango/portfile.cmake index c3eec97281..3fa54f5a10 100644 --- a/ports/pango/portfile.cmake +++ b/ports/pango/portfile.cmake @@ -5,12 +5,12 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL static) endif() include(vcpkg_common_functions) -set(PANGO_VERSION 1.40.4) +set(PANGO_VERSION 1.40.5) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/pango-${PANGO_VERSION}) vcpkg_download_distfile(ARCHIVE URLS "http://ftp.gnome.org/pub/GNOME/sources/pango/1.40/pango-${PANGO_VERSION}.tar.xz" FILENAME "pango-${PANGO_VERSION}.tar.xz" - SHA512 8c7413f6712eaf9fd4bd92a9260a85e7e4bd5e1a03c4c89db139e1704e8681e9834f8b98394b9f4b87babd45155a15b6cffd583ad8f89a48a4849305d43aa613) + SHA512 40e8bf85dbb4b6fd35da3acec06a0d2b9dde95a3c5a212d243dbcbc0d00f12bd061757a04cb2f4a8db61329efd7ed9be53e3f5d6a2eb2a3defba1d12f9eed43d) vcpkg_extract_source_archive(${ARCHIVE}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) From 880cf74983af310308203ec4a09f0de59a53bd47 Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Thu, 27 Apr 2017 01:39:16 +0300 Subject: [PATCH 2/2] [pango] enable static build --- .../pango/0001-fix-static-symbols-export.diff | 28 +++++++++++++++++++ ports/pango/CMakeLists.txt | 5 +++- ports/pango/portfile.cmake | 12 ++++---- 3 files changed, 38 insertions(+), 7 deletions(-) create mode 100644 ports/pango/0001-fix-static-symbols-export.diff diff --git a/ports/pango/0001-fix-static-symbols-export.diff b/ports/pango/0001-fix-static-symbols-export.diff new file mode 100644 index 0000000000..c09544f5d2 --- /dev/null +++ b/ports/pango/0001-fix-static-symbols-export.diff @@ -0,0 +1,28 @@ +From 9e7d3a6ea06e1fb661e0aa4b60c6efa9a5684d9d Mon Sep 17 00:00:00 2001 +From: Mikhail Paulyshka +Date: Sat, 29 Apr 2017 21:28:12 +0300 +Subject: [PATCH] do not use dllexport for static build + +--- + config.h.win32 | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/config.h.win32 b/config.h.win32 +index 31b330f..e25b5d8 100644 +--- a/config.h.win32 ++++ b/config.h.win32 +@@ -147,7 +147,11 @@ + + /* defines how to decorate public symbols while building */ + #ifdef _MSC_VER ++#ifdef _WINDLL + #define _PANGO_EXTERN __declspec(dllexport) extern + #else ++#define _PANGO_EXTERN extern ++#endif ++#else + #define _PANGO_EXTERN __attribute__((visibility("default"))) __declspec(dllexport) extern + #endif +-- +2.11.0.windows.1 + diff --git a/ports/pango/CMakeLists.txt b/ports/pango/CMakeLists.txt index 4cbf6822e8..f6145dc4c6 100644 --- a/ports/pango/CMakeLists.txt +++ b/ports/pango/CMakeLists.txt @@ -25,7 +25,10 @@ find_path(CAIRO_INCLUDE_DIR cairo.h) if(CMAKE_BUILD_TYPE STREQUAL Debug) set(CAIRO_SUFFIX d) endif() -find_library(CAIRO_LIBRARY cairo${CAIRO_SUFFIX}) +find_library(CAIRO_LIBRARY + NAMES + cairo${CAIRO_SUFFIX} + cairo-static${CAIRO_SUFFIX}) find_library(CAIRO_GOBJECT_LIBRARY cairo-gobject${CAIRO_SUFFIX}) set(CAIRO_LIBRARIES ${CAIRO_LIBRARY} ${CAIRO_GOBJECT_LIBRARY}) diff --git a/ports/pango/portfile.cmake b/ports/pango/portfile.cmake index 3fa54f5a10..0f454a4e5f 100644 --- a/ports/pango/portfile.cmake +++ b/ports/pango/portfile.cmake @@ -1,9 +1,3 @@ - -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(STATUS "Warning: Static building not supported. Building dynamic.") - set(VCPKG_LIBRARY_LINKAGE dynamic) -endif() - include(vcpkg_common_functions) set(PANGO_VERSION 1.40.5) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/pango-${PANGO_VERSION}) @@ -15,12 +9,18 @@ vcpkg_download_distfile(ARCHIVE vcpkg_extract_source_archive(${ARCHIVE}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/0001-fix-static-symbols-export.diff) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS_DEBUG -DPANGO_SKIP_HEADERS=ON) +vcpkg_build_cmake() vcpkg_install_cmake() vcpkg_copy_pdbs()