[libsm] Update to 1.2.6 (#49927)

This commit is contained in:
SunBlack 2026-02-11 09:45:17 +01:00 committed by GitHub
parent 73b593f84d
commit bbfac29c9d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 39 additions and 56 deletions

View File

@ -1,14 +0,0 @@
diff --git a/src/sm_genid.c b/src/sm_genid.c
index 3726eb1d2..082ce89fe 100644
--- a/src/sm_genid.c
+++ b/src/sm_genid.c
@@ -90,6 +90,9 @@ in this Software without prior written authorization from The Open Group.
# define X_INCLUDE_NETDB_H
# define XOS_USE_MTSAFE_NETDBAPI
# include <X11/Xos_r.h>
+# ifdef _MSC_VER
+# include <process.h>
+# endif
#endif /* WIN32 */

15
ports/libsm/msvc.patch Normal file
View File

@ -0,0 +1,15 @@
diff --git a/src/sm_genid.c b/src/sm_genid.c
index 9a52e1d..3a7d1e4 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>
-#include <unistd.h>
+#ifdef HAVE_UNISTD_H
+ #include <unistd.h>
+#endif
#include <time.h>
#define Time_t time_t

View File

@ -1,18 +1,22 @@
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()
return()
endif()
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
missing-include.patch # avoids: warning C4013: '_getpid' undefined; assuming extern returning int
)
vcpkg_download_distfile(
LIBSM_ARCHIVE
URLS "https://www.x.org/releases/individual/lib/libSM-${VERSION}.tar.xz"
FILENAME "libSM-${VERSION}.tar.xz"
SHA512 e544a1dc49a03390f76af35837bfd01f749b806d88d3ee806f20311c47ff53d0aeea4744feb875958031b17d50b57a89dcc41d81241c09333c88b268c44653a7
)
vcpkg_extract_source_archive(
SOURCE_PATH
ARCHIVE "${LIBSM_ARCHIVE}"
PATCHES
msvc.patch
)
set(ENV{ACLOCAL} "aclocal -I \"${CURRENT_INSTALLED_DIR}/share/xorg/aclocal/\"")
@ -24,9 +28,6 @@ vcpkg_configure_make(
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()
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")

View File

@ -1,12 +1,10 @@
{
"name": "libsm",
"version": "1.2.3",
"port-version": 1,
"version": "1.2.6",
"description": "X Session Management Library",
"homepage": "https://gitlab.freedesktop.org/xorg/lib/libsm",
"license": null,
"dependencies": [
"bzip2",
"libice",
"xorg-macros"
]

View File

@ -1,22 +0,0 @@
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>

View File

@ -5481,8 +5481,8 @@
"port-version": 0
},
"libsm": {
"baseline": "1.2.3",
"port-version": 1
"baseline": "1.2.6",
"port-version": 0
},
"libsmacker": {
"baseline": "1.2.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "1f5f66df60503d768647fac0cfe99f1102598979",
"version": "1.2.6",
"port-version": 0
},
{
"git-tree": "c6104db124805dd5c763dc15cbaed0e42254241c",
"version": "1.2.3",