aboutsummaryrefslogtreecommitdiff
path: root/ports/cairo
diff options
context:
space:
mode:
authorAlexander Neumann <30894796+Neumann-A@users.noreply.github.com>2021-04-26 19:28:21 +0200
committerGitHub <noreply@github.com>2021-04-26 10:28:21 -0700
commit546813ae7b9e2873dd3d38e78b27ac5582feae10 (patch)
tree6acb3bf022bf9060c70c0665d3586bb33a60f4d9 /ports/cairo
parenta9b27ed5dffbf70b135eddb0c4729f3ca87f106c (diff)
downloadvcpkg-546813ae7b9e2873dd3d38e78b27ac5582feae10.tar.gz
vcpkg-546813ae7b9e2873dd3d38e78b27ac5582feae10.zip
[glib up to gtk] update and make it work with meson (#13100)
* update glib to meson * update ci baseline * update glib to 2.66.3 remove cmakelists * fix some minor meson issue but meson is still a mess * add_bin_to_path to vcpkg_install_meson * regen docs * try fixing/touching all glib dependent ports * fix libsigcpp-3 version * fix glibmm * fix gmime * fix libcroco * update libnice * fix atk build * update harfbuzz * fix few builds * update libxmlpp * fix gdk-pixbuf * fix gts * gts add patch * remove old libsigcpp * add missing comma * fix supports logic * fix name mismatch * restore original ci baseline. * fix a lot of small details. increment controls. * fix harfbuzz & glib * bump port version * update port_versions * fix version field * update versions * fix glib in harfbuzz * update port versions * silly uppercase type * update port-versions * fix cairo build * update version * fix atk * update atk port-verisons * fix gts public includes * update versions * fix cairomm * fix pango * fix ignition * update versions. * fix gtk * fix librsvg * update versions * fix atk linux * fix libgpod * update versions * fix lcm * fix librsvg * update pango and pangomm * update pango to meson * more updates * update pixman * fix cairo * fix cairo * some fixes * reorder meson a bit * add none.txt for meson * fix x86_x64 to x86 "cross" builds * add tiff pkgconfig * update gdk-pixbuf * fix tiff and jpeg * add graphene * fix gdk-pixbuf * add sassc * update gtk * fix cairo complete build * add harfbuzz inlcude in pango since meson does not add it into pkgconfig. * fix gtk build. Remaining issue fix install script. * fix gtk build * fix io2d * add supports field * fix cartographer? * fix librsvg build * fix gtk build * fix cartographer * fix sassc on linux * fix tiff and libjpeg pc files * fix pixman x86 * _isnanf is undefined on arm- * merge fix for make on arm64 * fix gdk-pixbuf on arm64-windows * pixman remove test/demos. should fix it on osx. * [vcpkg_install_meson] add bin to path to run code generators * [vcpkg_configure_meson] deactivate native compiler in cross builds make x86 on x86_x64 a native instead of a cross build (as long as we are not building for UWP) * pixman reenable UWP support. * pixman reenable arm support * add pixman:arm-uwp=fail to baseline * update gtkmm * remove double whitespaces * gtk baseline gtk dependency on cairo x11 remove double spaces in flags * fix linux build * native none again * cairo fix cairo-script.pc * comment out patch since the cairo changes should have fixed it. * disable wayland backend in GTK since CI is missing system packages * silly typo in cairo pc file correction install lzo pc on windows * remove double spaces in _FLAGS remove unnecessary comments * actually disabling wayland backend * fix glib codegen issue having the wrong path * try to fix paths in glib codegen * integrate changes form #12860 * add the uwp patch back in * deactivate extra harfbuzz shapers. * vcpkg x-add-version --all --overwrite-version * remove patches in tesseract. * fix version * rerun add-version * add libgpod:x64-linux=fail to baseline due to missing system tools/libraries * change regex to take double - into account. * run x-add-version * run format-manifest * add missing removal of multiple spaces back into the regex * remove ws diff change * fix gtkmm the upstream way * remove ws to reduce diff * make glib build on osx * format manifest * run x-add-version * add pthread dependency * update baseline due to glib compiling on osx now. * add meson as a dep to glib * - add glib host dependencies - switch to manifest of touched ports * switch to manifest. * [libxml2] add gnuinstalldirs * [libxml2] add missing include of GNUInstallDirs * add version info * add include dir to pc files .... * update version * add UWP as crosscompiling target * Apply suggestions from code review * trying to fix cairo pthread detection on osx. * fix libmicrohttpd by adding the required system frameworks on osx * fix poppler by not removing the CXX standard * fix missing coretext header from harfbuzz in pano * fix formating issues * fix librsvg on osx * revert version changes * bump version * version stuff. * fix graphene version stuff * fix version stuff * removing ports from ci baseline to cause me pain * move cairomm:x64-linux=fail to gtkmm:x64-linx=fail remove pangomm:x64-osx=fail * fix typo * revert ws changes to vcpkg_install_meson * update port version after merge * version stuff * fix fluidsynth by adding vcpkg_check_features * move cairo to ci baseline on osx * version stuff * fluidsynth corrections * more version stuff * apply code review changes * clean version stuff. * update version stuff * code review cleanup * version stuff * formating * update version stuff again * remove gdi again * version stuff * version stuff * version baseline * Apply strega-nil suggestions from code review * run x-add-version * reset versions to upstream/master * v8 CONTROL -> json * reset fluidsynth to upstream/master * first batch of version-string -> version conversion * second and last batch of version-string -> version conversions * update version stuff * disable gdi feature in harfbuzz (missing user32 linkage in qt5-base) * version stuff * Apply suggestions from code review Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> * more CR stuff * update versions * back out provision changes so that pr can be merged. Co-authored-by: nicole mazzuca <mazzucan@outlook.com> Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>
Diffstat (limited to 'ports/cairo')
-rw-r--r--ports/cairo/CMakeLists.txt360
-rw-r--r--ports/cairo/build2.patch109
-rw-r--r--ports/cairo/cairo-features.h.in43
-rw-r--r--ports/cairo/portfile.cmake96
-rw-r--r--ports/cairo/remove_test_perf.patch122
-rw-r--r--ports/cairo/vcpkg.json11
6 files changed, 293 insertions, 448 deletions
diff --git a/ports/cairo/CMakeLists.txt b/ports/cairo/CMakeLists.txt
deleted file mode 100644
index a4f5f21c9..000000000
--- a/ports/cairo/CMakeLists.txt
+++ /dev/null
@@ -1,360 +0,0 @@
-cmake_minimum_required(VERSION 3.11)
-project(cairo C)
-
-# Add include directories
-include_directories(".")
-if(WIN32)
- include_directories("./win32")
-endif()
-
-set(CAIRO_HEADERS
- cairo.h
- cairo-deprecated.h
- cairo-features.h
- cairo-pdf.h
- cairo-ps.h
- cairo-script.h
- cairo-svg.h
- cairo-version.h
- cairo-win32.h
- ../util/cairo-gobject/cairo-gobject.h
- cairo-ft.h
-)
-
-set(CAIRO_X11_HEADERS
- cairo-xlib.h
-)
-
-set(CAIRO_QUARTZ_HEADERS
- cairo-quartz.h
- cairo-quartz-image.h
-)
-
-file(GLOB SOURCES
-"cairo-analysis-surface.c"
-"cairo-arc.c"
-"cairo-array.c"
-"cairo-atomic.c"
-"cairo-base64-stream.c"
-"cairo-base85-stream.c"
-"cairo-bentley-ottmann.c"
-"cairo-bentley-ottmann-rectangular.c"
-"cairo-bentley-ottmann-rectilinear.c"
-"cairo-botor-scan-converter.c"
-"cairo-boxes.c"
-"cairo-boxes-intersect.c"
-"cairo.c"
-"cairo-cache.c"
-"cairo-clip.c"
-"cairo-clip-boxes.c"
-"cairo-clip-polygon.c"
-"cairo-clip-region.c"
-"cairo-clip-surface.c"
-"cairo-color.c"
-"cairo-composite-rectangles.c"
-"cairo-compositor.c"
-"cairo-contour.c"
-"cairo-damage.c"
-"cairo-debug.c"
-"cairo-default-context.c"
-"cairo-device.c"
-"cairo-error.c"
-"cairo-fallback-compositor.c"
-"cairo-fixed.c"
-"cairo-font-face.c"
-"cairo-font-face-twin.c"
-"cairo-font-face-twin-data.c"
-"cairo-font-options.c"
-"cairo-freelist.c"
-"cairo-freed-pool.c"
-"cairo-gstate.c"
-"cairo-hash.c"
-"cairo-hull.c"
-"cairo-image-compositor.c"
-"cairo-image-info.c"
-"cairo-image-source.c"
-"cairo-image-surface.c"
-"cairo-line.c"
-"cairo-lzw.c"
-"cairo-matrix.c"
-"cairo-mask-compositor.c"
-"cairo-mesh-pattern-rasterizer.c"
-"cairo-mempool.c"
-"cairo-misc.c"
-"cairo-mono-scan-converter.c"
-"cairo-mutex.c"
-"cairo-no-compositor.c"
-"cairo-observer.c"
-"cairo-output-stream.c"
-"cairo-paginated-surface.c"
-"cairo-path-bounds.c"
-"cairo-path.c"
-"cairo-path-fill.c"
-"cairo-path-fixed.c"
-"cairo-path-in-fill.c"
-"cairo-path-stroke.c"
-"cairo-path-stroke-boxes.c"
-"cairo-path-stroke-polygon.c"
-"cairo-path-stroke-traps.c"
-"cairo-path-stroke-tristrip.c"
-"cairo-pattern.c"
-"cairo-pen.c"
-"cairo-polygon.c"
-"cairo-polygon-intersect.c"
-"cairo-polygon-reduce.c"
-"cairo-raster-source-pattern.c"
-"cairo-recording-surface.c"
-"cairo-rectangle.c"
-"cairo-rectangular-scan-converter.c"
-"cairo-region.c"
-"cairo-rtree.c"
-"cairo-scaled-font.c"
-"cairo-shape-mask-compositor.c"
-"cairo-slope.c"
-"cairo-spans.c"
-"cairo-spans-compositor.c"
-"cairo-spline.c"
-"cairo-stroke-dash.c"
-"cairo-stroke-style.c"
-"cairo-surface.c"
-"cairo-surface-clipper.c"
-"cairo-surface-fallback.c"
-"cairo-surface-observer.c"
-"cairo-surface-offset.c"
-"cairo-surface-snapshot.c"
-"cairo-surface-subsurface.c"
-"cairo-surface-wrapper.c"
-"cairo-time.c"
-"cairo-tor-scan-converter.c"
-"cairo-tor22-scan-converter.c"
-"cairo-clip-tor-scan-converter.c"
-"cairo-tag-attributes.c"
-"cairo-tag-stack.c"
-"cairo-toy-font-face.c"
-"cairo-traps.c"
-"cairo-tristrip.c"
-"cairo-traps-compositor.c"
-"cairo-unicode.c"
-"cairo-user-font.c"
-"cairo-version.c"
-"cairo-wideint.c"
-# generic font support
-"cairo-cff-subset.c"
-"cairo-scaled-font-subsets.c"
-"cairo-truetype-subset.c"
-"cairo-type1-fallback.c"
-"cairo-type1-glyph-names.c"
-"cairo-type1-subset.c"
-"cairo-type3-glyph-surface.c"
-# pdf
-"cairo-pdf-interchange.c"
-"cairo-pdf-operators.c"
-"cairo-pdf-shading.c"
-"cairo-pdf-surface.c"
-# png
-"cairo-png.c"
-# ps surface
-"cairo-ps-surface.c"
-# deflate source
-"cairo-deflate-stream.c"
-# svg surface
-"cairo-svg-surface.c"
-# script surface
-"cairo-script-surface.c"
-)
-
-if(WITH_FREETYPE)
- file(GLOB _FREETYPE_SOURCES "cairo-ft-font.c")
- list(APPEND SOURCES ${_FREETYPE_SOURCES})
-endif()
-
-if(WITH_QUARTZ)
- file(GLOB _QUARTZ_SOURCES
- "cairo-quartz-font.c"
- "cairo-quartz-image-surface.c"
- "cairo-quartz-surface.c"
- )
- list(APPEND SOURCES ${_QUARTZ_SOURCES})
-endif()
-
-# win32
-file(GLOB PLATFORM_SOURCES_WIN32
-"win32/cairo-win32-debug.c"
-"win32/cairo-win32-device.c"
-"win32/cairo-win32-gdi-compositor.c"
-"win32/cairo-win32-system.c"
-"win32/cairo-win32-surface.c"
-"win32/cairo-win32-display-surface.c"
-"win32/cairo-win32-printing-surface.c"
-"win32/cairo-win32-font.c"
-)
-
-if(WIN32)
- list(APPEND SOURCES ${PLATFORM_SOURCES_WIN32})
-endif()
-
-set(CMAKE_DEBUG_POSTFIX "d")
-
-find_package(Threads REQUIRED)
-find_package(ZLIB REQUIRED)
-find_package(PNG REQUIRED)
-if(WITH_FREETYPE)
- find_package(Freetype REQUIRED)
-endif()
-if(WITH_FONTCONFIG)
- find_package(Fontconfig REQUIRED)
-endif()
-if(WITH_QUARTZ)
- find_library(CF CoreFoundation)
- find_library(CG CoreGraphics)
-endif()
-find_package(unofficial-pixman CONFIG REQUIRED)
-
-# Cairo needs to be told which features of FreeType are availible
-if(WITH_FREETYPE)
- add_definitions(
- -DHAVE_FT_GLYPHSLOT_EMBOLDEN=1
- -DHAVE_FT_LIBRARY_SETLCDFILTER=1
- -DHAVE_FT_GLYPHSLOT_OBLIQUE=1
- -DHAVE_FT_LOAD_SFNT_TABLE=1
- -DHAVE_FT_GET_X11_FONT_FORMAT=1)
-endif()
-
-# additional features for macOS
-if(UNIX OR APPLE)
- add_definitions(
- -DHAVE_INTTYPES_H=1
- -DHAVE_STDINT_H=1
- -DHAVE_SYS_TYPES_H=1
- -DHAVE_UINT64_T=1
- -DHAVE_UNISTD_H=1
- -DCAIRO_HAS_PTHREAD=1
- -DCAIRO_HAS_REAL_PTHREAD=1)
-endif()
-
-add_library(cairo ${SOURCES})
-
-if (WITH_X11)
- target_compile_definitions(cairo PUBLIC -DCAIRO_HAS_XLIB_SURFACE=1)
-endif()
-if(WITH_FREETYPE)
- target_include_directories(cairo PUBLIC ${FREETYPE_INCLUDE_DIRS})
- target_link_libraries(cairo PRIVATE Freetype::Freetype)
-endif()
-
-if(WITH_FONTCONFIG)
- target_link_libraries(cairo PRIVATE Fontconfig::Fontconfig)
-endif()
-
-target_link_libraries(cairo PRIVATE ZLIB::ZLIB PNG::PNG unofficial::pixman::pixman-1)
-
-if(WIN32)
- target_link_libraries(cairo PRIVATE gdi32 msimg32 user32)
-endif()
-
-if(WITH_QUARTZ)
- target_link_libraries(cairo PRIVATE ${CF} ${CG})
-endif()
-
-# GObject support module
-
-set(CAIRO_GOBJECT_SOURCES
- "../util/cairo-gobject/cairo-gobject-enums.c"
- "../util/cairo-gobject/cairo-gobject-structs.c")
-
-# GObject support sources do not include header with export macro
-if(WITH_GOBJECT)
- if(BUILD_SHARED_LIBS)
- if(MSVC)
- set_source_files_properties(
- "../util/cairo-gobject/cairo-gobject-enums.c"
- "../util/cairo-gobject/cairo-gobject-structs.c"
- PROPERTIES COMPILE_DEFINITIONS "cairo_public=__declspec(dllexport)")
- else()
- set_source_files_properties(
- "../util/cairo-gobject/cairo-gobject-enums.c"
- "../util/cairo-gobject/cairo-gobject-structs.c"
- PROPERTIES COMPILE_DEFINITIONS "cairo_public=__attribute__((visibility(\"default\")))")
- endif()
- endif()
-
- find_package(unofficial-glib CONFIG REQUIRED)
- add_library(cairo-gobject ${CAIRO_GOBJECT_SOURCES})
- target_link_libraries(cairo-gobject PRIVATE cairo unofficial::glib::gobject unofficial::glib::glib)
-endif()
-
-if(MSVC)
- # cairo produces a lot of warnings which are disabled here because they otherwise fill up the log files
- # NOTE: options only available to MSVC, clang in macOS doesn't understand these flags
- target_compile_options(cairo PRIVATE
- "/wd4244" "/wd4146" "/wd4312" "/wd4267" "/wd4996" "/wd4311" "/wd4334" "/wd4101"
- )
- if(WITH_GOBJECT)
- target_compile_options(cairo-gobject PRIVATE
- "/wd4244" "/wd4146" "/wd4312" "/wd4267" "/wd4996" "/wd4311" "/wd4334" "/wd4101"
- )
- endif()
-endif()
-
-if (CAIRO_HAS_XLIB_SURFACE)
- file(INSTALL cairo-xlib.h DESTINATION include)
-endif()
-
-install(FILES ${CAIRO_HEADERS} DESTINATION include)
-install(FILES ${CAIRO_HEADERS} DESTINATION include/cairo)
-
-if(WITH_QUARTZ)
- install(FILES ${CAIRO_QUARTZ_HEADERS} DESTINATION include)
- install(FILES ${CAIRO_QUARTZ_HEADERS} DESTINATION include/cairo)
-endif()
-
-if (WITH_X11)
- install(FILES ${CAIRO_X11_HEADERS} DESTINATION include)
- install(FILES ${CAIRO_X11_HEADERS} DESTINATION include/cairo)
-endif()
-
-install(TARGETS cairo
- EXPORT cairo-targets
- RUNTIME DESTINATION bin
- LIBRARY DESTINATION lib
- ARCHIVE DESTINATION lib
-)
-
-if(WITH_GOBJECT)
- install(TARGETS cairo-gobject
- EXPORT cairo-targets
- RUNTIME DESTINATION bin
- LIBRARY DESTINATION lib
- ARCHIVE DESTINATION lib
-)
-endif()
-
-install(
- EXPORT cairo-targets
- NAMESPACE unofficial::cairo::
- FILE unofficial-cairo-targets.cmake
- DESTINATION share/unofficial-cairo
-)
-
-file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/unofficial-cairo-config.cmake
-"include(CMakeFindDependencyMacro)
-find_dependency(ZLIB)
-find_dependency(PNG)
-if(${WITH_FREETYPE})
- find_dependency(Freetype)
-endif()
-if(${WITH_FONTCONFIG})
- find_dependency(Fontconfig)
-endif()
-find_dependency(unofficial-pixman CONFIG)
-if(${WITH_GOBJECT})
- find_dependency(unofficial-glib CONFIG)
-endif()
-if(${WITH_QUARTZ})
- find_library(CF CoreFoundation)
- find_library(CG CoreGraphics)
-endif()
-
-include(\${CMAKE_CURRENT_LIST_DIR}/unofficial-cairo-targets.cmake)
-")
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/unofficial-cairo-config.cmake DESTINATION share/unofficial-cairo)
diff --git a/ports/cairo/build2.patch b/ports/cairo/build2.patch
new file mode 100644
index 000000000..6fd7dcd75
--- /dev/null
+++ b/ports/cairo/build2.patch
@@ -0,0 +1,109 @@
+diff --git a/build/Makefile.win32.common b/build/Makefile.win32.common
+index 7d7e9735f..f39ea1991 100644
+--- a/build/Makefile.win32.common
++++ b/build/Makefile.win32.common
+@@ -44,13 +44,13 @@ else
+ ifeq ($(ZLIB_PATH),)
+ ZLIB_PATH := $(top_builddir)/../zlib
+ endif
+-ZLIB_CFLAGS += -I$(ZLIB_PATH)/
+-CAIRO_LIBS += $(ZLIB_PATH)/zdll.lib
++# ZLIB_CFLAGS += -I$(ZLIB_PATH)/
++# CAIRO_LIBS += $(ZLIB_PATH)/zdll.lib
+ endif
+
+ DEFAULT_CFLAGS = -nologo $(CFG_CFLAGS)
+ DEFAULT_CFLAGS += -I. -I$(top_srcdir) -I$(top_srcdir)/src
+-DEFAULT_CFLAGS += $(PIXMAN_CFLAGS) $(LIBPNG_CFLAGS) $(ZLIB_CFLAGS)
++DEFAULT_CFLAGS += $(PIXMAN_CFLAGS) $(LIBPNG_CFLAGS)
+
+ CAIRO_CFLAGS = $(DEFAULT_CFLAGS) $(CFLAGS)
+
+diff --git a/configure.ac b/configure.ac
+index 5e33c96ea..c9e9cfaa9 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -43,7 +43,7 @@ AC_CACHE_SAVE
+
+ dnl ===========================================================================
+
+-AC_CHECK_LIB(z, compress,
++AC_SEARCH_LIBS(compress, z zlib zlibd,
+ [AC_CHECK_HEADER(zlib.h, [
+ have_libz=yes
+ AC_DEFINE(HAVE_ZLIB, 1, [Define to 1 if you have zlib available])
+@@ -481,7 +481,7 @@ CAIRO_ENABLE_SURFACE_BACKEND(script, script, yes, [
+ any2ppm_cs=yes
+ # The script backend requires zlib.
+ use_script=$have_libz
+- script_NONPKGCONFIG_LIBS=-lz
++ script_NONPKGCONFIG_LIBS=$ac_cv_search_compress
+ ])
+
+ dnl ===========================================================================
+@@ -582,7 +582,7 @@ dnl ===========================================================================
+ CAIRO_ENABLE_SURFACE_BACKEND(ps, PostScript, yes, [
+ # The ps backend requires zlib.
+ use_ps=$have_libz
+- ps_NONPKGCONFIG_LIBS=-lz
++ ps_NONPKGCONFIG_LIBS=$ac_cv_search_compress
+ ])
+
+ dnl ===========================================================================
+@@ -619,7 +619,7 @@ dnl ===========================================================================
+ CAIRO_ENABLE_SURFACE_BACKEND(pdf, PDF, yes, [
+ # The pdf backend requires zlib.
+ use_pdf=$have_libz
+- pdf_NONPKGCONFIG_LIBS=-lz
++ pdf_NONPKGCONFIG_LIBS=$ac_cv_search_compress
+ ])
+
+ dnl ===========================================================================
+@@ -706,7 +706,7 @@ CAIRO_ENABLE_SURFACE_BACKEND(observer, observer, always)
+ CAIRO_ENABLE_SURFACE_BACKEND(tee, tee, no)
+ CAIRO_ENABLE_SURFACE_BACKEND(xml, xml, no, [
+ use_xml=$have_libz
+- xml_NONPKGCONFIG_LIBS=-lz
++ xml_NONPKGCONFIG_LIBS=$ac_cv_search_compress
+ ])
+
+ dnl ===========================================================================
+diff --git a/src/Makefile.am b/src/Makefile.am
+index acf0a8281..fe339a3cf 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -68,7 +68,7 @@ cairo.def: cairo-features.h $(enabled_cairo_headers)
+ @(echo EXPORTS; \
+ (cd $(srcdir); cat $(enabled_cairo_headers) || echo 'cairo_ERROR ()' ) | \
+ $(EGREP) -v '^# *include' | \
+- ( cat cairo-features.h - | $(CPP) -D__cplusplus - || echo 'cairo_ERROR ()' ) | \
++ ( cat cairo-features.h - | $(CPP) $(CPP_FLAGS) -D__cplusplus - || echo 'cairo_ERROR ()' ) | \
+ $(EGREP) '^cairo_.* \(' | \
+ sed -e 's/[ ].*//' | \
+ sort; \
+diff --git a/util/cairo-script/Makefile.am b/util/cairo-script/Makefile.am
+index d5c2998ac..e6e23b2ed 100644
+--- a/util/cairo-script/Makefile.am
++++ b/util/cairo-script/Makefile.am
+@@ -15,7 +15,7 @@ libcairo_script_interpreter_la_SOURCES = \
+ $(NULL)
+ libcairo_script_interpreter_la_CFLAGS = $(CAIRO_CFLAGS)
+ libcairo_script_interpreter_la_LDFLAGS = -version-info $(CAIRO_LIBTOOL_VERSION_INFO) -no-undefined $(export_symbols)
+-libcairo_script_interpreter_la_LIBADD = $(top_builddir)/src/libcairo.la $(CAIRO_LIBS) $(lzo_LIBS) -lz
++libcairo_script_interpreter_la_LIBADD = $(top_builddir)/src/libcairo.la $(CAIRO_LIBS) $(lzo_LIBS)
+
+ csi_replay_SOURCES = csi-replay.c
+ csi_replay_CFLAGS = $(CAIRO_CFLAGS)
+diff --git a/util/cairo-trace/Makefile.am b/util/cairo-trace/Makefile.am
+index a0091f882..64d86184f 100644
+--- a/util/cairo-trace/Makefile.am
++++ b/util/cairo-trace/Makefile.am
+@@ -13,7 +13,7 @@ libcairo_trace_la_CPPFLAGS = -DCAIRO_TRACE_OUTDIR="\"$(cairooutdir)\"" \
+ libcairo_trace_la_CFLAGS = $(CAIRO_CFLAGS) $(real_pthread_CFLAGS)
+ libcairo_trace_la_LDFLAGS = -module -no-undefined -avoid-version
+
+-libcairo_trace_la_LIBADD = $(real_pthread_LIBS) -lz
++libcairo_trace_la_LIBADD = $(real_pthread_LIBS)
+ if CAIRO_HAS_DL
+ libcairo_trace_la_LIBADD += -ldl
+ endif
diff --git a/ports/cairo/cairo-features.h.in b/ports/cairo/cairo-features.h.in
deleted file mode 100644
index d0b38dccb..000000000
--- a/ports/cairo/cairo-features.h.in
+++ /dev/null
@@ -1,43 +0,0 @@
-#ifndef CAIRO_FEATURES_H
-#define CAIRO_FEATURES_H
-/* Chosen from the various possible defines in "../build/Makefile.win32.features.h""
- guided by "../build/Makefile.win32.features". Modify at your own risk.
-*/
-
-/* Always for Win32 */
-#ifdef _WIN32
-#define CAIRO_HAS_WIN32_SURFACE 1
-#define CAIRO_HAS_WIN32_FONT 1
-#endif
-
-/* Require libpng */
-#define CAIRO_HAS_PNG_FUNCTIONS 1
-#define CAIRO_HAS_PS_SURFACE 1
-#define CAIRO_HAS_PDF_SURFACE 1
-
-// Likely available
-#define CAIRO_HAS_SCRIPT_SURFACE 1
-#define CAIRO_HAS_SVG_SURFACE 1
-
-/* Always available */
-#define CAIRO_HAS_IMAGE_SURFACE 1
-#define CAIRO_HAS_MIME_SURFACE 1
-#define CAIRO_HAS_RECORDING_SURFACE 1
-#define CAIRO_HAS_OBSERVER_SURFACE 1
-#define CAIRO_HAS_USER_FONT 1
-
-/* Require GObject */
-#define CAIRO_HAS_GOBJECT_FUNCTIONS 1
-
-/* Require FreeType */
-#cmakedefine01 CAIRO_HAS_FT_FONT
-
-/* Require FontConfig */
-#cmakedefine01 CAIRO_HAS_FC_FONT
-
-// apple quartz support
-#cmakedefine01 CAIRO_HAS_QUARTZ_FONT
-#cmakedefine01 CAIRO_HAS_QUARTZ_IMAGE_SURFACE
-#cmakedefine01 CAIRO_HAS_QUARTZ_SURFACE
-
-#endif
diff --git a/ports/cairo/portfile.cmake b/ports/cairo/portfile.cmake
index ab3447dae..3b7448d7b 100644
--- a/ports/cairo/portfile.cmake
+++ b/ports/cairo/portfile.cmake
@@ -12,72 +12,90 @@ vcpkg_extract_source_archive_ex(
PATCHES
export-only-in-shared-build.patch
0001_fix_osx_defined.patch
+ build2.patch
+ remove_test_perf.patch
)
-file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/src)
-
-if("freetype" IN_LIST FEATURES)
- set(CAIRO_HAS_FT_FONT TRUE)
-endif()
-
+#TODO the autoconf script has a lot of additional option which use auto detection and should be disabled!
if("fontconfig" IN_LIST FEATURES)
- set(CAIRO_HAS_FC_FONT TRUE)
+ list(APPEND OPTIONS --enable-fc=yes)
+else()
+ list(APPEND OPTIONS --enable-fc=no)
endif()
-if("quartz" IN_LIST FEATURES)
- set(CAIRO_HAS_QUARTZ TRUE)
- set(CAIRO_HAS_QUARTZ_FONT TRUE)
- set(CAIRO_HAS_QUARTZ_IMAGE_SURFACE TRUE)
- set(CAIRO_HAS_QUARTZ_SURFACE TRUE)
+if("freetype" IN_LIST FEATURES)
+ list(APPEND OPTIONS --enable-ft=yes)
+else()
+ list(APPEND OPTIONS --enable-ft=no)
endif()
-configure_file("${CMAKE_CURRENT_LIST_DIR}/cairo-features.h.in" "${SOURCE_PATH}/src/cairo-features.h")
-
if ("x11" IN_LIST FEATURES)
if (VCPKG_TARGET_IS_WINDOWS)
message(FATAL_ERROR "Feature x11 only support UNIX.")
endif()
message(WARNING "You will need to install Xorg dependencies to use feature x11:\napt install libx11-dev libxft-dev\n")
+ list(APPEND OPTIONS --with-x --enable-xlib=yes)
+else()
+ list(APPEND OPTIONS --enable-xlib=no)
endif()
if("gobject" IN_LIST FEATURES)
if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "static")
message(FATAL_ERROR "Feature gobject currently only supports dynamic build.")
endif()
+ list(APPEND OPTIONS --enable-gobject=yes)
+else()
+ list(APPEND OPTIONS --enable-gobject=no)
endif()
-vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
- FEATURES
- x11 WITH_X11
- gobject WITH_GOBJECT
- freetype WITH_FREETYPE
- fontconfig WITH_FONTCONFIG
- quartz WITH_QUARTZ
-)
+if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
+ set(ENV{CPP} "cl_cpp_wrapper")
+endif()
-vcpkg_configure_cmake(
- PREFER_NINJA
- SOURCE_PATH ${SOURCE_PATH}/src
- OPTIONS ${FEATURE_OPTIONS}
+vcpkg_configure_make(
+ SOURCE_PATH ${SOURCE_PATH}
+ AUTOCONFIG
+ OPTIONS ${OPTIONS}
+ ax_cv_c_float_words_bigendian=no
+ ac_cv_lib_z_compress=yes
+ ac_cv_lib_lzo2_lzo2a_decompress=yes
+ lt_cv_deplibs_check_method=pass_all
)
-
-vcpkg_install_cmake()
-
-vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-cairo TARGET_PATH share/unofficial-cairo)
+vcpkg_install_make()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
-foreach(FILE "${CURRENT_PACKAGES_DIR}/include/cairo.h" "${CURRENT_PACKAGES_DIR}/include/cairo/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()
+set(_file "${CURRENT_PACKAGES_DIR}/include/cairo/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}")
+
# Handle copyright
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
vcpkg_copy_pdbs()
+
+if(VCPKG_TARGET_IS_WINDOWS)
+ set(ZLINK "-lzlibd")
+else()
+ set(ZLINK "-lz")
+endif()
+set(_file "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/cairo-script.pc")
+if(EXISTS "${_file}")
+ vcpkg_replace_string("${_file}" "Libs: ${ZLINK}" "Requires.private: lzo2 zlib\nLibs: -L\${libdir} -lcairo-script-interpreter")
+ file(INSTALL "${_file}" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/" RENAME cairo-script-interpreter.pc) #normally the *.pc file is named like the library
+endif()
+if(VCPKG_TARGET_IS_WINDOWS)
+ set(ZLINK "-lzlib")
+endif()
+set(_file "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/cairo-script.pc")
+if(EXISTS "${_file}")
+ vcpkg_replace_string("${_file}" "Libs: ${ZLINK}" "Requires.private: lzo2 zlib\nLibs: -L\${libdir} -lcairo-script-interpreter")
+ file(INSTALL "${_file}" DESTINATION "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/" RENAME cairo-script-interpreter.pc) #normally the *.pc file is named like the library
+endif()
+vcpkg_fixup_pkgconfig() \ No newline at end of file
diff --git a/ports/cairo/remove_test_perf.patch b/ports/cairo/remove_test_perf.patch
new file mode 100644
index 000000000..8ae4a3e23
--- /dev/null
+++ b/ports/cairo/remove_test_perf.patch
@@ -0,0 +1,122 @@
+diff --git a/Makefile.am b/Makefile.am
+index 03fa35236..94a7a263a 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -16,11 +16,11 @@ EXTRA_DIST += \
+
+ ACLOCAL_AMFLAGS = -I build ${ACLOCAL_FLAGS}
+
+-DIST_SUBDIRS = src doc util boilerplate test perf
+-SUBDIRS = src doc util
++DIST_SUBDIRS = src util boilerplate
++SUBDIRS = src util
+ # libpng is required for our test programs
+ if CAIRO_HAS_PNG_FUNCTIONS
+-SUBDIRS += boilerplate test perf
++SUBDIRS += boilerplate
+ endif
+
+ configure: cairo-version.h
+@@ -28,12 +28,11 @@ configure: cairo-version.h
+ doc:
+ cd doc && $(MAKE) $(AM_MAKEFLAGS) $@
+ test retest recheck: all
+- cd test && $(MAKE) $(AM_MAKEFLAGS) $@
++ echo "do nothing"
+ perf: all
+ cd perf && $(MAKE) $(AM_MAKEFLAGS) $@
+ check-valgrind: all
+- cd test && $(MAKE) $(AM_MAKEFLAGS) check-valgrind
+- cd perf && $(MAKE) $(AM_MAKEFLAGS) check-valgrind
++ echo "do nothing"
+ .PHONY: doc test retest recheck perf check-valgrind
+
+
+diff --git a/boilerplate/Makefile.am b/boilerplate/Makefile.am
+index 29ad015ac..9234014ed 100644
+--- a/boilerplate/Makefile.am
++++ b/boilerplate/Makefile.am
+@@ -69,7 +69,7 @@ test: check
+
+ if CROSS_COMPILING
+ else
+-TESTS += check-link$(EXEEXT)
++#TESTS += check-link$(EXEEXT)
+ endif
+
+ check_PROGRAMS += check-link
+diff --git a/perf/cairo-analyse-trace.c b/perf/cairo-analyse-trace.c
+index 994148660..5d2dceaec 100644
+--- a/perf/cairo-analyse-trace.c
++++ b/perf/cairo-analyse-trace.c
+@@ -53,7 +53,7 @@
+ #include <sys/stat.h>
+
+ #ifdef _MSC_VER
+-#include "dirent-win32.h"
++#include "dirent.h"
+
+ static char *
+ basename_no_ext (char *path)
+diff --git a/perf/cairo-perf-trace.c b/perf/cairo-perf-trace.c
+index 02e0e29f9..36daf3fd6 100644
+--- a/perf/cairo-perf-trace.c
++++ b/perf/cairo-perf-trace.c
+@@ -54,7 +54,7 @@
+ #include <sys/stat.h>
+
+ #ifdef _MSC_VER
+-#include "dirent-win32.h"
++#include "dirent.h"
+
+ static char *
+ basename_no_ext (char *path)
+diff --git a/src/Makefile.am b/src/Makefile.am
+index fe339a3cf..df6de0136 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -100,8 +100,8 @@ else
+ TESTS += check-link$(EXEEXT)
+ endif
+
+-EXTRA_DIST += $(TESTS_SH) check-has-hidden-symbols.c check-doc-syntax.awk
+-check_PROGRAMS += check-link
++# EXTRA_DIST += $(TESTS_SH) check-has-hidden-symbols.c check-doc-syntax.awk
++# check_PROGRAMS += check-link
+ check_link_LDADD = libcairo.la
+
+ check: headers-standalone
+diff --git a/src/cairo-compiler-private.h b/src/cairo-compiler-private.h
+index d982c101d..ad9b26ba0 100644
+--- a/src/cairo-compiler-private.h
++++ b/src/cairo-compiler-private.h
+@@ -201,10 +201,10 @@
+ #define hypot _hypot
+ #define pclose _pclose
+ #define popen _popen
+-#define snprintf _snprintf
++//#define snprintf _snprintf
+ #define strdup _strdup
+ #define unlink _unlink
+-#define vsnprintf _vsnprintf
++//#define vsnprintf _vsnprintf
+ #endif
+
+ #ifdef _MSC_VER
+diff --git a/test/Makefile.am b/test/Makefile.am
+index e3c42ea88..099ca8b22 100644
+--- a/test/Makefile.am
++++ b/test/Makefile.am
+@@ -351,9 +351,9 @@ FAILED_TESTS = `grep -l '\<FAIL\>' $(test_sources:.c=.log) 2>/dev/null | tr '\n'
+ recheck = check CAIRO_TESTS="$(FAILED_TESTS)"
+
+ # Re-checks all failed tests, i.e. tests with a log file that has a failure
+-recheck:
+- @echo Re-checking failed tests
+- @$(MAKE) $(AM_MAKEFLAGS) $(recheck)
++# recheck:
++# @echo Re-checking failed tests
++# @$(MAKE) $(AM_MAKEFLAGS) $(recheck)
+
+ # Checks tests.
+ # Target doesn't fail if tests fail.
diff --git a/ports/cairo/vcpkg.json b/ports/cairo/vcpkg.json
index dda4fd042..a2ff0d256 100644
--- a/ports/cairo/vcpkg.json
+++ b/ports/cairo/vcpkg.json
@@ -1,13 +1,15 @@
{
- "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json",
"name": "cairo",
- "version-string": "1.16.0",
- "port-version": 10,
+ "version": "1.16.0",
+ "port-version": 11,
"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.",
"homepage": "https://cairographics.org",
"dependencies": [
+ "dirent",
"libpng",
+ "lzo",
"pixman",
+ "pthread",
"zlib"
],
"default-features": [
@@ -33,9 +35,6 @@
"glib"
]
},
- "quartz": {
- "description": "build with quartz support"
- },
"x11": {
"description": "build with x11 support"
}