[many ports] Add X windows part 11/N (#27441)

* [libice] replace macros with typedefs

* [libx11] fix dl linkage on linux and cleanup the cmake wrapper.

* [libxxf86vm] add port

* [libxtst] add port

* [libxt] add port

* [libxmu] add port

* [libxaw] add port

* bump port version

* v db

* fix libxpm and maybe cross libxt

* malloc returns null for cross builds

* fix typo

* fix stuff

* v db

* fix stuff ?

* WIP commit

* libxt cross fix

* add todo

* fix libxaw

* xcb add some fixes.

* fix todos

* fix arm ?

* fix path

* bump some versions

* shorten comment

* format manifest

* v db

* fix stuff

* ci baseline

* v db

* adjust libx11 wrapper again

* v db

* add license

* remove doubled entry from v db

* v db

* libxmu remove global variable.

* correctly split unistd.patch and apply it

* disable thread safe init in libx11 on windows

* v db

* libx11 append options correctly.

* v db

* still not correct.

* v db
This commit is contained in:
Alexander Neumann 2022-11-12 02:32:25 +01:00 committed by GitHub
parent 59b58fc56d
commit 6f7ffeb18f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
50 changed files with 1076 additions and 30 deletions

View File

@ -24,6 +24,7 @@ file(WRITE "${SOURCE_PATH}/.clang-format" "DisableFormat: true\nSortIncludes: fa
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DCMAKE_FIND_PACKAGE_TARGETS_GLOBAL=ON
-DBUILD_TESTING=OFF
-DCMAKE_DISABLE_FIND_PACKAGE_KF5DocTools=ON
-DCMAKE_VERBOSE_MAKEFILE=ON

View File

@ -1,9 +1,10 @@
{
"name": "kf5kio",
"version": "5.89.0",
"port-version": 1,
"port-version": 2,
"description": "Network transparent access to files and data",
"homepage": "https://api.kde.org/frameworks/kio/html/index.html",
"license": null,
"dependencies": [
"ecm",
{

View File

@ -11,6 +11,7 @@ vcpkg_from_gitlab(
SHA512 ad79cfbc3b1d51fb1f019bc088999ac8a64062a71667dbb4ffb62fe6d1b7dba7665944f64be6dcd27de08cc77e91512de97231db1e4ac018088727e90113d040
HEAD_REF master
PATCHES fix_build.patch
replace_macros.patch
)
set(ENV{ACLOCAL} "aclocal -I \"${CURRENT_INSTALLED_DIR}/share/xorg/aclocal/\"")

View File

@ -0,0 +1,15 @@
diff --git a/include/X11/ICE/ICElib.h b/include/X11/ICE/ICElib.h
index 402cbc8bd..506c18baf 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

View File

@ -1,6 +1,7 @@
{
"name": "libice",
"version": "1.0.10",
"port-version": 1,
"description": "Inter-Client Exchange Library",
"homepage": "https://gitlab.freedesktop.org/xorg/lib/libice",
"license": "MIT-open-group",

View File

@ -0,0 +1,14 @@
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 */

View File

@ -11,6 +11,7 @@ vcpkg_from_gitlab(
SHA512 379e450d90e61d80d4fea8449a582b3eee3968bef137022053cb3bd51fa2815d8fccc43ff11e3b593c4a67ad64e93209c25111a20ac88e38c1f663cd274f5d56
HEAD_REF master
PATCHES windows.patch
missing-include.patch # avoids: warning C4013: '_getpid' undefined; assuming extern returning int
)
set(ENV{ACLOCAL} "aclocal -I \"${CURRENT_INSTALLED_DIR}/share/xorg/aclocal/\"")

View File

@ -1,6 +1,7 @@
{
"name": "libsm",
"version": "1.2.3",
"port-version": 1,
"description": "X Session Management Library",
"homepage": "https://gitlab.freedesktop.org/xorg/lib/libsm",
"license": null,

View File

@ -0,0 +1,36 @@
diff --git a/configure.ac b/configure.ac
index 92b740b88..083e37ee5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -106,8 +106,12 @@ if test "x$ac_cv_search_dlopen" = xno; then
AC_DEFINE(HAVE_SHL_LOAD,1,
[Use shl_load to load shared libraries])
AC_CHECK_HEADERS([dl.h])
+ XLDLIB="$ac_cv_search_shl_load"
fi
else
+ if test "x$ac_cv_search_dlopen" != 'xnone required'; then
+ XLDLIB="$ac_cv_search_dlopen"
+ fi
AC_DEFINE(HAVE_DLOPEN,1,[Use dlopen to load shared libraries])
AC_CHECK_HEADERS([dlfcn.h])
fi
@@ -116,6 +120,7 @@ if test "x$ac_cv_header_dlfcn_h" = xyes -o "x$ac_cv_header_dl_h" = xyes; then
else
HAVE_LOADABLE_MODULES=no
fi
+AC_SUBST(XLDLIB)
AC_MSG_RESULT($HAVE_LOADABLE_MODULES)
AC_MSG_CHECKING([if loadable i18n module support should be enabled])
diff --git a/x11.pc.in b/x11.pc.in
index 25c7e7cd0..4ecf23e8d 100644
--- a/x11.pc.in
+++ b/x11.pc.in
@@ -11,5 +11,5 @@ Version: @PACKAGE_VERSION@
Requires: xproto @XKBPROTO_REQUIRES@
Requires.private: @X11_EXTRA_DEPS@
Cflags: -I${includedir} @XTHREAD_CFLAGS@
-Libs: -L${libdir} -lX11
+Libs: -L${libdir} -lX11 @XLDLIB@
Libs.private: @XTHREADLIB@

View File

@ -11,33 +11,37 @@ vcpkg_from_gitlab(
GITLAB_URL https://gitlab.freedesktop.org/xorg
OUT_SOURCE_PATH SOURCE_PATH
REPO lib/libx11
REF 4c96f3567a8d045ee57b886fddc9618b71282530 #x11 v 1.7.3.1
SHA512 15c55b6283aec363f6af5b549584d487ec5a8c0f74b95dc44674ff50764abe5b9fa216e2af3c5408faf12d17b04e9433f0ad66da6e32a0dfef0427ca131ef23b
REF 3a30ada60c5217ada37b143b541c8e6f6284c7fa
SHA512 441f86ff8293d27459feaa93f85bcd4d02c6bd64fdb4d95199e5ee8a75340c2ce9b0fccd0b05840ce0de30ff3af3d21e6f37c81840e82b37dbddf082911b585d
HEAD_REF master
PATCHES cl.build.patch
io_include.patch
${PATCHES}
vcxserver.patch
add_dl_pc.patch
)
set(ENV{ACLOCAL} "aclocal -I \"${CURRENT_INSTALLED_DIR}/share/xorg/aclocal/\"")
if(VCPKG_TARGET_IS_WINDOWS)
set(ENV{CPP} "cl_cpp_wrapper")
endif()
set(OPTIONS "")
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
set(ENV{CPP} "cl_cpp_wrapper")
list(APPEND OPTIONS
--enable-loadable-i18n=no #Pointer conversion errors
--enable-unix-transport=no
--disable-thread-safety-constructor
)
endif()
if(VCPKG_TARGET_IS_WINDOWS)
set(OPTIONS
list(APPEND OPTIONS
--enable-malloc0returnsnull=yes #Configure fails to run the test for some reason
--enable-loadable-i18n=no #Pointer conversion errors
--enable-ipv6
--enable-hyperv
--enable-tcp-transport
--with-launchd=no
--with-lint=no
--disable-selective-werror
--enable-unix-transport=no)
)
endif()
if(NOT XLSTPROC)
find_program(XLSTPROC NAMES "xsltproc${VCPKG_HOST_EXECUTABLE_SUFFIX}" PATHS "${CURRENT_HOST_INSTALLED_DIR}/tools/libxslt" PATH_SUFFIXES "bin")

View File

@ -1,12 +1,20 @@
set(Z_VCPKG_FIRST_X11_SEARCH OFF)
if(NOT X11_FOUND)
set(Z_VCPKG_FIRST_X11_SEARCH ON)
endif()
_find_package(${ARGS})
if(TARGET X11::xcb)
if(TARGET X11:X11)
target_link_libraries(X11::X11 INTERFACE X11:xcb)
endif()
if(TARGET X11:xdmcp)
target_link_libraries(X11::xcb INTERFACE X11:xdmcp)
endif()
if(TARGET X11:xau)
target_link_libraries(X11::xcb INTERFACE X11:xau)
if(TARGET X11::X11 AND Z_VCPKG_FIRST_X11_SEARCH)
target_link_libraries(X11::X11 INTERFACE ${CMAKE_DL_LIBS})
if(TARGET X11::xcb)
target_link_libraries(X11::X11 INTERFACE X11::xcb)
endif()
endif()
if(TARGET X11::xcb AND Z_VCPKG_FIRST_X11_SEARCH)
if(TARGET X11::Xdmcp)
set_property(TARGET X11::xcb APPEND PROPERTY INTERFACE_LINK_LIBRARIES X11::Xdmcp)
endif()
if(TARGET X11::Xau)
set_property(TARGET X11::xcb APPEND PROPERTY INTERFACE_LINK_LIBRARIES X11::Xau)
endif()
endif()
unset(Z_VCPKG_FIRST_X11_SEARCH)

View File

@ -1,7 +1,6 @@
{
"name": "libx11",
"version": "1.7.3.1",
"port-version": 1,
"version": "1.8.1",
"description": "The X Window System is a network-transparent window system that was designed at MIT.",
"homepage": "https://www.x.org/wiki/",
"license": "MIT",

View File

@ -0,0 +1,45 @@
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_check_linkage(ONLY_DYNAMIC_LIBRARY)
if(VCPKG_TARGET_IS_WINDOWS)
set(OPTIONS lt_cv_deplibs_check_method=pass_all) # since libxt will always be static
endif()
vcpkg_from_gitlab(
GITLAB_URL https://gitlab.freedesktop.org/xorg
OUT_SOURCE_PATH SOURCE_PATH
REPO lib/libxaw
REF 9cfeba9db7f3ac4e0b351969c9ff5ab8f58ec7ef
SHA512 52c6e390aa90190ca528716eaa164ae2d79dd3345372ccc263ad1cfd2f1f49edc67df6ac34f2b9847bc099a3188d7d7161d7038565aae008cc12da373b0fc3b2
HEAD_REF master
PATCHES win.patch
)
set(ENV{ACLOCAL} "aclocal -I \"${CURRENT_INSTALLED_DIR}/share/xorg/aclocal/\"")
vcpkg_configure_make(
SOURCE_PATH "${SOURCE_PATH}"
AUTOCONFIG
OPTIONS lt_cv_deplibs_check_method=pass_all
)
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
set(makefile "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Makefile")
if(EXISTS "${makefile}")
vcpkg_replace_string("${makefile}" ".dll.a" ".lib")
endif()
set(makefile "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Makefile")
if(EXISTS "${makefile}")
vcpkg_replace_string("${makefile}" ".dll.a" ".lib")
endif()
endif()
vcpkg_install_make()
vcpkg_fixup_pkgconfig()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
endif()

17
ports/libxaw/vcpkg.json Normal file
View File

@ -0,0 +1,17 @@
{
"name": "libxaw",
"version": "1.0.13",
"description": "X Athena Widget Set, based on the X Toolkit Intrinsics (Xt) Library",
"homepage": "https://gitlab.freedesktop.org/xorg/lib/libxaw",
"license": null,
"dependencies": [
"bzip2",
"libx11",
"libxext",
"libxmu",
"libxpm",
"libxt",
"xorg-macros",
"xproto"
]
}

98
ports/libxaw/win.patch Normal file
View File

@ -0,0 +1,98 @@
diff --git a/Makefile.am b/Makefile.am
index 8e039a07f..e99d5d6d2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -9,8 +9,12 @@ pkgconfig_DATA += xaw6.pc
if PLATFORM_DARWIN
DEFAULT_LIB = libXaw.6.@LIBEXT@
else
+if PLATFORM_WIN32
+DEFAULT_LIB = Xaw6.@LIBEXT@
+else
DEFAULT_LIB = libXaw6.@LIBEXT@
endif
+endif
endif
@@ -20,8 +24,12 @@ pkgconfig_DATA += xaw7.pc
if PLATFORM_DARWIN
DEFAULT_LIB = libXaw.7.@LIBEXT@
else
+if PLATFORM_WIN32
+DEFAULT_LIB = Xaw7.@LIBEXT@
+else
DEFAULT_LIB = libXaw7.@LIBEXT@
endif
+endif
endif
@@ -33,7 +41,7 @@ EXTRA_DIST = \
old-doc/CHANGES
install-exec-hook:
- cd $(DESTDIR)$(libdir) && rm -f libXaw.@LIBEXT@ && $(LN_S) $(DEFAULT_LIB) libXaw.@LIBEXT@
+ cd $(DESTDIR)$(libdir) && rm -f libXaw.@LIBEXT@ && $(LN_S) $(DEFAULT_LIB) Xaw.@LIBEXT@
uninstall-local:
-rm -f $(DESTDIR)$(libdir)/libXaw.@LIBEXT@
diff --git a/src/AsciiSrc.c b/src/AsciiSrc.c
index 875b97c6c..8223e3bf4 100644
--- a/src/AsciiSrc.c
+++ b/src/AsciiSrc.c
@@ -54,6 +54,10 @@ in this Software without prior written authorization from The Open Group.
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
+#ifdef _WIN32
+#include <io.h>
+typedef int mode_t;
+#endif
#if (defined(ASCII_STRING) || defined(ASCII_DISK))
#include <X11/Xaw/AsciiText.h> /* for Widget Classes */
diff --git a/src/MultiSrc.c b/src/MultiSrc.c
index b4a123c14..dc2146913 100644
--- a/src/MultiSrc.c
+++ b/src/MultiSrc.c
@@ -74,6 +74,10 @@ in this Software without prior written authorization from The Open Group.
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
+#ifdef _WIN32
+#include <io.h>
+typedef int mode_t;
+#endif
#define MAGIC_VALUE ((XawTextPosition)-1)
#define streq(a, b) (strcmp((a), (b)) == 0)
diff --git a/src/TextAction.c b/src/TextAction.c
index 43d1d3258..e083c908f 100644
--- a/src/TextAction.c
+++ b/src/TextAction.c
@@ -29,7 +29,12 @@ in this Software without prior written authorization from The Open Group.
#endif
#include <stdio.h>
#include <stdlib.h>
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
+#ifdef _WIN32
+#define _WILLWINSOCK_
+#endif
#include <X11/Xos.h> /* for select() and struct timeval */
#include <ctype.h>
#include <X11/IntrinsicP.h>
@@ -3186,7 +3191,11 @@ InsertChar(Widget w, XEvent *event, String *p _X_UNUSED, Cardinal *n _X_UNUSED)
FD_SET(ConnectionNumber(XtDisplay(w)), &fds);
(void)select(FD_SETSIZE, &fds, NULL, NULL, &tmval);
if (tmval.tv_usec != 500000)
+ #ifndef _WIN32
usleep(40000);
+ #else
+ Sleep(40);
+ #endif
StartAction(ctx, NULL);
#ifndef OLDXAW

View File

@ -0,0 +1,14 @@
diff --git a/src/EditresCom.c b/src/EditresCom.c
index 716a2b3c6..d570e19e4 100644
--- a/src/EditresCom.c
+++ b/src/EditresCom.c
@@ -34,6 +34,9 @@ in this Software without prior written authorization from The Open Group.
#include <X11/IntrinsicP.h> /* To get into the composite and core widget
structures. */
#include <X11/ObjectP.h> /* For XtIs<Classname> macros. */
+#ifdef _MSC_VER
+#define XTSTRINGDEFINES // Otherwise XtRImmediate is not a constant expression
+#endif
#include <X11/StringDefs.h> /* for XtRString. */
#include <X11/ShellP.h> /* for Application Shell Widget class. */

View File

@ -0,0 +1,36 @@
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/libxmu
REF e9efe2d027b4c46cf6834cc532222f8ad1d1d3c3 # 1.1.3
SHA512 9d3ab7534afbb3d220ce846ecfc209536def28e707e68f393673bda6f92054e7a14212ae2400092afdc06bbb61d8315d460feaf5b551dc447390d6d952a5aa1f
HEAD_REF master # branch name
PATCHES cl-build.patch
unistd.patch
)
set(ENV{ACLOCAL} "aclocal -I \"${CURRENT_INSTALLED_DIR}/share/xorg/aclocal/\"")
vcpkg_configure_make(
SOURCE_PATH "${SOURCE_PATH}"
AUTOCONFIG
OPTIONS
lt_cv_deplibs_check_method=pass_all
)
vcpkg_install_make()
vcpkg_fixup_pkgconfig()
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic" AND VCPKG_TARGET_IS_WINDOWS)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/X11/Xmu/Atoms.h" "extern" "__declspec(dllimport) extern")
endif()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
endif()

15
ports/libxmu/unistd.patch Normal file
View File

@ -0,0 +1,15 @@
diff --git a/src/GetHost.c b/src/GetHost.c
index 2f0bccded..2d698f664 100644
--- a/src/GetHost.c
+++ b/src/GetHost.c
@@ -35,7 +35,10 @@ in this Software without prior written authorization from The Open Group.
#endif
#include <X11/Xosdefs.h>
#include <string.h>
+
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#ifdef WIN32
#include <X11/Xlibint.h>

12
ports/libxmu/vcpkg.json Normal file
View File

@ -0,0 +1,12 @@
{
"name": "libxmu",
"version": "1.1.3",
"description": "X miscellaneous utility routines library",
"homepage": "https://gitlab.freedesktop.org/xorg/lib/libxmu",
"license": null,
"dependencies": [
"bzip2",
"libxt",
"xorg-macros"
]
}

View File

@ -13,6 +13,8 @@ vcpkg_from_gitlab(
PATCHES
remove_strings_h.patch
fix-dependency-gettext.patch
strcasecmp.patch
tools.patch # will look for libxt otherwise
)
set(ENV{ACLOCAL} "aclocal -I \"${CURRENT_INSTALLED_DIR}/share/xorg/aclocal/\"")
@ -41,6 +43,8 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static OR NOT VCPKG_TARGET_IS_WINDOWS)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
endif()
# # Handle copyright
#vcpkg_copy_tools(TOOL_NAMES sxpm cxpm AUTOCLEAN)
# Handle copyright
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
endif()

View File

@ -0,0 +1,15 @@
diff --git a/include/X11/xpm.h b/include/X11/xpm.h
index f108f1f6e..143b6657d 100644
--- a/include/X11/xpm.h
+++ b/include/X11/xpm.h
@@ -69,6 +69,10 @@
# include <malloc.h>
# include "simx.h" /* defines some X stuff using MSW types */
#define NEED_STRCASECMP /* at least for MSVC++ */
+#elif _MSC_VER
+#define strcasecmp _stricmp
+# include <X11/Xlib.h>
+# include <X11/Xutil.h>
#else /* FOR_MSW */
# ifdef AMIGA
# include "amigax.h"

16
ports/libxpm/tools.patch Normal file
View File

@ -0,0 +1,16 @@
diff --git a/configure.ac b/configure.ac
index 51bc0f2bc..e35dc6e17 100644
--- a/configure.ac
+++ b/configure.ac
@@ -25,9 +25,9 @@ AC_CHECK_FUNC([fork],[], AC_DEFINE(NO_ZPIPE))
# Obtain compiler/linker options for dependencies
PKG_CHECK_MODULES(XPM, xproto x11)
-PKG_CHECK_MODULES(SXPM, [x11 xt xext xextproto xproto >= 7.0.17],
- [build_sxpm=true], [build_sxpm=false])
+# PKG_CHECK_MODULES(SXPM, [x11 xt xext xextproto xproto >= 7.0.17],
+# [build_sxpm=true], [build_sxpm=false])
AM_CONDITIONAL(BUILD_SXPM, test x$build_sxpm = xtrue)
# Internationalization & localization support
AC_ARG_WITH([gettext], AC_HELP_STRING([--with-gettext],

View File

@ -1,7 +1,7 @@
{
"name": "libxpm",
"version": "3.5.11",
"port-version": 1,
"port-version": 2,
"description": "XPM format pixmap library",
"homepage": "https://github.com/freedesktop/libXpm",
"license": "MIT",

View File

@ -0,0 +1,25 @@
diff --git a/Makefile.am b/Makefile.am
index f8d5a6b72..47f847bbd 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -19,7 +19,7 @@
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-SUBDIRS = util src include man specs test
+SUBDIRS = src include man specs test
ACLOCAL_AMFLAGS = -I m4
diff --git a/src/Makefile.am b/src/Makefile.am
index a26e10d7a..e8a520a2f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -104,5 +104,5 @@ $(BUILT_SOURCE): $(top_builddir)/util/makestrs$(EXEEXT)
$(AM_V_at)cp Shell.h $(top_builddir)/include/X11
$(AM_V_at)rm StringDefs.h Shell.h
-$(top_builddir)/util/makestrs$(EXEEXT) :
- $(am__cd) $(@D) && $(MAKE) $(AM_MAKEFLAGS) $(@F)
+# $(top_builddir)/util/makestrs$(EXEEXT) :
+# $(am__cd) $(@D) && $(MAKE) $(AM_MAKEFLAGS) $(@F)

14
ports/libxt/getcwd.patch Normal file
View File

@ -0,0 +1,14 @@
diff --git a/src/Converters.c b/src/Converters.c
index 4c2762356..5376a34fb 100644
--- a/src/Converters.c
+++ b/src/Converters.c
@@ -82,6 +82,9 @@ in this Software without prior written authorization from The Open Group.
#include <X11/Xlocale.h>
#include <errno.h> /* for StringToDirectoryString */
+#ifdef _MSC_VER
+#include <direct.h>
+#endif
#define IsNewline(str) ((str) == '\n')
#define IsWhitespace(str) ((str)== ' ' || (str) == '\t')

96
ports/libxt/globals.patch Normal file
View File

@ -0,0 +1,96 @@
diff --git a/util/StrDefs.ct b/util/StrDefs.ct
index b597b2051..b682255ad 100644
--- a/util/StrDefs.ct
+++ b/util/StrDefs.ct
@@ -46,6 +46,8 @@ SOFTWARE.
******************************************************************/
#define Const const
+#include "StringDefs.h"
+#include "Shell.h"
<<<STRING_TABLE_GOES_HERE>>>
diff --git a/util/StrDefs.ht b/util/StrDefs.ht
index 2ce20562f..ceab2610f 100644
--- a/util/StrDefs.ht
+++ b/util/StrDefs.ht
@@ -52,6 +52,18 @@ SOFTWARE.
#define _XtStringDefs_h_Const const
#endif
+#ifndef XT_EXTERN_API
+# if defined(_MSC_VER) && defined(XT_DLL_EXPORTS)
+# ifdef XT_BUILD
+# define XT_EXTERN_API extern __declspec(dllexport)
+# else
+# define XT_EXTERN_API extern __declspec(dllimport)
+# endif
+# else
+# define XT_EXTERN_API extern
+# endif
+#endif
+
<<<STRING_TABLE_GOES_HERE>>>
#ifndef XTSTRINGDEFINES
diff --git a/util/string.list b/util/string.list
index 49ba7476e..753c592b3 100644
--- a/util/string.list
+++ b/util/string.list
@@ -6,7 +6,7 @@
#prefix Xt
#feature XTSTRINGDEFINES
-#externref extern
+#externref XT_EXTERN_API
#externdef
! note that the trailing space is required in the #externdef line.
#ctmpl util/StrDefs.ct
diff --git a/util/Shell.ht b/util/Shell.ht
index 500e0fd75..ac8fc2a2e 100644
--- a/util/Shell.ht
+++ b/util/Shell.ht
@@ -64,6 +64,18 @@ SOFTWARE.
#define _XtShell_h_Const const
#endif
+#ifndef XT_EXTERN_API
+# if defined(_MSC_VER) && defined(XT_DLL_EXPORTS)
+# ifdef XT_BUILD
+# define XT_EXTERN_API extern __declspec(dllexport)
+# else
+# define XT_EXTERN_API extern __declspec(dllimport)
+# endif
+# else
+# define XT_EXTERN_API extern
+# endif
+#endif
+
<<<STRING_TABLE_GOES_HERE>>>
#ifndef XTSTRINGDEFINES
diff --git a/include/X11/Intrinsic.h b/include/X11/Intrinsic.h
index 559697aa0..d11eb0955 100644
--- a/include/X11/Intrinsic.h
+++ b/include/X11/Intrinsic.h
@@ -106,7 +106,18 @@ typedef char *String;
#define externalref globalref
#define externaldef(psect) globaldef {"psect"} noshare
#else
-#define externalref extern
+#ifndef XT_EXTERN_API
+# if defined(_MSC_VER) && defined(XT_DLL_EXPORTS)
+# ifdef XT_BUILD
+# define XT_EXTERN_API extern __declspec(dllexport)
+# else
+# define XT_EXTERN_API extern __declspec(dllimport)
+# endif
+# else
+# define XT_EXTERN_API extern
+# endif
+#endif
+#define externalref XT_EXTERN_API
#define externaldef(psect)
#endif /* VMS */

111
ports/libxt/portfile.cmake Normal file
View File

@ -0,0 +1,111 @@
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()
if(VCPKG_TARGET_IS_WINDOWS)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
# Downstream uses &widgetClassRec in a const context which doesn't work
# if this is a dynamic library since the memory adress is only known at runtime
endif()
if(VCPKG_CROSSCOMPILING)
set(PATCHES cc_for_build.patch)
endif()
vcpkg_from_gitlab(
GITLAB_URL https://gitlab.freedesktop.org/xorg
OUT_SOURCE_PATH SOURCE_PATH
REPO lib/libxt
REF edd70bdfbbd16247e3d9564ca51d864f82626eb7 # 1.2.1
SHA512 c49876253dfd187e7d56a098d3d992157daefa2c25ee732eaae5818ee04513bedd807d2f265085db2e82c0b1821e152a88fb4998c0002f6ac57204543fe18566
HEAD_REF master
PATCHES windows_build.patch
globals.patch
getcwd.patch
${PATCHES}
)
set(ENV{ACLOCAL} "aclocal -I \"${CURRENT_INSTALLED_DIR}/share/xorg/aclocal/\"")
string(APPEND VCPKG_C_FLAGS " -DXT_BUILD")
string(APPEND VCPKG_CXX_FLAGS " -DXT_BUILD")
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic" AND VCPKG_TARGET_IS_WINDOWS)
string(APPEND VCPKG_C_FLAGS " -DXT_DLL_EXPORTS")
string(APPEND VCPKG_CXX_FLAGS " -DXT_DLL_EXPORTS")
endif()
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
z_vcpkg_get_cmake_vars(cmake_vars_file)
include("${cmake_vars_file}")
if(VCPKG_DETECTED_CMAKE_C_COMPILER_ID STREQUAL "MSVC")
vcpkg_find_acquire_program(CLANG)
cmake_path(GET CLANG PARENT_PATH CLANG_PARENT_PATH)
set(CLANG_CL "${CLANG_PARENT_PATH}/clang-cl.exe")
file(READ "${cmake_vars_file}" contents)
string(APPEND contents "\nset(VCPKG_DETECTED_CMAKE_C_COMPILER \"${CLANG_CL}\")")
string(APPEND contents "\nset(VCPKG_DETECTED_CMAKE_CXX_COMPILER \"${CLANG_CL}\")")
if(VCPKG_TARGET_ARCHITECTURE STREQUAL x86)
string(APPEND contents "\nstring(APPEND VCPKG_DETECTED_CMAKE_C_FLAGS_DEBUG \" -m32\")")
string(APPEND contents "\nstring(APPEND VCPKG_DETECTED_CMAKE_C_FLAGS_RELEASE \" -m32\")")
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL arm64)
string(APPEND contents "\nstring(PREPEND VCPKG_DETECTED_CMAKE_C_FLAGS_DEBUG \"--target=arm64-pc-win32 \")")
string(APPEND contents "\nstring(PREPEND VCPKG_DETECTED_CMAKE_C_FLAGS_RELEASE \"--target=arm64-pc-win32 \")")
endif()
file(WRITE "${cmake_vars_file}" "${contents}")
endif()
set(cmake_vars_file "${cmake_vars_file}" CACHE INTERNAL "") # Don't run z_vcpkg_get_cmake_vars twice
set(OPTIONS --disable-selective-werror)
endif()
vcpkg_configure_make(
SOURCE_PATH "${SOURCE_PATH}"
AUTOCONFIG
OPTIONS
--with-xfile-search-path=X11
--with-appdefaultdir=share/X11/app-defaults
--enable-malloc0returnsnull=yes
xorg_cv_malloc0_returns_null=yes
${OPTIONS}
)
if(VCPKG_CROSSCOMPILING)
file(INSTALL "${CURRENT_HOST_INSTALLED_DIR}/tools/${PORT}/makestrs${VCPKG_HOST_EXECUTABLE_SUFFIX}" DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/util/")
if(NOT VCPKG_BUILD_TYPE)
file(INSTALL "${CURRENT_HOST_INSTALLED_DIR}/tools/${PORT}/makestrs${VCPKG_HOST_EXECUTABLE_SUFFIX}" DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/util/")
endif()
endif()
vcpkg_install_make()
vcpkg_fixup_pkgconfig()
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic" AND VCPKG_TARGET_IS_WINDOWS)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/X11/StringDefs.h" "defined(XT_DLL_EXPORTS)" "1")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/X11/Shell.h" "defined(XT_DLL_EXPORTS)" "1")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/X11/Intrinsic.h" "defined(XT_DLL_EXPORTS)" "1")
# XTSTRINGDEFINES is required since the "strings" are often used in a const context which doesn't work if they are adresses of a global array in another dll
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/X11/StringDefs.h" "#define _XtStringDefs_h_" "#define _XtStringDefs_h_\n#define XTSTRINGDEFINES")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/X11/Shell.h" "#define _XtShell_h" "#define _XtShell_h\n#define XTSTRINGDEFINES")
endif()
if(VCPKG_TARGET_IS_WINDOWS)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/xt.pc" " -lXt" " -lXt -lws2_32")
if(NOT VCPKG_BUILD_TYPE)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/xt.pc" " -lXt" " -lXt -lws2_32")
endif()
endif()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
if(NOT VCPKG_CROSSCOMPILING)
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/util/makestrs${VCPKG_TARGET_EXECUTABLE_SUFFIX}"
DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
endif()
# Handle copyright
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
endif()

24
ports/libxt/vcpkg.json Normal file
View File

@ -0,0 +1,24 @@
{
"name": "libxt",
"version": "1.2.1",
"description": "X Toolkit Intrinsics library",
"homepage": "https://gitlab.freedesktop.org/xorg/lib/libxt",
"license": null,
"dependencies": [
"bzip2",
"glib",
"libice",
"libsm",
"libx11",
{
"name": "libxt",
"host": true
},
{
"name": "vcpkg-cmake-get-vars",
"host": true
},
"xorg-macros",
"xproto"
]
}

View File

@ -0,0 +1,178 @@
diff --git a/include/X11/Intrinsic.h b/include/X11/Intrinsic.h
index cf8d3fe41..559697aa0 100644
--- a/include/X11/Intrinsic.h
+++ b/include/X11/Intrinsic.h
@@ -50,6 +50,10 @@ in this Software without prior written authorization from The Open Group.
#ifndef _XtIntrinsic_h
#define _XtIntrinsic_h
+#ifdef WIN32
+#define _WILLWINSOCK_
+#endif
+
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xresource.h>
diff --git a/include/X11/IntrinsicI.h b/include/X11/IntrinsicI.h
index a8b7f48cf..99c5349e7 100644
--- a/include/X11/IntrinsicI.h
+++ b/include/X11/IntrinsicI.h
@@ -48,11 +48,12 @@ SOFTWARE.
#ifndef _XtintrinsicI_h
#define _XtintrinsicI_h
-#include "Xtos.h"
-#include "IntrinsicP.h"
#ifdef WIN32
#define _WILLWINSOCK_
#endif
+
+#include "Xtos.h"
+#include "IntrinsicP.h"
#include <X11/Xos.h>
#include "Object.h"
diff --git a/src/Convert.c b/src/Convert.c
index 9b2d465b3..5c89850f1 100644
--- a/src/Convert.c
+++ b/src/Convert.c
@@ -71,6 +71,9 @@ in this Software without prior written authorization from The Open Group.
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
+#ifdef _MSC_VER
+#include <direct.h>
+#endif
#include "IntrinsicI.h"
#include "StringDefs.h"
#include "Intrinsic.h"
diff --git a/src/Core.c b/src/Core.c
index d728a9286..5ee0d2fe8 100644
--- a/src/Core.c
+++ b/src/Core.c
@@ -80,6 +80,9 @@ in this Software without prior written authorization from The Open Group.
#include "RectObjP.h"
#include "ThreadsI.h"
#include "StringDefs.h"
+#ifndef None
+#define None 0L
+#endif
/******************************************************************
*
diff --git a/src/Error.c b/src/Error.c
index 4bf4713e5..a64784a6f 100644
--- a/src/Error.c
+++ b/src/Error.c
@@ -74,7 +74,9 @@ in this Software without prior written authorization from The Open Group.
#include "IntrinsicI.h"
#include <stdio.h>
#include <stdlib.h>
-
+#ifndef None
+#define None 0L
+#endif
/* The error handlers in the application context aren't used since we can't
come up with a uniform way of using them. If you can, define
GLOBALERRORS to be FALSE (or 0). */
diff --git a/src/Event.c b/src/Event.c
index dadcedeb8..1eafc0143 100644
--- a/src/Event.c
+++ b/src/Event.c
@@ -74,7 +74,9 @@ in this Software without prior written authorization from The Open Group.
#include "IntrinsicI.h"
#include "Shell.h"
#include "StringDefs.h"
-
+#ifndef None
+#define None 0L
+#endif
typedef struct _XtEventRecExt {
int type;
XtPointer select_data[1]; /* actual dimension is [mask] */
diff --git a/src/GCManager.c b/src/GCManager.c
index 6031248e5..205f1cbe3 100644
--- a/src/GCManager.c
+++ b/src/GCManager.c
@@ -72,7 +72,9 @@ in this Software without prior written authorization from The Open Group.
#include <config.h>
#endif
#include "IntrinsicI.h"
-
+#ifndef None
+#define None 0L
+#endif
typedef struct _GCrec {
unsigned char screen; /* Screen for GC */
unsigned char depth; /* Depth for GC */
diff --git a/src/Geometry.c b/src/Geometry.c
index 3704cb63d..2f00cdcca 100644
--- a/src/Geometry.c
+++ b/src/Geometry.c
@@ -75,6 +75,10 @@ in this Software without prior written authorization from The Open Group.
#include "ShellP.h"
#include "ShellI.h"
+#ifndef None
+#define None 0L
+#endif
+
static void
ClearRectObjAreas(RectObj r, XWindowChanges *old)
{
diff --git a/src/Keyboard.c b/src/Keyboard.c
index da6fa11aa..7d9271f45 100644
--- a/src/Keyboard.c
+++ b/src/Keyboard.c
@@ -80,6 +80,10 @@ in this Software without prior written authorization from The Open Group.
#include "PassivGraI.h"
#include "EventI.h"
+#ifndef None
+#define None 0L
+#endif
+
#define _GetWindowedAncestor(w) (XtIsWidget(w) ? w : _XtWindowedAncestor(w))
/* InActiveSubtree cache of the current focus source and its ancestors */
diff --git a/util/makestrs.c b/util/makestrs.c
index 4d5c0a6b7..b64e42eea 100644
--- a/util/makestrs.c
+++ b/util/makestrs.c
@@ -29,7 +29,9 @@ in this Software without prior written authorization from The Open Group.
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
typedef struct _TableEnt {
struct _TableEnt *next;
diff --git a/src/Initialize.c b/src/Initialize.c
index 8ae54b47c..765479603 100644
--- a/src/Initialize.c
+++ b/src/Initialize.c
@@ -246,7 +246,7 @@ _XtInherit(void)
* cygwin-xfree: http://www.cygwin.com/ml/cygwin-xfree/2003-10/msg00000.html
*/
-#ifdef __x86_64__
+#if defined(__x86_64__) || defined(_M_X64)
asm(".section .trampoline, \"dwx\" \n\
.globl _XtInherit \n\
_XtInherit: \n\
diff --git a/src/Shell.c b/src/Shell.c
index 07713cc25..fcf10a5e2 100644
--- a/src/Shell.c
+++ b/src/Shell.c
@@ -87,7 +87,9 @@ in this Software without prior written authorization from The Open Group.
#include <X11/ICE/ICElib.h>
#include <stdio.h>
#include <stdlib.h>
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#ifdef EDITRES
#include <X11/Xmu/Editres.h>

View File

@ -0,0 +1,30 @@
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/libxtst
REF 99b89c3bcb0ebb0b6dd86bfdc9d276715eaea889
SHA512 6479294057c73e91a086891e461e98d2717ae1fbe746cd74c9d13036a59bce931b8b0d5293d3c5ab4feeea426f2297647335179997e06a040b847697c7557199
HEAD_REF master
)
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()

13
ports/libxtst/vcpkg.json Normal file
View File

@ -0,0 +1,13 @@
{
"name": "libxtst",
"version": "1.2.4",
"description": "Xlib-based library for XTEST & RECORD extensions",
"homepage": "https://gitlab.freedesktop.org/xorg/lib/libxtst",
"license": null,
"dependencies": [
"libx11",
"libxext",
"libxi",
"xproto"
]
}

View File

@ -0,0 +1,13 @@
diff --git a/src/Makefile.am b/src/Makefile.am
index 81f896790..100ca935a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -6,7 +6,7 @@ AM_CFLAGS = $(XXF86VM_CFLAGS) $(MALLOC_ZERO_CFLAGS)
AM_CPPFLAGS = -I$(top_srcdir)/include
libXxf86vm_la_LIBADD = $(XXF86VM_LIBS)
-libXxf86vm_la_LDFLAGS = -version-number 1:0:0
+libXxf86vm_la_LDFLAGS = -no-undefined -version-number 1:0:0
libXxf86vmincludedir = $(includedir)/X11/extensions
libXxf86vminclude_HEADERS = $(top_srcdir)/include/X11/extensions/xf86vmode.h

View File

@ -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/libxxf86vm
REF 7fe2d41f164d3015216c1079cc7fbce1eea90c98
SHA512 c7ee07478bcc5db18e47a5a7b8965d89172bbab733f60fb13b9527b7888445fdd86d5d99aa67d6436fc2ef3ea0bd8d9c6e4f10fbef351f229de982bd6f21f9c9
HEAD_REF master
PATCHES no-undefined.patch
)
set(ENV{ACLOCAL} "aclocal -I \"${CURRENT_INSTALLED_DIR}/share/xorg/aclocal/\"")
if(VCPKG_CROSSCOMPILING)
set(OPTIONS --enable-malloc0returnsnull=yes
xorg_cv_malloc0_returns_null=yes)
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")
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
endif()

View File

@ -0,0 +1,13 @@
{
"name": "libxxf86vm",
"version": "1.1.5",
"description": "Xlib-based library for the XFree86-VidMode X extension",
"homepage": "https://gitlab.freedesktop.org/xorg/lib/libxxf86vm",
"license": null,
"dependencies": [
"bzip2",
"libxext",
"xorg-macros",
"xproto"
]
}

View File

@ -14,6 +14,7 @@ vcpkg_from_gitlab(
configure.patch
use_xwindows_includes.patch # use the X11 include wrappers for windows headers
getpid_include.patch # add include for getpid on windows
win-fixes.patch # avoid: 'close' undefined; assuming extern returning int
)
set(ENV{ACLOCAL} "aclocal -I \"${CURRENT_INSTALLED_DIR}/share/xorg/aclocal/\"")

View File

@ -1,6 +1,7 @@
{
"name": "xcb",
"version": "1.14",
"port-version": 1,
"description": "C interface to the X Window System protocol, which replaces the traditional Xlib interface.",
"homepage": "https://xcb.freedesktop.org/",
"license": "X11-distribute-modifications-variant",

40
ports/xcb/win-fixes.patch Normal file
View File

@ -0,0 +1,40 @@
diff --git a/src/xcb_util.c b/src/xcb_util.c
index 0296ce0dd..cce54aa50 100644
--- a/src/xcb_util.c
+++ b/src/xcb_util.c
@@ -389,7 +389,11 @@ static int _xcb_open_tcp(const char *host, char *protocol, const unsigned short
fd = _xcb_socket(addr->ai_family, addr->ai_socktype, addr->ai_protocol);
if (_xcb_do_connect(fd, addr->ai_addr, addr->ai_addrlen) >= 0)
break;
+#ifdef _WIN32
+ closesocket(fd);
+#else
close(fd);
+#endif
fd = -1;
}
freeaddrinfo(results);
@@ -454,7 +458,11 @@ static int _xcb_open_unix(char *protocol, const char *file)
setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &val, sizeof(int));
}
if(connect(fd, (struct sockaddr *) &addr, sizeof(addr)) == -1) {
+#ifdef _WIN32
+ closesocket(fd);
+#else
close(fd);
+#endif
return -1;
}
return fd;
@@ -481,7 +489,11 @@ static int _xcb_open_abstract(char *protocol, const char *file, size_t filelen)
if (fd == -1)
return -1;
if (connect(fd, (struct sockaddr *) &addr, namelen) == -1) {
+#ifdef _WIN32
+ closesocket(fd);
+#else
close(fd);
+#endif
return -1;
}
return fd;

View File

@ -547,6 +547,9 @@ libwandio:x64-windows-static-md=fail
libwandio:x64-uwp=fail
libwandio:arm64-windows=fail
libwandio:arm-uwp=fail
libxaw:x64-windows-static=skip
# clang-cl ICEd
libxt:arm64-windows=fail
licensepp:arm-uwp=fail
licensepp:x64-uwp=fail
linenoise-ng:arm-uwp=fail

View File

@ -3362,7 +3362,7 @@
},
"kf5kio": {
"baseline": "5.89.0",
"port-version": 1
"port-version": 2
},
"kf5newstuff": {
"baseline": "5.89.0",
@ -3826,7 +3826,7 @@
},
"libice": {
"baseline": "1.0.10",
"port-version": 0
"port-version": 1
},
"libiconv": {
"baseline": "1.17",
@ -4190,7 +4190,7 @@
},
"libsm": {
"baseline": "1.2.3",
"port-version": 0
"port-version": 1
},
"libsmb2": {
"baseline": "2021-04-29",
@ -4373,13 +4373,17 @@
"port-version": 3
},
"libx11": {
"baseline": "1.7.3.1",
"port-version": 1
"baseline": "1.8.1",
"port-version": 0
},
"libxau": {
"baseline": "1.0.9",
"port-version": 0
},
"libxaw": {
"baseline": "1.0.13",
"port-version": 0
},
"libxcomposite": {
"baseline": "0.4.5",
"port-version": 0
@ -4452,9 +4456,13 @@
"baseline": "4.4.1",
"port-version": 8
},
"libxmu": {
"baseline": "1.1.3",
"port-version": 0
},
"libxpm": {
"baseline": "3.5.11",
"port-version": 1
"port-version": 2
},
"libxpresent": {
"baseline": "1.0.0",
@ -4480,10 +4488,22 @@
"baseline": "1.1.37",
"port-version": 0
},
"libxt": {
"baseline": "1.2.1",
"port-version": 0
},
"libxtst": {
"baseline": "1.2.4",
"port-version": 0
},
"libxv": {
"baseline": "1.0.11",
"port-version": 0
},
"libxxf86vm": {
"baseline": "1.1.5",
"port-version": 0
},
"libyaml": {
"baseline": "0.2.5",
"port-version": 3
@ -8030,7 +8050,7 @@
},
"xcb": {
"baseline": "1.14",
"port-version": 0
"port-version": 1
},
"xcb-image": {
"baseline": "0.4.1",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "d3132359600eb520d63d54039b5b8f0e4ab5e252",
"version": "5.89.0",
"port-version": 2
},
{
"git-tree": "2ac545c09ad339684b43c2a6eb74b034f4ee1f25",
"version": "5.89.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "c19081b820dd8056dbb7bbb052ca0c3bcf628cd7",
"version": "1.0.10",
"port-version": 1
},
{
"git-tree": "95b91f0eb6ed362a133896484d1cc4fa5ee3b007",
"version": "1.0.10",

View File

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

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "c316078022f4159f578146cf4871c359d5af8321",
"version": "1.8.1",
"port-version": 0
},
{
"git-tree": "e69bacce69d31cc63b4c1f6c5637ba204289a496",
"version": "1.7.3.1",

9
versions/l-/libxaw.json Normal file
View File

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "71b085f0a3771532f541cab3ca0d8e4222526949",
"version": "1.0.13",
"port-version": 0
}
]
}

9
versions/l-/libxmu.json Normal file
View File

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "59f551a642f1c8b1c6dd02ad3f13d32231e48d4b",
"version": "1.1.3",
"port-version": 0
}
]
}

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "3efa6a545aff99a8e1a6055284149e7717043f47",
"version": "3.5.11",
"port-version": 2
},
{
"git-tree": "04f6484a58c91b33e62feae8a44caa25ab667aaf",
"version": "3.5.11",

9
versions/l-/libxt.json Normal file
View File

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "ec0636529740c0931c0c31006dc22d5d599f080d",
"version": "1.2.1",
"port-version": 0
}
]
}

9
versions/l-/libxtst.json Normal file
View File

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "8b2a80b040031d2b2c9952e885bc68884f13c099",
"version": "1.2.4",
"port-version": 0
}
]
}

View File

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "a4dfb11cf5012b77357e097116359740ee7ade1f",
"version": "1.1.5",
"port-version": 0
}
]
}

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "78b7401a998fdbe19ed1049e9f8c44675317f00c",
"version": "1.14",
"port-version": 1
},
{
"git-tree": "7af3e0f5bc8377ca950f83d3a0bdbb8cc40026aa",
"version": "1.14",