aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/wayland-protocols
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/wayland-protocols')
-rw-r--r--vcpkg/ports/wayland-protocols/cross-build.diff35
-rw-r--r--vcpkg/ports/wayland-protocols/portfile.cmake42
-rw-r--r--vcpkg/ports/wayland-protocols/vcpkg.json37
3 files changed, 114 insertions, 0 deletions
diff --git a/vcpkg/ports/wayland-protocols/cross-build.diff b/vcpkg/ports/wayland-protocols/cross-build.diff
new file mode 100644
index 0000000..8536463
--- /dev/null
+++ b/vcpkg/ports/wayland-protocols/cross-build.diff
@@ -0,0 +1,35 @@
+diff --git a/meson.build b/meson.build
+index b9a32c8..1810ed0 100644
+--- a/meson.build
++++ b/meson.build
+@@ -1,6 +1,6 @@
+ project('wayland-protocols',
+ version: '1.43',
+- meson_version: '>= 0.58.0',
++ meson_version: '>= 0.62.0',
+ license: 'MIT/Expat',
+ )
+
+@@ -8,12 +8,7 @@ wayland_protocols_version = meson.project_version()
+
+ fs = import('fs')
+
+-dep_scanner = dependency('wayland-scanner',
+- version: get_option('tests') ? '>=1.23.0' : '>=1.20.0',
+- native: true,
+- fallback: 'wayland'
+-)
+-prog_scanner = find_program(dep_scanner.get_variable(pkgconfig: 'wayland_scanner', internal: 'wayland_scanner'))
++prog_scanner = find_program('wayland_scanner')
+
+ stable_protocols = {
+ 'linux-dmabuf': ['v1'],
+@@ -123,7 +118,7 @@ foreach protocol_file : protocol_files
+ endforeach
+
+ include_dirs = []
+-if dep_scanner.version().version_compare('>=1.22.90')
++if true
+ subdir('include/wayland-protocols')
+ include_dirs = ['include']
+ endif
diff --git a/vcpkg/ports/wayland-protocols/portfile.cmake b/vcpkg/ports/wayland-protocols/portfile.cmake
new file mode 100644
index 0000000..9c74e8e
--- /dev/null
+++ b/vcpkg/ports/wayland-protocols/portfile.cmake
@@ -0,0 +1,42 @@
+set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
+
+vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+ FEATURES
+ "force-build" FORCE_BUILD
+)
+
+if(NOT X_VCPKG_FORCE_VCPKG_WAYLAND_LIBRARIES AND NOT VCPKG_TARGET_IS_WINDOWS AND NOT FORCE_BUILD)
+ message(STATUS "Utils and libraries provided by '${PORT}' should be provided by your system! Install the required packages or force vcpkg libraries by setting X_VCPKG_FORCE_VCPKG_WAYLAND_LIBRARIES")
+ set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
+ return()
+endif()
+
+
+if(NOT FORCE_BUILD OR NOT X_VCPKG_FORCE_VCPKG_WAYLAND_LIBRARIES)
+ message(FATAL_ERROR "To build wayland libraries the `force-build` feature must be enabled and the X_VCPKG_FORCE_VCPKG_WAYLAND_LIBRARIES triplet variable must be set.")
+endif()
+
+vcpkg_from_gitlab(
+ GITLAB_URL https://gitlab.freedesktop.org
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO wayland/wayland-protocols
+ REF ${VERSION}
+ SHA512 bcc938a5bac59020ded9c653a4d65cafc42eed7d72518125b6d3d710b468ab3db71d514437cbe80d24821fb65eb2b078cd906c18f35245b0c99ad892b0ba50d0
+ HEAD_REF master
+ PATCHES
+ cross-build.diff
+)
+
+vcpkg_configure_meson(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ -Dtests=false
+ ADDITIONAL_BINARIES
+ "wayland_scanner = ['${CURRENT_HOST_INSTALLED_DIR}/tools/wayland/wayland-scanner${VCPKG_HOST_EXECUTABLE_SUFFIX}']"
+)
+vcpkg_install_meson()
+vcpkg_fixup_pkgconfig()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
diff --git a/vcpkg/ports/wayland-protocols/vcpkg.json b/vcpkg/ports/wayland-protocols/vcpkg.json
new file mode 100644
index 0000000..3cacb39
--- /dev/null
+++ b/vcpkg/ports/wayland-protocols/vcpkg.json
@@ -0,0 +1,37 @@
+{
+ "name": "wayland-protocols",
+ "version": "1.43",
+ "description": "wayland-protocols contains Wayland protocols that add functionality not available in the Wayland core protocol.",
+ "homepage": "https://wayland.freedesktop.org",
+ "license": "MIT",
+ "dependencies": [
+ "wayland"
+ ],
+ "features": {
+ "force-build": {
+ "description": [
+ "Build wayland libraries instead of depending on system ones.",
+ "Requires triplet variable X_VCPKG_FORCE_VCPKG_WAYLAND_LIBRARIES to be set."
+ ],
+ "dependencies": [
+ {
+ "name": "vcpkg-tool-meson",
+ "host": true
+ },
+ {
+ "name": "wayland",
+ "features": [
+ "force-build"
+ ]
+ },
+ {
+ "name": "wayland",
+ "host": true,
+ "features": [
+ "force-build"
+ ]
+ }
+ ]
+ }
+ }
+}