Merge pull request #985 from Mixaill/pango-static

[pango] update to 1.40.5, enable static build
This commit is contained in:
Robert Schumacher 2017-05-03 12:59:30 -07:00 committed by GitHub
commit 9d7e859143
4 changed files with 41 additions and 10 deletions

View File

@ -0,0 +1,28 @@
From 9e7d3a6ea06e1fb661e0aa4b60c6efa9a5684d9d Mon Sep 17 00:00:00 2001
From: Mikhail Paulyshka <me@mixaill.tk>
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

View File

@ -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})

View File

@ -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

View File

@ -1,26 +1,26 @@
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.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})
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()