aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/libxres
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/libxres
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/libxres')
-rw-r--r--vcpkg/ports/libxres/build.patch16
-rw-r--r--vcpkg/ports/libxres/portfile.cmake35
-rw-r--r--vcpkg/ports/libxres/vcpkg.json14
3 files changed, 65 insertions, 0 deletions
diff --git a/vcpkg/ports/libxres/build.patch b/vcpkg/ports/libxres/build.patch
new file mode 100644
index 0000000..04b3ce3
--- /dev/null
+++ b/vcpkg/ports/libxres/build.patch
@@ -0,0 +1,16 @@
+diff --git a/include/X11/extensions/XRes.h b/include/X11/extensions/XRes.h
+index 1c816165e..8da68aa23 100644
+--- a/include/X11/extensions/XRes.h
++++ b/include/X11/extensions/XRes.h
+@@ -6,7 +6,10 @@
+ #define _XRES_H
+
+ #include <X11/Xfuncproto.h>
+-
++#if defined(_MSC_VER)
++ #include <process.h>
++ typedef int pid_t;
++#endif
+ /* v1.0 */
+
+ typedef struct {
diff --git a/vcpkg/ports/libxres/portfile.cmake b/vcpkg/ports/libxres/portfile.cmake
new file mode 100644
index 0000000..7d2d27b
--- /dev/null
+++ b/vcpkg/ports/libxres/portfile.cmake
@@ -0,0 +1,35 @@
+if(NOT X_VCPKG_FORCE_VCPKG_X_LIBRARIES AND NOT VCPKG_TARGET_IS_WINDOWS)
+ 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_X_LIBRARIES in your triplet!")
+ set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
+else()
+vcpkg_from_gitlab(
+ GITLAB_URL https://gitlab.freedesktop.org/xorg
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO lib/libxres
+ REF c05c6d918b0e2011d4bfa370c321482e34630b17 # 1.2.1
+ SHA512 c2eabf65b03393991b56b84bea4d770e9c0295d685e8b22bb7dabbd37dd6c7c6f5e519cefa790b05c0f124bb739a5abe03249b89e2ce6d5276014e9752c11251
+ HEAD_REF master
+ PATCHES build.patch
+)
+
+set(ENV{ACLOCAL} "aclocal -I \"${CURRENT_INSTALLED_DIR}/share/xorg/aclocal/\"")
+
+if (VCPKG_CROSSCOMPILING)
+ list(APPEND OPTIONS --enable-malloc0returnsnull)
+endif()
+
+vcpkg_configure_make(
+ SOURCE_PATH "${SOURCE_PATH}"
+ AUTOCONFIG
+ OPTIONS ${OPTIONS}
+)
+
+vcpkg_install_make()
+vcpkg_fixup_pkgconfig()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
+
+# Handle copyright
+file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
+endif()
diff --git a/vcpkg/ports/libxres/vcpkg.json b/vcpkg/ports/libxres/vcpkg.json
new file mode 100644
index 0000000..46d1479
--- /dev/null
+++ b/vcpkg/ports/libxres/vcpkg.json
@@ -0,0 +1,14 @@
+{
+ "name": "libxres",
+ "version": "1.2.1",
+ "description": "Xlib-based X-Resource extension client library",
+ "homepage": "https://gitlab.freedesktop.org/xorg/lib/libxres",
+ "license": null,
+ "dependencies": [
+ "bzip2",
+ "libx11",
+ "libxext",
+ "xorg-macros",
+ "xproto"
+ ]
+}