diff options
Diffstat (limited to 'vcpkg/ports/libice')
| -rw-r--r-- | vcpkg/ports/libice/fix_build.patch | 33 | ||||
| -rw-r--r-- | vcpkg/ports/libice/portfile.cmake | 32 | ||||
| -rw-r--r-- | vcpkg/ports/libice/replace_macros.patch | 15 | ||||
| -rw-r--r-- | vcpkg/ports/libice/vcpkg.json | 14 |
4 files changed, 94 insertions, 0 deletions
diff --git a/vcpkg/ports/libice/fix_build.patch b/vcpkg/ports/libice/fix_build.patch new file mode 100644 index 0000000..2812b12 --- /dev/null +++ b/vcpkg/ports/libice/fix_build.patch @@ -0,0 +1,33 @@ +diff --git a/src/error.c b/src/error.c +index 055452e..0ce530a 100644 +--- a/src/error.c ++++ b/src/error.c +@@ -32,7 +32,11 @@ Author: Ralph Mor, X Consortium + #include <X11/ICE/ICElib.h> + #include "ICElibint.h" + #include <stdio.h> ++#ifdef HAVE_UNISTD_H + #include <unistd.h> ++#elif _MSC_VER ++#include <process.h> ++#endif + #include <errno.h> + + void +diff --git a/src/iceauth.c b/src/iceauth.c +index 5a4d400..4549f0e 100644 +--- a/src/iceauth.c ++++ b/src/iceauth.c +@@ -39,7 +39,12 @@ Author: Ralph Mor, X Consortium + #include <stdlib.h> /* for arc4random_buf() */ + #endif + ++#ifdef HAVE_UNISTD_H + #include <unistd.h> ++#elif _MSC_VER ++#include <process.h> ++#define ITIMER_REAL ++#endif + + static int was_called_state; + diff --git a/vcpkg/ports/libice/portfile.cmake b/vcpkg/ports/libice/portfile.cmake new file mode 100644 index 0000000..397070a --- /dev/null +++ b/vcpkg/ports/libice/portfile.cmake @@ -0,0 +1,32 @@ +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/libice
+ REF be1888a46e446dfcaa62ac0a97d96bb77b6816d4 # 1.1.1
+ SHA512 0892ee9210302e787297763bcf0c7788bcd5f5572d5fd86472e8104dc291e7e190effc0100bbca98c6b048b445bd9e8bdf490287e1dbf2a64693aa1895950610
+ HEAD_REF master
+ PATCHES fix_build.patch
+ replace_macros.patch
+)
+
+set(ENV{ACLOCAL} "aclocal -I \"${CURRENT_INSTALLED_DIR}/share/xorg/aclocal/\"")
+
+vcpkg_configure_make(
+ SOURCE_PATH "${SOURCE_PATH}"
+ AUTOCONFIG
+)
+
+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/libice/replace_macros.patch b/vcpkg/ports/libice/replace_macros.patch new file mode 100644 index 0000000..ac50880 --- /dev/null +++ b/vcpkg/ports/libice/replace_macros.patch @@ -0,0 +1,15 @@ +diff --git a/include/X11/ICE/ICElib.h b/include/X11/ICE/ICElib.h +index 402cbc8..506c18b 100644 +--- a/include/X11/ICE/ICElib.h ++++ b/include/X11/ICE/ICElib.h +@@ -32,8 +32,8 @@ Author: Ralph Mor, X Consortium + #include <X11/ICE/ICE.h> + #include <X11/Xfuncproto.h> + +-#define Bool int +-#define Status int ++typedef int Bool; ++typedef int Status; + #define True 1 + #define False 0 + diff --git a/vcpkg/ports/libice/vcpkg.json b/vcpkg/ports/libice/vcpkg.json new file mode 100644 index 0000000..3d45982 --- /dev/null +++ b/vcpkg/ports/libice/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "libice", + "version": "1.1.1", + "description": "Inter-Client Exchange Library", + "homepage": "https://gitlab.freedesktop.org/xorg/lib/libice", + "license": "MIT-open-group", + "dependencies": [ + "bzip2", + "libx11", + "xorg-macros", + "xproto", + "xtrans" + ] +} |