aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorangelmixu <salemixu@gmail.com>2018-12-06 01:30:25 +0100
committerRobert Schumacher <roschuma@microsoft.com>2018-12-05 16:30:25 -0800
commit4456dcab406eec335e41ed825264345bc74c3e2f (patch)
treed83ee86445035a324ed393ea242e2c1c9a59687b
parent11bee32d76b1bccce894dab443ccb032d2930700 (diff)
downloadvcpkg-4456dcab406eec335e41ed825264345bc74c3e2f.tar.gz
vcpkg-4456dcab406eec335e41ed825264345bc74c3e2f.zip
Fix pango on macOS (#4784)
* fix pango for macOS: added an already parsed config.h.unix and moved win32 code conditionally for platform * use a list for better viewing wich source files are added * only define HAVE_CORE_TEXT on macOS * [pango] Modernize. Bump control version. Fix configure into source directory.
-rw-r--r--ports/pango/CMakeLists.txt26
-rw-r--r--ports/pango/CONTROL2
-rw-r--r--ports/pango/config.h.unix153
-rw-r--r--ports/pango/portfile.cmake20
4 files changed, 185 insertions, 16 deletions
diff --git a/ports/pango/CMakeLists.txt b/ports/pango/CMakeLists.txt
index 9c7e7f182..71b5f9fed 100644
--- a/ports/pango/CMakeLists.txt
+++ b/ports/pango/CMakeLists.txt
@@ -5,9 +5,14 @@ set(PANGO_LIB_SUFFIX 1.0)
set(PANGO_DLL_SUFFIX 1)
set(GLIB_LIB_VERSION 2.0)
-configure_file(./config.h.win32 ${CMAKE_SOURCE_DIR}/config.h COPYONLY)
+if(WIN32)
+ configure_file(./config.h.win32 ${CMAKE_CURRENT_BINARY_DIR}/config.h COPYONLY)
+else()
+ configure_file(./config.h.unix ${CMAKE_CURRENT_BINARY_DIR}/config.h COPYONLY)
+endif()
+
add_definitions(-DHAVE_CONFIG_H)
-include_directories(. ./pango)
+include_directories(. ./pango ${CMAKE_CURRENT_BINARY_DIR})
# find libintl
find_path(LIBINTL_INCLUDE_DIR libintl.h)
@@ -100,12 +105,14 @@ pango_add_module(pango
pango/shape.c
pango/pango-enum-types.c)
+if(WIN32)
pango_add_module(pangowin32
pango/pangowin32.c
pango/pangowin32-fontcache.c
pango/pangowin32-fontmap.c
pango/pangowin32-shape.c)
target_link_libraries(pangowin32 usp10 pango)
+endif()
pango_add_module(pangoft2
pango/pangofc-font.c
@@ -122,18 +129,25 @@ pango_add_module(pangoft2
target_link_libraries(pangoft2 pango ${FONT_LIBRARIES})
target_include_directories(pangoft2 PRIVATE ${FONT_INCLUDE_DIRS})
-pango_add_module(pangocairo
- pango/pangocairo-fcfont.c
+list(APPEND PANGO_CAIRO_SOURCES
+ pango/pangocairo-fcfont.c
pango/pangocairo-fcfontmap.c
- pango/pangocairo-win32font.c
- pango/pangocairo-win32fontmap.c
pango/pangocairo-context.c
pango/pangocairo-font.c
pango/pangocairo-fontmap.c
pango/pangocairo-render.c)
+
+if(WIN32)
+ list(APPEND PANGO_CAIRO_SOURCES
+ pango/pangocairo-win32font.c
+ pango/pangocairo-win32fontmap.c)
+endif()
+
+pango_add_module(pangocairo ${PANGO_CAIRO_SOURCES})
target_link_libraries(pangocairo ${CAIRO_LIBRARIES} pango pangowin32 pangoft2 ${FONT_LIBRARIES})
target_include_directories(pangocairo PRIVATE ${CAIRO_INCLUDE_DIR} ${FONT_INCLUDE_DIRS})
+
if(NOT PANGO_SKIP_HEADERS)
install(FILES
pango/pango.h
diff --git a/ports/pango/CONTROL b/ports/pango/CONTROL
index daeeb53db..e7b365e0b 100644
--- a/ports/pango/CONTROL
+++ b/ports/pango/CONTROL
@@ -1,4 +1,4 @@
Source: pango
-Version: 1.40.11-1
+Version: 1.40.11-2
Description: Text and font handling library.
Build-Depends: glib, gettext, cairo, fontconfig, freetype, harfbuzz[glib] (!windows-static)
diff --git a/ports/pango/config.h.unix b/ports/pango/config.h.unix
new file mode 100644
index 000000000..83b2f52fd
--- /dev/null
+++ b/ports/pango/config.h.unix
@@ -0,0 +1,153 @@
+/* config.h. Generated from config.h.in by configure. */
+/* config.h.in. Generated from configure.ac by autoheader. */
+
+/* Have usable Cairo library and font backend */
+#define HAVE_CAIRO 1
+
+/* Whether Cairo can use FreeType for fonts */
+#define HAVE_CAIRO_FREETYPE 1
+
+/* Whether Cairo has PDF support */
+/* #undef HAVE_CAIRO_PDF */
+
+/* Whether Cairo has PNG support */
+/* #undef HAVE_CAIRO_PNG */
+
+/* Whether Cairo has PS support */
+/* #undef HAVE_CAIRO_PS */
+
+/* Whether Cairo can use Quartz for fonts */
+/* #undef HAVE_CAIRO_QUARTZ */
+
+/* Whether Cairo can use the Win32 GDI for fonts */
+/* #undef HAVE_CAIRO_WIN32 */
+
+/* Whether Cairo has Xlib support */
+/* #undef HAVE_CAIRO_XLIB */
+
+/* Whether CoreText is available on the system */
+#ifdef __APPLE_CC__
+ #define HAVE_CORE_TEXT 1
+#else
+ #undef HAVE_CORE_TEXT
+#endif
+
+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
+ */
+#define HAVE_DIRENT_H 1
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H 1
+
+/* Define to 1 if you have the `FcWeightFromOpenType' function. */
+/* #undef HAVE_FCWEIGHTFROMOPENTYPE */
+
+/* Define to 1 if you have the `flockfile' function. */
+#define HAVE_FLOCKFILE 1
+
+/* Have FreeType 2 library */
+#define HAVE_FREETYPE 1
+
+/* Define to 1 if you have the `getpagesize' function. */
+#define HAVE_GETPAGESIZE 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Whether libthai is available */
+/* #undef HAVE_LIBTHAI */
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+/* #undef HAVE_NDIR_H */
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strtok_r' function. */
+#define HAVE_STRTOK_R 1
+
+/* Define to 1 if you have the `sysconf' function. */
+#define HAVE_SYSCONF 1
+
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+ */
+/* #undef HAVE_SYS_DIR_H */
+
+/* Define to 1 if you have the <sys/mman.h> header file. */
+#define HAVE_SYS_MMAN_H 1
+
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+ */
+/* #undef HAVE_SYS_NDIR_H */
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Have Xft library */
+/* #undef HAVE_XFT */
+
+/* Define to the sub-directory where libtool stores uninstalled libraries. */
+#define LT_OBJDIR ".libs/"
+
+/* Name of package */
+#define PACKAGE "pango"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT "http://bugzilla.gnome.org/enter_bug.cgi?product=pango"
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "pango"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "pango 1.40.11"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "pango"
+
+/* Define to the home page for this package. */
+#define PACKAGE_URL ""
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "1.40.11"
+
+/* PANGO binary age */
+#define PANGO_BINARY_AGE 4011
+
+/* PANGO interface age */
+#define PANGO_INTERFACE_AGE 11
+
+/* PANGO major version */
+#define PANGO_VERSION_MAJOR 1
+
+/* PANGO micro version */
+#define PANGO_VERSION_MICRO 11
+
+/* PANGO minor version */
+#define PANGO_VERSION_MINOR 40
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Version number of package */
+#define VERSION "1.40.11"
+
+/* defines how to decorate public symbols while building */
+#define _PANGO_EXTERN __attribute__((visibility("default"))) extern
diff --git a/ports/pango/portfile.cmake b/ports/pango/portfile.cmake
index 009953534..926efd98d 100644
--- a/ports/pango/portfile.cmake
+++ b/ports/pango/portfile.cmake
@@ -1,24 +1,26 @@
include(vcpkg_common_functions)
+
set(PANGO_VERSION 1.40.11)
-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 e4ac40f8da9c326e1e4dfaf4b1d2070601b17f88f5a12991a9a8bbc58bb08640404e2a794a5c68c5ebb2e7e80d9c186d4b26cd417bb63a23f024ef8a38bb152a)
-vcpkg_extract_source_archive(${ARCHIVE})
+vcpkg_extract_source_archive_ex(
+ OUT_SOURCE_PATH SOURCE_PATH
+ ARCHIVE ${ARCHIVE}
+ REF ${PANGO_VERSION}
+ PATCHES 0001-fix-static-symbols-export.diff
+)
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)
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h.unix DESTINATION ${SOURCE_PATH})
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
- OPTIONS_DEBUG
- -DPANGO_SKIP_HEADERS=ON)
+ OPTIONS_DEBUG
+ -DPANGO_SKIP_HEADERS=ON
+)
vcpkg_install_cmake()
vcpkg_copy_pdbs()