Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Xwindow] part 5/N #26684

Merged
merged 4 commits into from
Sep 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions ports/libice/fix_build.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
diff --git a/src/error.c b/src/error.c
index 055452ec3..0ce530a96 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 147efc76c..ea6d1a67b 100644
--- a/src/iceauth.c
+++ b/src/iceauth.c
@@ -38,8 +38,12 @@ Author: Ralph Mor, X Consortium
#ifdef HAVE_LIBBSD
#include <bsd/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;

31 changes: 31 additions & 0 deletions ports/libice/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
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 8e6a14c63d6b73cde87cb331439f2a4d19cba5b9 # 1.0.10
SHA512 ad79cfbc3b1d51fb1f019bc088999ac8a64062a71667dbb4ffb62fe6d1b7dba7665944f64be6dcd27de08cc77e91512de97231db1e4ac018088727e90113d040
HEAD_REF master
PATCHES fix_build.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()
14 changes: 14 additions & 0 deletions ports/libice/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "libice",
"version": "1.0.10",
"description": "Inter-Client Exchange Library",
"homepage": "https://gitlab.freedesktop.org/xorg/lib/libice",
"license": "MIT-open-group",
"dependencies": [
"bzip2",
"libx11",
"xorg-macros",
"xproto",
"xtrans"
]
}
31 changes: 31 additions & 0 deletions ports/libsm/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
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/libsm
REF a52c79544fcd6b5e2242b9122dfaa34be07aebb2 # 1.2.3
SHA512 379e450d90e61d80d4fea8449a582b3eee3968bef137022053cb3bd51fa2815d8fccc43ff11e3b593c4a67ad64e93209c25111a20ac88e38c1f663cd274f5d56
HEAD_REF master
PATCHES windows.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()
12 changes: 12 additions & 0 deletions ports/libsm/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "libsm",
"version": "1.2.3",
"description": "X Session Management Library",
"homepage": "https://gitlab.freedesktop.org/xorg/lib/libsm",
"license": null,
"dependencies": [
"bzip2",
"libice",
"xorg-macros"
]
}
22 changes: 22 additions & 0 deletions ports/libsm/windows.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/src/sm_genid.c b/src/sm_genid.c
index 1a8b9a0ed..3726eb1d2 100644
--- a/src/sm_genid.c
+++ b/src/sm_genid.c
@@ -64,7 +64,9 @@ in this Software without prior written authorization from The Open Group.
# include <X11/Xthreads.h>
#endif
#include <stdio.h>
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif

#include <time.h>
#define Time_t time_t
@@ -84,6 +86,7 @@ in this Software without prior written authorization from The Open Group.

# include <X11/Xwinsock.h>
# include <X11/Xw32defs.h>
+# include <ws2ipdef.h>
# define X_INCLUDE_NETDB_H
# define XOS_USE_MTSAFE_NETDBAPI
# include <X11/Xos_r.h>
8 changes: 8 additions & 0 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -3748,6 +3748,10 @@
"baseline": "3.0.11",
"port-version": 1
},
"libice": {
"baseline": "1.0.10",
"port-version": 0
},
"libiconv": {
"baseline": "1.17",
"port-version": 0
Expand Down Expand Up @@ -4100,6 +4104,10 @@
"baseline": "4.7.0",
"port-version": 0
},
"libsm": {
"baseline": "1.2.3",
"port-version": 0
},
"libsmb2": {
"baseline": "2021-04-29",
"port-version": 1
Expand Down
9 changes: 9 additions & 0 deletions versions/l-/libice.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "95b91f0eb6ed362a133896484d1cc4fa5ee3b007",
"version": "1.0.10",
"port-version": 0
}
]
}
9 changes: 9 additions & 0 deletions versions/l-/libsm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "5e2f29263e1b4b7198b9b564a2400b902f87ae51",
"version": "1.2.3",
"port-version": 0
}
]
}