mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 18:31:15 +08:00
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.
This commit is contained in:
parent
11bee32d76
commit
4456dcab40
@ -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
|
||||
|
@ -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)
|
||||
|
153
ports/pango/config.h.unix
Normal file
153
ports/pango/config.h.unix
Normal file
@ -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
|
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user