aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/cairomm
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/cairomm
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/cairomm')
-rw-r--r--vcpkg/ports/cairomm/fix_include_path.patch45
-rw-r--r--vcpkg/ports/cairomm/portfile.cmake34
-rw-r--r--vcpkg/ports/cairomm/usage5
-rw-r--r--vcpkg/ports/cairomm/vcpkg.json16
4 files changed, 100 insertions, 0 deletions
diff --git a/vcpkg/ports/cairomm/fix_include_path.patch b/vcpkg/ports/cairomm/fix_include_path.patch
new file mode 100644
index 0000000..770df9e
--- /dev/null
+++ b/vcpkg/ports/cairomm/fix_include_path.patch
@@ -0,0 +1,45 @@
+diff --git a/meson.build b/meson.build
+index b8c2191..8f280b4 100644
+--- a/meson.build
++++ b/meson.build
+@@ -288,7 +288,7 @@ mm_conf_data.set('CAIROMM_MICRO_VERSION', cairomm_micro_version)
+ mm_conf_data.set('VERSION', meson.project_version()) # for MSVC_NMake/cairomm/cairomm.rc
+
+ cairommconfig_h_meson = files('cairommconfig.h.meson')
+-install_includeconfigdir = install_libdir / cairomm_pcname / 'include'
++install_includeconfigdir = install_includedir
+ configure_file(
+ input: cairommconfig_h_meson,
+ output: 'cairommconfig.h',
+@@ -380,7 +380,7 @@ summary = [
+ 'Directories:',
+ ' prefix: @0@'.format(install_prefix),
+ ' includedir: @0@'.format(install_prefix / install_includedir),
+- ' includecairommdir: @0@'.format(install_prefix / install_includedir / cairomm_pcname),
++ ' includecairommdir: @0@'.format(install_prefix / install_includedir),
+ ' libdir: @0@'.format(install_prefix / install_libdir),
+ ' includeconfigdir: @0@'.format(install_prefix / install_includeconfigdir),
+ ' pkgconfigdir: @0@'.format(install_prefix / install_pkgconfigdir),
+diff --git a/cairomm/meson.build b/cairomm/meson.build
+index f940268..23b955e 100644
+--- a/cairomm/meson.build
++++ b/cairomm/meson.build
+@@ -64,7 +64,7 @@ cairomm_private_h = [
+ # docs/reference/meson.build needs this.
+ source_h_files = cairomm_public_h
+
+-install_headers(cairomm_public_h, subdir: cairomm_pcname / 'cairomm')
++install_headers(cairomm_public_h, subdir: 'cairomm')
+
+ # Make sure we are exporting the symbols from the DLL
+ cairomm_cpp_args = ['-DCAIROMM_BUILD=1']
+diff --git a/data/cairomm.pc.in b/data/cairomm.pc.in
+index b6d19a2..59a03f0 100644
+--- a/data/cairomm.pc.in
++++ b/data/cairomm.pc.in
+@@ -16,4 +16,4 @@ Version: @PACKAGE_VERSION@
+ URL: http://www.cairographics.org/cairomm/
+ Requires: @CAIROMM_MODULES@
+ Libs: -L${libdir} -lcairomm@MSVC_TOOLSET_VER@-@CAIROMM_API_VERSION@ @CAIROMM_EXTRA_LIBS@
+-Cflags: -I${includedir}/@CAIROMM_MODULE_NAME@ -I${libdir}/@CAIROMM_MODULE_NAME@/include
++Cflags: -I${includedir}
diff --git a/vcpkg/ports/cairomm/portfile.cmake b/vcpkg/ports/cairomm/portfile.cmake
new file mode 100644
index 0000000..a4d8071
--- /dev/null
+++ b/vcpkg/ports/cairomm/portfile.cmake
@@ -0,0 +1,34 @@
+vcpkg_minimum_required(VERSION 2022-10-12) # for ${VERSION}
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://www.cairographics.org/releases/cairomm-${VERSION}.tar.xz"
+ FILENAME "cairomm-${VERSION}.tar.xz"
+ SHA512 d358a765136e244773b4a0fdcb2d9c81dd0b76f7a27c7108f94df9765f2d790f5f50b5645c09c292efce3e012528f85114d51916450c5fe6fa87d09f5a405d4c
+)
+
+vcpkg_extract_source_archive(
+ SOURCE_PATH
+ ARCHIVE "${ARCHIVE}"
+ PATCHES
+ fix_include_path.patch
+)
+
+vcpkg_configure_meson(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ -Dbuild-examples=false
+ -Dmsvc14x-parallel-installable=false # Use separate DLL and LIB filenames for Visual Studio 2017 and 2019
+ -Dbuild-tests=false
+)
+
+vcpkg_install_meson()
+vcpkg_fixup_pkgconfig()
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/cairommconfig.h" "# define CAIROMM_DLL 1" "# undef CAIROMM_DLL\n# define CAIROMM_STATIC_LIB 1")
+endif()
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
+file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
diff --git a/vcpkg/ports/cairomm/usage b/vcpkg/ports/cairomm/usage
new file mode 100644
index 0000000..7b0d0a6
--- /dev/null
+++ b/vcpkg/ports/cairomm/usage
@@ -0,0 +1,5 @@
+cairomm provides usage:
+
+ find_package(PkgConfig REQUIRED)
+ pkg_check_modules(CAIROMM REQUIRED IMPORTED_TARGET cairomm-1.16)
+ target_link_libraries(main PRIVATE PkgConfig::CAIROMM)
diff --git a/vcpkg/ports/cairomm/vcpkg.json b/vcpkg/ports/cairomm/vcpkg.json
new file mode 100644
index 0000000..31e7867
--- /dev/null
+++ b/vcpkg/ports/cairomm/vcpkg.json
@@ -0,0 +1,16 @@
+{
+ "name": "cairomm",
+ "version": "1.18.0",
+ "description": "A C++ wrapper for the cairo graphics library",
+ "homepage": "https://www.cairographics.org",
+ "license": "LGPL-2.0-only",
+ "supports": "!xbox",
+ "dependencies": [
+ "cairo",
+ "libsigcpp",
+ {
+ "name": "vcpkg-tool-meson",
+ "host": true
+ }
+ ]
+}