aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/gtk3
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/gtk3')
-rw-r--r--vcpkg/ports/gtk3/0001-build.patch13
-rw-r--r--vcpkg/ports/gtk3/cairo-cpp-linkage.patch62
-rw-r--r--vcpkg/ports/gtk3/portfile.cmake89
-rw-r--r--vcpkg/ports/gtk3/vcpkg.json88
4 files changed, 252 insertions, 0 deletions
diff --git a/vcpkg/ports/gtk3/0001-build.patch b/vcpkg/ports/gtk3/0001-build.patch
new file mode 100644
index 0000000..a688118
--- /dev/null
+++ b/vcpkg/ports/gtk3/0001-build.patch
@@ -0,0 +1,13 @@
+diff --git a/meson.build b/meson.build
+index c599843..0cafd79 100644
+--- a/meson.build
++++ b/meson.build
+@@ -1008,7 +1008,7 @@ subdir('docs/reference')
+
+ install_data('m4macros/gtk-3.0.m4', install_dir: join_paths(get_option('datadir'), 'aclocal'))
+
+-if not meson.is_cross_build()
++if false
+ gnome.post_install(
+ glib_compile_schemas: true,
+ gio_querymodules: gio_module_dirs,
diff --git a/vcpkg/ports/gtk3/cairo-cpp-linkage.patch b/vcpkg/ports/gtk3/cairo-cpp-linkage.patch
new file mode 100644
index 0000000..dce7739
--- /dev/null
+++ b/vcpkg/ports/gtk3/cairo-cpp-linkage.patch
@@ -0,0 +1,62 @@
+diff --git a/gtk/meson.build b/gtk/meson.build
+index 79f4f0d..33a7723 100644
+--- a/gtk/meson.build
++++ b/gtk/meson.build
+@@ -1074,6 +1074,7 @@ gtk_query_settings = executable(
+ 'gtk-query-settings.c',
+ c_args: gtk_cargs,
+ dependencies: libgtk_dep,
++ link_language: 'cpp',
+ install: true
+ )
+ gtk_tools += gtk_query_settings
+@@ -1083,6 +1084,7 @@ gtk_builder_tool = executable(
+ 'gtk-builder-tool.c',
+ c_args: gtk_cargs,
+ dependencies: libgtk_dep,
++ link_language: 'cpp',
+ install: true
+ )
+ gtk_tools += gtk_builder_tool
+@@ -1115,6 +1117,7 @@ gtk_update_icon_cache = executable(
+ extra_update_icon_cache_objs,
+ c_args: gtk_cargs,
+ dependencies: libgtk_dep,
++ link_language: 'cpp',
+ install: true
+ )
+ gtk_tools += gtk_update_icon_cache
+@@ -1125,6 +1128,7 @@ gtk_query_immodules = executable(
+ 'gtkutils.c',
+ c_args: gtk_cargs,
+ dependencies: libgtk_dep,
++ link_language: 'cpp',
+ install: true
+ )
+ gtk_tools += gtk_query_immodules
+@@ -1134,6 +1138,7 @@ gtk_encode_symbolic_svg = executable(
+ 'encodesymbolic.c',
+ c_args: gtk_cargs,
+ dependencies: libgtk_dep,
++ link_language: 'cpp',
+ install: true
+ )
+ gtk_tools += gtk_encode_symbolic_svg
+@@ -1143,6 +1148,7 @@ gtk_launch = executable(
+ 'gtk-launch.c',
+ c_args: gtk_cargs,
+ dependencies: libgtk_dep,
++ link_language: 'cpp',
+ install: true
+ )
+ gtk_tools += gtk_launch
+diff --git a/meson.build b/meson.build
+index 287f0cb..d35106f 100644
+--- a/meson.build
++++ b/meson.build
+@@ -1,4 +1,4 @@
+-project('gtk+', 'c',
++project('gtk+', 'c', 'cpp',
+ version: '3.24.43',
+ default_options: [
+ 'buildtype=debugoptimized',
diff --git a/vcpkg/ports/gtk3/portfile.cmake b/vcpkg/ports/gtk3/portfile.cmake
new file mode 100644
index 0000000..13f2f08
--- /dev/null
+++ b/vcpkg/ports/gtk3/portfile.cmake
@@ -0,0 +1,89 @@
+set(warning_length 24)
+string(LENGTH "${CURRENT_BUILDTREES_DIR}" buildtrees_path_length)
+if(buildtrees_path_length GREATER warning_length AND CMAKE_HOST_WIN32)
+ message(WARNING "${PORT}'s buildsystem uses very long paths and may fail on your system.\n"
+ "We recommend moving vcpkg to a short path such as 'C:\\vcpkg' or using the subst command."
+ )
+endif()
+
+vcpkg_from_gitlab(
+ OUT_SOURCE_PATH SOURCE_PATH
+ GITLAB_URL https://gitlab.gnome.org
+ REPO GNOME/gtk
+ REF "${VERSION}"
+ SHA512 19e5482e4e843aa946ab79c8ce283a7b44aaac43ad99b6913cbc3c91492bf722ebe0238457b75b82be6d6c65a394d32ebc8732832f3f800145e3cf69d5c1e77c
+ PATCHES
+ 0001-build.patch
+ cairo-cpp-linkage.patch
+)
+
+vcpkg_find_acquire_program(PKGCONFIG)
+get_filename_component(PKGCONFIG_DIR "${PKGCONFIG}" DIRECTORY )
+vcpkg_add_to_path("${PKGCONFIG_DIR}") # Post install script runs pkg-config so it needs to be on PATH
+vcpkg_add_to_path("${CURRENT_HOST_INSTALLED_DIR}/tools/glib/")
+vcpkg_add_to_path("${CURRENT_HOST_INSTALLED_DIR}/tools/gdk-pixbuf")
+vcpkg_add_to_path("${CURRENT_HOST_INSTALLED_DIR}/tools/gettext/bin")
+
+
+if("introspection" IN_LIST FEATURES)
+ list(APPEND OPTIONS_RELEASE -Dintrospection=true)
+ vcpkg_get_gobject_introspection_programs(PYTHON3 GIR_COMPILER GIR_SCANNER)
+else()
+ list(APPEND OPTIONS_RELEASE -Dintrospection=false)
+endif()
+
+vcpkg_configure_meson(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ ${OPTIONS}
+ -Dwayland_backend=false
+ -Ddemos=false
+ -Dexamples=false
+ -Dtests=false
+ -Dgtk_doc=false
+ -Dman=false
+ -Dxinerama=no # Enable support for the X11 Xinerama extension
+ -Dcloudproviders=false # Enable the cloudproviders support
+ -Dprofiler=false # include tracing support for sysprof
+ -Dtracker3=false # Enable Tracker3 filechooser search
+ -Dcolord=no # Build colord support for the CUPS printing backend
+ OPTIONS_RELEASE
+ ${OPTIONS_RELEASE}
+ OPTIONS_DEBUG
+ -Dintrospection=false
+ ADDITIONAL_BINARIES
+ "glib-genmarshal='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-genmarshal'"
+ "glib-mkenums='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-mkenums'"
+ "glib-compile-resources='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-compile-resources${VCPKG_HOST_EXECUTABLE_SUFFIX}'"
+ "gdbus-codegen='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/gdbus-codegen'"
+ "glib-compile-schemas='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-compile-schemas${VCPKG_HOST_EXECUTABLE_SUFFIX}'"
+ "g-ir-compiler='${GIR_COMPILER}'"
+ "g-ir-scanner='${GIR_SCANNER}'"
+)
+
+# Reduce command line lengths, in particular for static windows builds.
+foreach(dir IN ITEMS "${TARGET_TRIPLET}-dbg" "${TARGET_TRIPLET}-rel")
+ if(EXISTS "${CURRENT_BUILDTREES_DIR}/${dir}/build.ninja")
+ vcpkg_replace_string("${CURRENT_BUILDTREES_DIR}/${dir}/build.ninja" "/${dir}/../src/" "/src/")
+ endif()
+endforeach()
+vcpkg_install_meson(ADD_BIN_TO_PATH)
+
+vcpkg_copy_pdbs()
+
+vcpkg_fixup_pkgconfig()
+
+set(GTK_TOOLS
+ gtk-builder-tool
+ gtk-encode-symbolic-svg
+ gtk-launch
+ gtk-query-immodules-3.0
+ gtk-query-settings
+ gtk-update-icon-cache
+)
+vcpkg_copy_tools(TOOL_NAMES ${GTK_TOOLS} AUTO_CLEAN)
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/etc")
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
diff --git a/vcpkg/ports/gtk3/vcpkg.json b/vcpkg/ports/gtk3/vcpkg.json
new file mode 100644
index 0000000..c931b6b
--- /dev/null
+++ b/vcpkg/ports/gtk3/vcpkg.json
@@ -0,0 +1,88 @@
+{
+ "name": "gtk3",
+ "version": "3.24.43",
+ "port-version": 2,
+ "description": "Portable library for creating graphical user interfaces.",
+ "homepage": "https://www.gtk.org/",
+ "license": null,
+ "supports": "!android",
+ "dependencies": [
+ {
+ "name": "at-spi2-atk",
+ "platform": "linux"
+ },
+ "atk",
+ {
+ "name": "cairo",
+ "default-features": false,
+ "features": [
+ "gobject"
+ ]
+ },
+ {
+ "name": "cairo",
+ "default-features": false,
+ "features": [
+ "x11"
+ ],
+ "platform": "linux"
+ },
+ "gdk-pixbuf",
+ {
+ "name": "gdk-pixbuf",
+ "host": true
+ },
+ {
+ "name": "gettext",
+ "host": true,
+ "default-features": false,
+ "features": [
+ "tools"
+ ]
+ },
+ "gettext-libintl",
+ "glib",
+ {
+ "name": "glib",
+ "host": true
+ },
+ "libepoxy",
+ "libxi",
+ "libxrandr",
+ "pango",
+ {
+ "name": "vcpkg-tool-meson",
+ "host": true
+ }
+ ],
+ "features": {
+ "introspection": {
+ "description": "Build with introspection",
+ "supports": "!static",
+ "dependencies": [
+ {
+ "name": "atk",
+ "default-features": false,
+ "features": [
+ "introspection"
+ ]
+ },
+ {
+ "name": "gdk-pixbuf",
+ "default-features": false,
+ "features": [
+ "introspection"
+ ]
+ },
+ "gobject-introspection",
+ {
+ "name": "pango",
+ "default-features": false,
+ "features": [
+ "introspection"
+ ]
+ }
+ ]
+ }
+ }
+}