diff --git a/ports/libsm/missing-include.patch b/ports/libsm/missing-include.patch deleted file mode 100644 index f4f4358f4e..0000000000 --- a/ports/libsm/missing-include.patch +++ /dev/null @@ -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 -+# ifdef _MSC_VER -+# include -+# endif - - #endif /* WIN32 */ - diff --git a/ports/libsm/msvc.patch b/ports/libsm/msvc.patch new file mode 100644 index 0000000000..db5bd58b23 --- /dev/null +++ b/ports/libsm/msvc.patch @@ -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 + #endif + #include +-#include ++#ifdef HAVE_UNISTD_H ++ #include ++#endif + + #include + #define Time_t time_t diff --git a/ports/libsm/portfile.cmake b/ports/libsm/portfile.cmake index 16f95e1156..254ae432a6 100644 --- a/ports/libsm/portfile.cmake +++ b/ports/libsm/portfile.cmake @@ -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") diff --git a/ports/libsm/vcpkg.json b/ports/libsm/vcpkg.json index 1881bd7c04..aa5750ed8c 100644 --- a/ports/libsm/vcpkg.json +++ b/ports/libsm/vcpkg.json @@ -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" ] diff --git a/ports/libsm/windows.patch b/ports/libsm/windows.patch deleted file mode 100644 index abf52cb634..0000000000 --- a/ports/libsm/windows.patch +++ /dev/null @@ -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 - #endif - #include -+#ifdef HAVE_UNISTD_H - #include -+#endif - - #include - #define Time_t time_t -@@ -84,6 +86,7 @@ in this Software without prior written authorization from The Open Group. - - # include - # include -+# include - # define X_INCLUDE_NETDB_H - # define XOS_USE_MTSAFE_NETDBAPI - # include diff --git a/versions/baseline.json b/versions/baseline.json index 0d7bac88a7..3dac3c412f 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -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", diff --git a/versions/l-/libsm.json b/versions/l-/libsm.json index d479d742db..b0b56c875b 100644 --- a/versions/l-/libsm.json +++ b/versions/l-/libsm.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "1f5f66df60503d768647fac0cfe99f1102598979", + "version": "1.2.6", + "port-version": 0 + }, { "git-tree": "c6104db124805dd5c763dc15cbaed0e42254241c", "version": "1.2.3",