aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/graphene
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/graphene')
-rw-r--r--vcpkg/ports/graphene/fix_clang-cl.patch40
-rw-r--r--vcpkg/ports/graphene/portfile.cmake46
-rw-r--r--vcpkg/ports/graphene/vcpkg.json37
3 files changed, 123 insertions, 0 deletions
diff --git a/vcpkg/ports/graphene/fix_clang-cl.patch b/vcpkg/ports/graphene/fix_clang-cl.patch
new file mode 100644
index 0000000..0b71ea3
--- /dev/null
+++ b/vcpkg/ports/graphene/fix_clang-cl.patch
@@ -0,0 +1,40 @@
+diff --git a/meson.build b/meson.build
+index 1a93dbb95..2f5f7c891 100644
+--- a/meson.build
++++ b/meson.build
+@@ -55,7 +55,7 @@ conf = configuration_data()
+ common_cflags = []
+ common_ldflags = []
+
+-if cc.get_id() == 'msvc'
++if cc.get_argument_syntax() == 'msvc'
+ # Make MSVC more pedantic, this is a recommended pragma list
+ # from _Win32_Programming_ by Rector and Newcomer. Taken from
+ # glib's msvc_recommended_pragmas.h--please see that file for
+@@ -117,7 +117,7 @@ endif
+ common_cflags = cc.get_supported_arguments(test_cflags)
+
+ # MSVC: Let C4819 error out if we do not have the -utf-8 compiler flag
+-if cc.get_id() == 'msvc'
++if cc.get_argument_syntax() == 'msvc'
+ if not common_cflags.contains('-utf-8')
+ common_cflags += cc.get_supported_arguments('-we4819')
+ endif
+@@ -202,7 +202,7 @@ if get_option('default_library') != 'static'
+ if host_system == 'windows'
+ conf.set('DLL_EXPORT', true)
+ conf.set('_GRAPHENE_PUBLIC', '__declspec(dllexport) extern')
+- if cc.get_id() != 'msvc'
++ if cc.get_argument_syntax() != 'msvc'
+ extra_args += ['-fvisibility=hidden']
+ endif
+ else
+@@ -226,7 +226,7 @@ if get_option('gobject_types')
+ )
+ build_gobject = gobject.found()
+ if build_gobject
+- if cc.get_id() == 'msvc'
++ if cc.get_argument_syntax() == 'msvc'
+ extra_args += ['/FImsvc_recommended_pragmas.h']
+ endif
+ endif
diff --git a/vcpkg/ports/graphene/portfile.cmake b/vcpkg/ports/graphene/portfile.cmake
new file mode 100644
index 0000000..8c026ed
--- /dev/null
+++ b/vcpkg/ports/graphene/portfile.cmake
@@ -0,0 +1,46 @@
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://download.gnome.org/sources/graphene/1.10/graphene-${VERSION}.tar.xz"
+ FILENAME "graphene-${VERSION}.tar.xz"
+ SHA512 c56dab6712cf58387d0512a213cd0cd456679e46a495ee5cfd9bc25440cda2d72d56974af4e462f3c863869a1e2e506b702f468933045609d35fdf006212c67d
+)
+
+vcpkg_extract_source_archive(
+ SOURCE_PATH
+ ARCHIVE "${ARCHIVE}"
+ PATCHES
+ fix_clang-cl.patch
+)
+
+if("introspection" IN_LIST FEATURES)
+ list(APPEND OPTIONS_RELEASE -Dintrospection=enabled)
+ vcpkg_get_gobject_introspection_programs(PYTHON3 GIR_COMPILER GIR_SCANNER)
+else()
+ list(APPEND OPTIONS_RELEASE -Dintrospection=disabled)
+endif()
+
+vcpkg_configure_meson(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ -Dgtk_doc=false #Enable generating the API reference (depends on GTK-Doc)
+ -Dgobject_types=true #Enable GObject types (depends on GObject)
+ -Dtests=false
+ -Dinstalled_tests=false
+ ${OPTIONS}
+ OPTIONS_RELEASE
+ ${OPTIONS_RELEASE}
+ OPTIONS_DEBUG
+ -Dintrospection=disabled
+ ADDITIONAL_BINARIES
+ glib-genmarshal='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-genmarshal'
+ glib-mkenums='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-mkenums'
+ "g-ir-compiler='${GIR_COMPILER}'"
+ "g-ir-scanner='${GIR_SCANNER}'"
+)
+
+vcpkg_install_meson(ADD_BIN_TO_PATH)
+
+vcpkg_copy_pdbs()
+
+vcpkg_fixup_pkgconfig()
+
+file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
diff --git a/vcpkg/ports/graphene/vcpkg.json b/vcpkg/ports/graphene/vcpkg.json
new file mode 100644
index 0000000..6b29809
--- /dev/null
+++ b/vcpkg/ports/graphene/vcpkg.json
@@ -0,0 +1,37 @@
+{
+ "name": "graphene",
+ "version": "1.10.8",
+ "port-version": 5,
+ "description": "A thin layer of types for graphic libraries.",
+ "homepage": "https://www.gtk.org/",
+ "license": "MIT",
+ "dependencies": [
+ {
+ "name": "gettext",
+ "host": true,
+ "default-features": false,
+ "features": [
+ "tools"
+ ]
+ },
+ "gettext-libintl",
+ "glib",
+ {
+ "name": "glib",
+ "host": true
+ },
+ {
+ "name": "vcpkg-tool-meson",
+ "host": true
+ }
+ ],
+ "features": {
+ "introspection": {
+ "description": "build with introspection",
+ "supports": "!static",
+ "dependencies": [
+ "gobject-introspection"
+ ]
+ }
+ }
+}