From 226eefef9da1ec3b601b192263ff3d6b95aaf3cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20T=C3=A4schner?= Date: Thu, 1 Jun 2017 11:08:25 +0200 Subject: [pango] Add CAIRO_WIN32_STATIC_BUILD symbol to static builds of pangocairo lib. --- ports/pango/CMakeLists.txt | 4 ++++ ports/pango/CONTROL | 2 +- ports/pango/portfile.cmake | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ports/pango/CMakeLists.txt b/ports/pango/CMakeLists.txt index 7dad7dbcf..ea36939b5 100644 --- a/ports/pango/CMakeLists.txt +++ b/ports/pango/CMakeLists.txt @@ -130,6 +130,10 @@ pango_add_module(pangocairo pango/pangocairo-font.c pango/pangocairo-fontmap.c pango/pangocairo-render.c) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + target_compile_definitions(pangocairo PRIVATE CAIRO_WIN32_STATIC_BUILD=1) +endif() target_link_libraries(pangocairo ${CAIRO_LIBRARIES} pango pangowin32 pangoft2 ${FONT_LIBRARIES}) target_include_directories(pangocairo PRIVATE ${CAIRO_INCLUDE_DIR} ${FONT_INCLUDE_DIRS}) diff --git a/ports/pango/CONTROL b/ports/pango/CONTROL index 011f33691..f5e2709c4 100644 --- a/ports/pango/CONTROL +++ b/ports/pango/CONTROL @@ -1,4 +1,4 @@ Source: pango -Version: 1.40.6 +Version: 1.40.6-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 7f28b8ca7..4e373e84a 100644 --- a/ports/pango/portfile.cmake +++ b/ports/pango/portfile.cmake @@ -17,6 +17,8 @@ vcpkg_apply_patches( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS + -DVCPKG_LIBRARY_LINKAGE=${VCPKG_LIBRARY_LINKAGE} OPTIONS_DEBUG -DPANGO_SKIP_HEADERS=ON) -- cgit v1.2.3 From 1c11bec722bbe25b1523cf436e9567d1689cc408 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20T=C3=A4schner?= Date: Thu, 8 Jun 2017 08:00:22 +0200 Subject: Revert "[pango] Add CAIRO_WIN32_STATIC_BUILD symbol to static builds of pangocairo lib." This reverts commit 226eefef9da1ec3b601b192263ff3d6b95aaf3cf. --- ports/pango/CMakeLists.txt | 4 ---- ports/pango/CONTROL | 2 +- ports/pango/portfile.cmake | 2 -- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/ports/pango/CMakeLists.txt b/ports/pango/CMakeLists.txt index ea36939b5..7dad7dbcf 100644 --- a/ports/pango/CMakeLists.txt +++ b/ports/pango/CMakeLists.txt @@ -130,10 +130,6 @@ pango_add_module(pangocairo pango/pangocairo-font.c pango/pangocairo-fontmap.c pango/pangocairo-render.c) - -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - target_compile_definitions(pangocairo PRIVATE CAIRO_WIN32_STATIC_BUILD=1) -endif() target_link_libraries(pangocairo ${CAIRO_LIBRARIES} pango pangowin32 pangoft2 ${FONT_LIBRARIES}) target_include_directories(pangocairo PRIVATE ${CAIRO_INCLUDE_DIR} ${FONT_INCLUDE_DIRS}) diff --git a/ports/pango/CONTROL b/ports/pango/CONTROL index f5e2709c4..011f33691 100644 --- a/ports/pango/CONTROL +++ b/ports/pango/CONTROL @@ -1,4 +1,4 @@ Source: pango -Version: 1.40.6-1 +Version: 1.40.6 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 4e373e84a..7f28b8ca7 100644 --- a/ports/pango/portfile.cmake +++ b/ports/pango/portfile.cmake @@ -17,8 +17,6 @@ vcpkg_apply_patches( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS - -DVCPKG_LIBRARY_LINKAGE=${VCPKG_LIBRARY_LINKAGE} OPTIONS_DEBUG -DPANGO_SKIP_HEADERS=ON) -- cgit v1.2.3 From 796220ee174b756dd9b47f5790d9907d57b0e175 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20T=C3=A4schner?= Date: Thu, 8 Jun 2017 08:02:15 +0200 Subject: [cairo] Hardcode value of CAIRO_WIN32_STATIC_BUILD into the cairo headers. --- ports/cairo/CONTROL | 2 +- ports/cairo/portfile.cmake | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ports/cairo/CONTROL b/ports/cairo/CONTROL index 89ba03b79..88325c521 100644 --- a/ports/cairo/CONTROL +++ b/ports/cairo/CONTROL @@ -1,4 +1,4 @@ Source: cairo -Version: 1.15.4 +Version: 1.15.4-1 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/cairo/portfile.cmake b/ports/cairo/portfile.cmake index 57b45e91c..d6036d93c 100644 --- a/ports/cairo/portfile.cmake +++ b/ports/cairo/portfile.cmake @@ -32,6 +32,14 @@ endif() vcpkg_install_cmake() +file(READ "${SOURCE_PATH}/src/cairo.h" CAIRO_H) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + string(REPLACE "defined (CAIRO_WIN32_STATIC_BUILD)" "1" CAIRO_H "${CAIRO_H}") +else() + string(REPLACE "defined (CAIRO_WIN32_STATIC_BUILD)" "0" CAIRO_H "${CAIRO_H}") +endif() +file(WRITE "${SOURCE_PATH}/src/cairo.h" "${CAIRO_H}") + # Copy the appropriate header files. file(COPY "${SOURCE_PATH}/src/cairo.h" -- cgit v1.2.3 From 8adde5920866d899c4325be731d40dd4027d4a4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20T=C3=A4schner?= Date: Thu, 8 Jun 2017 09:01:29 +0200 Subject: [cairo] Hardcode CAIRO_WIN32_STATIC_BUILD only in the installed header. --- ports/cairo/portfile.cmake | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/ports/cairo/portfile.cmake b/ports/cairo/portfile.cmake index d6036d93c..c184aebeb 100644 --- a/ports/cairo/portfile.cmake +++ b/ports/cairo/portfile.cmake @@ -32,14 +32,6 @@ endif() vcpkg_install_cmake() -file(READ "${SOURCE_PATH}/src/cairo.h" CAIRO_H) -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - string(REPLACE "defined (CAIRO_WIN32_STATIC_BUILD)" "1" CAIRO_H "${CAIRO_H}") -else() - string(REPLACE "defined (CAIRO_WIN32_STATIC_BUILD)" "0" CAIRO_H "${CAIRO_H}") -endif() -file(WRITE "${SOURCE_PATH}/src/cairo.h" "${CAIRO_H}") - # Copy the appropriate header files. file(COPY "${SOURCE_PATH}/src/cairo.h" @@ -57,6 +49,16 @@ DESTINATION ${CURRENT_PACKAGES_DIR}/include ) +foreach(FILE "${CURRENT_PACKAGES_DIR}/include/cairo.h") + file(READ ${FILE} CAIRO_H) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + string(REPLACE "defined (CAIRO_WIN32_STATIC_BUILD)" "1" CAIRO_H "${CAIRO_H}") + else() + string(REPLACE "defined (CAIRO_WIN32_STATIC_BUILD)" "0" CAIRO_H "${CAIRO_H}") + endif() + file(WRITE ${FILE} "${CAIRO_H}") +endforeach() + # Handle copyright file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/cairo) file(RENAME ${CURRENT_PACKAGES_DIR}/share/cairo/COPYING ${CURRENT_PACKAGES_DIR}/share/cairo/copyright) -- cgit v1.2.3