mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-27 19:09:00 +08:00
[Part1|xwindow PR] Split up to dbus (#22642)
* first batch of xwindow PR ports - up to dbus * first batch of xwindow PR ports - up to dbus * format manifest * version stuff * remove if block * version stuff * fix xcb hash * fix xproto dependency on meson blocking cross builds * adjust message * use X11_xcb_LIB * version stuff * put xlib arm64-windows on baseline * fix dbus on osx and linux * version stuff * forget to set the value * fix --export-dynamic on osx * version dbus * ci-retrigger * add license (needs tool update) * version adjustments * version update * remove unnecessary comments * v db * Apply suggestions from code review Co-authored-by: Billy O'Neal <bion@microsoft.com> * nitpicks * rename xau to libxau * use vcpkg_install_copyright and silence usage * xtrans silence usage * format-manifest * v db * make license null for ports without exact match * xdmcp rename to libxdmcp * merge x11 wrapper into xlib rename xlib to libx11 to avoid a metaport * v db * missed dbus depending on x11. * v db * Update scripts/ci.baseline.txt Co-authored-by: LilyWangLL <94091114+LilyWangLL@users.noreply.github.com> Co-authored-by: Alexander Neumann <you@example.com> Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com> Co-authored-by: Billy O'Neal <bion@microsoft.com>
This commit is contained in:
parent
3fefadf6cb
commit
552f1ee5f8
15
ports/dbus/cmake.dep.patch
Normal file
15
ports/dbus/cmake.dep.patch
Normal file
@ -0,0 +1,15 @@
|
||||
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
|
||||
index 8cde1ffe0..d4d09f223 100644
|
||||
--- a/tools/CMakeLists.txt
|
||||
+++ b/tools/CMakeLists.txt
|
||||
@@ -91,7 +91,9 @@ endif()
|
||||
add_executable(dbus-launch ${dbus_launch_SOURCES})
|
||||
target_link_libraries(dbus-launch ${DBUS_LIBRARIES})
|
||||
if(DBUS_BUILD_X11)
|
||||
- target_link_libraries(dbus-launch ${X11_LIBRARIES} )
|
||||
+ find_package(Threads REQUIRED)
|
||||
+ target_link_libraries(dbus-launch ${X11_LIBRARIES} ${X11_xcb_LIB} ${X11_Xau_LIB} ${X11_Xdmcp_LIB} Threads::Threads)
|
||||
+ target_include_directories(dbus-launch PRIVATE ${X11_INCLUDE_DIR})
|
||||
endif()
|
||||
install(TARGETS dbus-launch ${INSTALL_TARGETS_DEFAULT_ARGS})
|
||||
|
26
ports/dbus/getpeereid.patch
Normal file
26
ports/dbus/getpeereid.patch
Normal file
@ -0,0 +1,26 @@
|
||||
diff --git a/cmake/ConfigureChecks.cmake b/cmake/ConfigureChecks.cmake
|
||||
index 7bc789f0e..ec476d9ed 100644
|
||||
--- a/cmake/ConfigureChecks.cmake
|
||||
+++ b/cmake/ConfigureChecks.cmake
|
||||
@@ -44,6 +44,7 @@ check_include_file(sys/inotify.h DBUS_BUS_ENABLE_INOTIFY)
|
||||
|
||||
check_symbol_exists(backtrace "execinfo.h" HAVE_BACKTRACE) # dbus-sysdeps.c, dbus-sysdeps-win.c
|
||||
check_symbol_exists(getgrouplist "grp.h" HAVE_GETGROUPLIST) # dbus-sysdeps.c
|
||||
+check_symbol_exists(getpeereid "sys/types.h;unistd.h" HAVE_GETPEEREID) # dbus-sysdeps.c,
|
||||
check_symbol_exists(getpeerucred "ucred.h" HAVE_GETPEERUCRED) # dbus-sysdeps.c, dbus-sysdeps-win.c
|
||||
check_symbol_exists(nanosleep "time.h" HAVE_NANOSLEEP) # dbus-sysdeps.c
|
||||
check_symbol_exists(getpwnam_r "errno.h;pwd.h" HAVE_GETPWNAM_R) # dbus-sysdeps-util-unix.c
|
||||
diff --git a/cmake/config.h.cmake b/cmake/config.h.cmake
|
||||
index cbffcfa91..1f055ddb9 100644
|
||||
--- a/cmake/config.h.cmake
|
||||
+++ b/cmake/config.h.cmake
|
||||
@@ -169,6 +169,9 @@
|
||||
/* Define to 1 if you have getgrouplist */
|
||||
#cmakedefine HAVE_GETGROUPLIST 1
|
||||
|
||||
+/* Define to 1 if you have getpeereid */
|
||||
+#cmakedefine HAVE_GETPEEREID 1
|
||||
+
|
||||
/* Define to 1 if you have getpeerucred */
|
||||
#cmakedefine HAVE_GETPEERUCRED 1
|
||||
|
17
ports/dbus/pkgconfig.patch
Normal file
17
ports/dbus/pkgconfig.patch
Normal file
@ -0,0 +1,17 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 1c2f6ba5b..a5f7fe222 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -723,8 +723,10 @@ add_custom_target(help-options
|
||||
# create pkgconfig file
|
||||
#
|
||||
if(DBUS_ENABLE_PKGCONFIG)
|
||||
- set(PLATFORM_LIBS pthread ${LIBRT})
|
||||
- if(PKG_CONFIG_FOUND)
|
||||
+ if(NOT WIN32)
|
||||
+ set(PLATFORM_LIBS pthread ${LIBRT})
|
||||
+ endif()
|
||||
+ if(1)
|
||||
# convert lists of link libraries into -lstdc++ -lm etc..
|
||||
foreach(LIB ${PLATFORM_LIBS})
|
||||
set(LIBDBUS_LIBS "${LIBDBUS_LIBS} -l${LIB}")
|
64
ports/dbus/portfile.cmake
Normal file
64
ports/dbus/portfile.cmake
Normal file
@ -0,0 +1,64 @@
|
||||
vcpkg_from_gitlab(
|
||||
GITLAB_URL https://gitlab.freedesktop.org/
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO dbus/dbus
|
||||
REF c91ca6edad658274607323a438eea7c7c6c5e392 #1.13.18
|
||||
SHA512 4dd4d369152591040ebe9f474a0ba8911d8a91546d64b1d6f7335b7fd8026bd99a8a4fe1c78b80eb2e31e9e58324d432857e2a7af1d1cb950d22b4430cc0f7ac
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
cmake.dep.patch
|
||||
rt_pc_link.patch
|
||||
pkgconfig.patch
|
||||
getpeereid.patch # missing check from configure.ac
|
||||
rdynamic.patch # OSX doesn't like '-Wl,--export-dynamic'
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DDBUS_BUILD_TESTS=OFF
|
||||
-DDBUS_ENABLE_XML_DOCS=OFF
|
||||
-DDBUS_INSTALL_SYSTEM_LIBS=OFF
|
||||
-DDBUS_ENABLE_PKGCONFIG=ON
|
||||
#-DDBUS_SERVICE=ON
|
||||
-DDBUS_WITH_GLIB=ON
|
||||
-DXSLTPROC_EXECUTABLE=FALSE
|
||||
-DENABLE_SYSTEMD=ON
|
||||
-DDBUS_ENABLE_PKGCONFIG=ON
|
||||
-DPKG_CONFIG_FOUND=TRUE
|
||||
"-DCMAKE_INSTALL_SYSCONFDIR=${CURRENT_PACKAGES_DIR}/etc/${PORT}"
|
||||
"-DWITH_SYSTEMD_SYSTEMUNITDIR=lib/systemd/system"
|
||||
"-DWITH_SYSTEMD_USERUNITDIR=lib/systemd/user"
|
||||
)
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_copy_pdbs()
|
||||
vcpkg_cmake_config_fixup(PACKAGE_NAME "DBus1" CONFIG_PATH "lib/cmake/DBus1")
|
||||
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)
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/var/"
|
||||
"${CURRENT_PACKAGES_DIR}/var"
|
||||
"${CURRENT_PACKAGES_DIR}/share/dbus-1/services"
|
||||
"${CURRENT_PACKAGES_DIR}/share/dbus-1/session.d"
|
||||
"${CURRENT_PACKAGES_DIR}/share/dbus-1/system-services"
|
||||
"${CURRENT_PACKAGES_DIR}/share/dbus-1/system.d")
|
||||
|
||||
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
|
||||
set(TOOLS daemon launch monitor run-session send test-tool update-activation-environment)
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/bin/dbus-env.bat" "${CURRENT_PACKAGES_DIR}" "%~dp0/..")
|
||||
else()
|
||||
list(APPEND TOOLS cleanup-sockets uuidgen)
|
||||
endif()
|
||||
list(TRANSFORM TOOLS PREPEND "dbus-" )
|
||||
vcpkg_copy_tools(TOOL_NAMES ${TOOLS} AUTO_CLEAN)
|
||||
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
||||
endif()
|
15
ports/dbus/rdynamic.patch
Normal file
15
ports/dbus/rdynamic.patch
Normal file
@ -0,0 +1,15 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 1c2f6ba5b..6a4c5410b 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -277,8 +277,8 @@ endif()
|
||||
|
||||
if(UNIX AND NOT DBUS_DISABLE_ASSERT)
|
||||
# required for backtrace
|
||||
- set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wl,--export-dynamic")
|
||||
- set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Wl,--export-dynamic")
|
||||
+ set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -rdynamic")
|
||||
+ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -rdynamic")
|
||||
add_definitions(-DDBUS_BUILT_R_DYNAMIC)
|
||||
endif()
|
||||
|
27
ports/dbus/rt_pc_link.patch
Normal file
27
ports/dbus/rt_pc_link.patch
Normal file
@ -0,0 +1,27 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index caef73840..caf7e61bf 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -726,7 +726,7 @@ if(DBUS_ENABLE_PKGCONFIG)
|
||||
set(PLATFORM_LIBS pthread ${LIBRT})
|
||||
if(PKG_CONFIG_FOUND)
|
||||
# convert lists of link libraries into -lstdc++ -lm etc..
|
||||
- foreach(LIB ${CMAKE_C_IMPLICIT_LINK_LIBRARIES} ${PLATFORM_LIBS})
|
||||
+ foreach(LIB ${PLATFORM_LIBS})
|
||||
set(LIBDBUS_LIBS "${LIBDBUS_LIBS} -l${LIB}")
|
||||
endforeach()
|
||||
set(original_prefix "${CMAKE_INSTALL_PREFIX}")
|
||||
diff --git a/dbus/CMakeLists.txt b/dbus/CMakeLists.txt
|
||||
index 63070b69b..5752b7492 100644
|
||||
--- a/dbus/CMakeLists.txt
|
||||
+++ b/dbus/CMakeLists.txt
|
||||
@@ -253,6 +253,9 @@ endif()
|
||||
|
||||
# for clock_getres() on e.g. GNU/Linux (but not Android)
|
||||
find_library(LIBRT rt)
|
||||
+get_filename_component(LIBRT "${LIBRT}" NAME_WLE)
|
||||
+string(REPLACE "lib" "" LIBRT "${LIBRT}")
|
||||
+set(LIBRT "${LIBRT}" CACHE STRING "" FORCE)
|
||||
|
||||
# for socket() on QNX
|
||||
find_library(LIBSOCKET socket)
|
20
ports/dbus/vcpkg.json
Normal file
20
ports/dbus/vcpkg.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"name": "dbus",
|
||||
"version": "1.13.18",
|
||||
"description": "D-Bus specification and reference implementation, including libdbus and dbus-daemon",
|
||||
"homepage": "https://gitlab.freedesktop.org/dbus/dbus",
|
||||
"license": "AFL-2.1 OR GPL-2.0-or-later",
|
||||
"dependencies": [
|
||||
"expat",
|
||||
"glib",
|
||||
"libx11",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
147
ports/libx11/cl.build.patch
Normal file
147
ports/libx11/cl.build.patch
Normal file
@ -0,0 +1,147 @@
|
||||
diff --git a/include/X11/Xlibint.h b/include/X11/Xlibint.h
|
||||
index 844571688..e46c4ec5d 100644
|
||||
--- a/include/X11/Xlibint.h
|
||||
+++ b/include/X11/Xlibint.h
|
||||
@@ -1351,11 +1351,14 @@ extern int _XOpenFile(
|
||||
int /* flags */
|
||||
);
|
||||
|
||||
+#if defined(_MSC_VER) && !defined(mode_t)
|
||||
+typedef int mode_t;
|
||||
+#endif
|
||||
extern int _XOpenFileMode(
|
||||
_Xconst char* /* path */,
|
||||
int /* flags */,
|
||||
mode_t /* mode */
|
||||
);
|
||||
|
||||
extern void* _XFopenFile(
|
||||
_Xconst char* /* path */,
|
||||
diff --git a/modules/im/ximcp/imLcLkup.c b/modules/im/ximcp/imLcLkup.c
|
||||
index 56dba9673..d10de825e 100644
|
||||
--- a/modules/im/ximcp/imLcLkup.c
|
||||
+++ b/modules/im/ximcp/imLcLkup.c
|
||||
@@ -61,27 +61,37 @@ _XimLocalMbLookupString(XIC xic, XKeyEvent *ev, char *buffer, int bytes,
|
||||
||(ic->private.local.brl_committed != 0))) {
|
||||
if (ic->private.local.brl_committed != 0) { /* Braille Event */
|
||||
unsigned char pattern = ic->private.local.brl_committed;
|
||||
+#ifndef _MSC_VER
|
||||
char mb2[XLC_PUBLIC(ic->core.im->core.lcd, mb_cur_max)];
|
||||
+#else
|
||||
+ char *mb2 = (char*)malloc(XLC_PUBLIC(ic->core.im->core.lcd, mb_cur_max)*sizeof(char));
|
||||
+#endif
|
||||
ret = _Xlcwctomb(ic->core.im->core.lcd, mb2, BRL_UC_ROW | pattern);
|
||||
if(ret > bytes) {
|
||||
if(status) *status = XBufferOverflow;
|
||||
+#ifdef _MSC_VER
|
||||
+ free(mb2);
|
||||
+#endif
|
||||
return(ret);
|
||||
}
|
||||
if(keysym) *keysym = XK_braille_blank | pattern;
|
||||
if(ret > 0) {
|
||||
if (keysym) {
|
||||
if(status) *status = XLookupBoth;
|
||||
} else {
|
||||
if(status) *status = XLookupChars;
|
||||
}
|
||||
memcpy(buffer, mb2, ret);
|
||||
} else {
|
||||
if(keysym) {
|
||||
if(status) *status = XLookupKeySym;
|
||||
} else {
|
||||
if(status) *status = XLookupNone;
|
||||
}
|
||||
}
|
||||
+#ifdef _MSC_VER
|
||||
+ free(mb2);
|
||||
+#endif
|
||||
} else { /* Composed Event */
|
||||
ret = strlen(&mb[b[ic->private.local.composed].mb]);
|
||||
if(ret > bytes) {
|
||||
diff --git a/src/XlibInt.c b/src/XlibInt.c
|
||||
index e4fb4e5f2..4cfa1aeab 100644
|
||||
--- a/src/XlibInt.c
|
||||
+++ b/src/XlibInt.c
|
||||
@@ -60,6 +60,8 @@ from The Open Group.
|
||||
/* Needed for ioctl() on Solaris */
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
+#else
|
||||
+ #define F_OK 0
|
||||
#endif
|
||||
|
||||
#ifdef XTHREADS
|
||||
@@ -985,7 +987,7 @@ _XWireToEvent(
|
||||
case KeymapNotify:
|
||||
{
|
||||
register XKeymapEvent *ev = (XKeymapEvent *) re;
|
||||
- ev->window = None;
|
||||
+ ev->window = 0;
|
||||
memcpy(&ev->key_vector[1],
|
||||
(char *)((xKeymapEvent *) event)->map,
|
||||
sizeof (((xKeymapEvent *) event)->map));
|
||||
@@ -1919,7 +1925,11 @@ int _XOpenFileMode(path, flags, mode)
|
||||
UINT olderror = SetErrorMode (SEM_FAILCRITICALERRORS);
|
||||
|
||||
if (AccessFile (path, buf, MAX_PATH, &bufp))
|
||||
+#ifndef _MSC_VER
|
||||
ret = open (bufp, flags, mode);
|
||||
+#else
|
||||
+ ret = _open (bufp, flags, mode);
|
||||
+#endif
|
||||
|
||||
(void) SetErrorMode (olderror);
|
||||
|
||||
diff --git a/src/xlibi18n/XDefaultOMIF.c b/src/xlibi18n/XDefaultOMIF.c
|
||||
index 9345547c3..77d914fe1 100644
|
||||
--- a/src/xlibi18n/XDefaultOMIF.c
|
||||
+++ b/src/xlibi18n/XDefaultOMIF.c
|
||||
@@ -70,6 +70,14 @@ Sun Microsystems, Inc. or its licensors is granted.
|
||||
#include <X11/Xatom.h>
|
||||
#include <stdio.h>
|
||||
|
||||
+#if !defined(ssize_t)
|
||||
+ #ifdef _WIN64
|
||||
+ #define ssize_t long long
|
||||
+ #else
|
||||
+ #define ssize_t long
|
||||
+ #endif
|
||||
+#endif
|
||||
+
|
||||
#define MAXFONTS 100
|
||||
|
||||
#define XOM_GENERIC(om) (&((XOMGeneric) om)->gen)
|
||||
diff --git a/src/xlibi18n/lcDB.c b/src/xlibi18n/lcDB.c
|
||||
index e04a5d89f..fa46f8ecc 100644
|
||||
--- a/src/xlibi18n/lcDB.c
|
||||
+++ b/src/xlibi18n/lcDB.c
|
||||
@@ -65,6 +65,14 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
+#if !defined(ssize_t)
|
||||
+ #ifdef _WIN64
|
||||
+ #define ssize_t long long
|
||||
+ #else
|
||||
+ #define ssize_t long
|
||||
+ #endif
|
||||
+#endif
|
||||
+
|
||||
typedef struct _DatabaseRec {
|
||||
char *category;
|
||||
char *name;
|
||||
diff --git a/src/xlibi18n/lcFile.c b/src/xlibi18n/lcFile.c
|
||||
index e43ac2c0e..d9f49b725 100644
|
||||
--- a/src/xlibi18n/lcFile.c
|
||||
+++ b/src/xlibi18n/lcFile.c
|
||||
@@ -32,7 +32,9 @@
|
||||
#include "Xlibint.h"
|
||||
#include "XlcPubI.h"
|
||||
#include <X11/Xos.h>
|
||||
+#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
+#endif
|
||||
|
||||
/************************************************************************/
|
||||
|
44
ports/libx11/dllimport.patch
Normal file
44
ports/libx11/dllimport.patch
Normal file
@ -0,0 +1,44 @@
|
||||
diff --git a/include/X11/Xlibint.h b/include/X11/Xlibint.h
|
||||
index 603d05669..8596cb434 100644
|
||||
--- a/include/X11/Xlibint.h
|
||||
+++ b/include/X11/Xlibint.h
|
||||
@@ -389,23 +389,26 @@ struct _XLockPtrs {
|
||||
#define _XLockMutex_fn (*_XLockMutex_fn_p)
|
||||
#define _XUnlockMutex_fn (*_XUnlockMutex_fn_p)
|
||||
#define _Xglobal_lock (*_Xglobal_lock_p)
|
||||
+#define X_LOCK_EXTERN __declspec(dllimport) extern
|
||||
+#else
|
||||
+#define X_LOCK_EXTERN extern
|
||||
#endif
|
||||
|
||||
/* in XlibInt.c */
|
||||
-extern void (*_XCreateMutex_fn)(
|
||||
+X_LOCK_EXTERN void (*_XCreateMutex_fn)(
|
||||
LockInfoPtr /* lock */
|
||||
);
|
||||
-extern void (*_XFreeMutex_fn)(
|
||||
+X_LOCK_EXTERN void (*_XFreeMutex_fn)(
|
||||
LockInfoPtr /* lock */
|
||||
);
|
||||
-extern void (*_XLockMutex_fn)(
|
||||
+X_LOCK_EXTERN void (*_XLockMutex_fn)(
|
||||
LockInfoPtr /* lock */
|
||||
#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE)
|
||||
, char * /* file */
|
||||
, int /* line */
|
||||
#endif
|
||||
);
|
||||
-extern void (*_XUnlockMutex_fn)(
|
||||
+X_LOCK_EXTERN void (*_XUnlockMutex_fn)(
|
||||
LockInfoPtr /* lock */
|
||||
#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE)
|
||||
, char * /* file */
|
||||
@@ -413,7 +416,7 @@ extern void (*_XUnlockMutex_fn)(
|
||||
#endif
|
||||
);
|
||||
|
||||
-extern LockInfoPtr _Xglobal_lock;
|
||||
+X_LOCK_EXTERN LockInfoPtr _Xglobal_lock;
|
||||
|
||||
#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE)
|
||||
#define LockDisplay(d) if ((d)->lock_fns) (*(d)->lock_fns->lock_display)((d),__FILE__,__LINE__)
|
12
ports/libx11/io_include.patch
Normal file
12
ports/libx11/io_include.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff --git a/src/XlibInt.c b/src/XlibInt.c
|
||||
index bab39bc00..31b6511cb 100644
|
||||
--- a/src/XlibInt.c
|
||||
+++ b/src/XlibInt.c
|
||||
@@ -45,6 +45,7 @@ from The Open Group.
|
||||
#include <stdio.h>
|
||||
#ifdef WIN32
|
||||
#include <direct.h>
|
||||
+#include <io.h>
|
||||
#endif
|
||||
|
||||
/* Needed for FIONREAD on Solaris */
|
80
ports/libx11/portfile.cmake
Normal file
80
ports/libx11/portfile.cmake
Normal file
@ -0,0 +1,80 @@
|
||||
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_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
set(PATCHES dllimport.patch)
|
||||
endif()
|
||||
|
||||
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
|
||||
HEAD_REF master
|
||||
PATCHES cl.build.patch
|
||||
io_include.patch
|
||||
${PATCHES}
|
||||
vcxserver.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)
|
||||
set(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")
|
||||
endif()
|
||||
if(NOT XLSTPROC)
|
||||
message(FATAL_ERROR "${PORT} requires xlstproc for the host system. Please install libxslt within vcpkg or your system package manager!")
|
||||
endif()
|
||||
get_filename_component(XLSTPROC_DIR "${XLSTPROC}" DIRECTORY)
|
||||
file(TO_NATIVE_PATH "${XLSTPROC_DIR}" XLSTPROC_DIR_NATIVE)
|
||||
vcpkg_add_to_path("${XLSTPROC_DIR}")
|
||||
set(ENV{XLSTPROC} "${XLSTPROC}")
|
||||
|
||||
if(VCPKG_TARGET_IS_OSX)
|
||||
set(ENV{LC_ALL} C)
|
||||
endif()
|
||||
vcpkg_find_acquire_program(PERL)
|
||||
vcpkg_configure_make(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
AUTOCONFIG
|
||||
OPTIONS
|
||||
${OPTIONS}
|
||||
)
|
||||
|
||||
vcpkg_install_make()
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
if(EXISTS "${CURRENT_INSTALLED_DIR}/include/X11/extensions/XKBgeom.h")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/X11/extensions/") #XKBgeom.h should be the only file in there
|
||||
endif()
|
||||
|
||||
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()
|
||||
|
||||
|
||||
configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake"
|
||||
"${CURRENT_PACKAGES_DIR}/share/x11/vcpkg-cmake-wrapper.cmake" @ONLY)
|
12
ports/libx11/vcpkg-cmake-wrapper.cmake
Normal file
12
ports/libx11/vcpkg-cmake-wrapper.cmake
Normal file
@ -0,0 +1,12 @@
|
||||
_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)
|
||||
endif()
|
||||
endif()
|
17
ports/libx11/vcpkg.json
Normal file
17
ports/libx11/vcpkg.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "libx11",
|
||||
"version": "1.7.3.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",
|
||||
"dependencies": [
|
||||
"bzip2",
|
||||
{
|
||||
"name": "libxslt",
|
||||
"host": true
|
||||
},
|
||||
"xcb",
|
||||
"xproto",
|
||||
"xtrans"
|
||||
]
|
||||
}
|
138
ports/libx11/vcxserver.patch
Normal file
138
ports/libx11/vcxserver.patch
Normal file
@ -0,0 +1,138 @@
|
||||
diff --git a/include/X11/Xlib.h b/include/X11/Xlib.h
|
||||
index 5faf83b..c6c63a3 100644
|
||||
--- a/include/X11/Xlib.h
|
||||
+++ b/include/X11/Xlib.h
|
||||
@@ -79,7 +79,7 @@ _Xmblen(
|
||||
|
||||
typedef char *XPointer;
|
||||
|
||||
-#define Bool int
|
||||
-#define Status int
|
||||
+typedef int Bool;
|
||||
+typedef int Status;
|
||||
#define True 1
|
||||
#define False 0
|
||||
diff --git a/src/CrGlCur.c b/src/CrGlCur.c
|
||||
index 460660f..510ff5d 100644
|
||||
--- a/src/CrGlCur.c
|
||||
+++ b/src/CrGlCur.c
|
||||
@@ -51,8 +51,14 @@ in this Software without prior written authorization from The Open Group.
|
||||
#if defined(hpux)
|
||||
typedef shl_t XModuleType;
|
||||
#else
|
||||
+#ifdef _MSC_VER
|
||||
+#include <X11/XWindows.h>
|
||||
+typedef HANDLE XModuleType;
|
||||
+#define dlsym GetProcAddress
|
||||
+#else
|
||||
typedef void *XModuleType;
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
#ifndef LIBXCURSOR
|
||||
#define LIBXCURSOR "libXcursor.so.1"
|
||||
@@ -70,8 +76,12 @@ open_library (void)
|
||||
{
|
||||
#if defined(hpux)
|
||||
module = shl_load(library, BIND_DEFERRED, 0L);
|
||||
+#else
|
||||
+#ifdef _MSC_VER
|
||||
+ module = LoadLibrary(library);
|
||||
#else
|
||||
module = dlopen(library, RTLD_LAZY);
|
||||
+#endif
|
||||
#endif
|
||||
if (module)
|
||||
return module;
|
||||
diff --git a/src/GetDflt.c b/src/GetDflt.c
|
||||
index c9222a2..c6e1b25 100644
|
||||
--- a/src/GetDflt.c
|
||||
+++ b/src/GetDflt.c
|
||||
@@ -137,9 +138,13 @@ InitDefaults(
|
||||
* ~/.Xdefaults. Next, if there is an XENVIRONMENT environment variable,
|
||||
* then load that file.
|
||||
*/
|
||||
-
|
||||
+
|
||||
if (dpy->xdefaults == NULL) {
|
||||
+ #ifdef _MSC_VER
|
||||
+ const char *slashDotXdefaults = ".Xdefaults";
|
||||
+ #else
|
||||
const char *slashDotXdefaults = "/.Xdefaults";
|
||||
+ #endif
|
||||
|
||||
(void) GetHomeDir (fname, (int) (PATH_MAX - strlen (slashDotXdefaults) - 1));
|
||||
(void) strcat (fname, slashDotXdefaults);
|
||||
@@ -149,7 +154,11 @@ InitDefaults(
|
||||
}
|
||||
|
||||
if (!(xenv = getenv ("XENVIRONMENT"))) {
|
||||
+ #ifdef _MSC_VER
|
||||
+ const char *slashDotXdefaultsDash = ".Xdefaults-";
|
||||
+ #else
|
||||
const char *slashDotXdefaultsDash = "/.Xdefaults-";
|
||||
+ #endif
|
||||
int len;
|
||||
|
||||
(void) GetHomeDir (fname, (int) (PATH_MAX - strlen (slashDotXdefaultsDash) - 1));
|
||||
diff --git a/src/SetLocale.c b/src/SetLocale.c
|
||||
index 81f4a7c..cb52f11 100644
|
||||
--- a/src/SetLocale.c
|
||||
+++ b/src/SetLocale.c
|
||||
@@ -63,11 +63,11 @@ from The Open Group.
|
||||
#include <X11/Xlocale.h>
|
||||
#include <X11/Xos.h>
|
||||
#include "XlcPubI.h"
|
||||
|
||||
#define MAXLOCALE 64 /* buffer size of locale name */
|
||||
|
||||
|
||||
-#if defined(__APPLE__) || defined(__CYGWIN__)
|
||||
+#if defined(__APPLE__) || defined(__CYGWIN__) || defined(_MSC_VER)
|
||||
char *
|
||||
_Xsetlocale(
|
||||
int category,
|
||||
diff --git a/src/StrKeysym.c b/src/StrKeysym.c
|
||||
index be77a93..6967bcc 100644
|
||||
--- a/src/StrKeysym.c
|
||||
+++ b/src/StrKeysym.c
|
||||
@@ -39,12 +39,12 @@ in this Software without prior written authorization from The Open Group.
|
||||
|
||||
#ifndef KEYSYMDB
|
||||
#ifndef XKEYSYMDB
|
||||
-#define KEYSYMDB "/usr/lib/X11/XKeysymDB"
|
||||
+#define KEYSYMDB "XKeysymDB"
|
||||
#else
|
||||
#define KEYSYMDB XKEYSYMDB
|
||||
#endif
|
||||
#endif
|
||||
|
||||
static Bool initialized;
|
||||
static XrmDatabase keysymdb;
|
||||
static XrmQuark Qkeysym[2];
|
||||
diff --git a/src/xlibi18n/lcDynamic.c b/src/xlibi18n/lcDynamic.c
|
||||
index 3821bff..a50aa70 100644
|
||||
--- a/src/xlibi18n/lcDynamic.c
|
||||
+++ b/src/xlibi18n/lcDynamic.c
|
||||
@@ -51,7 +51,7 @@ from The Open Group.
|
||||
#include "Xlcint.h"
|
||||
|
||||
#ifndef XLOCALEDIR
|
||||
-#define XLOCALEDIR "/usr/lib/X11/locale"
|
||||
+#define XLOCALEDIR "locale"
|
||||
#endif
|
||||
|
||||
#define LCLIBNAME "xi18n.so"
|
||||
diff --git a/src/xlibi18n/lcFile.c b/src/xlibi18n/lcFile.c
|
||||
index 25cabd5..819ac89 100644
|
||||
--- a/src/xlibi18n/lcFile.c
|
||||
+++ b/src/xlibi18n/lcFile.c
|
||||
@@ -195,7 +192,7 @@ _XlcParsePath(
|
||||
}
|
||||
|
||||
#ifndef XLOCALEDIR
|
||||
-#define XLOCALEDIR "/usr/lib/X11/locale"
|
||||
+#define XLOCALEDIR "locale"
|
||||
#endif
|
||||
|
||||
void
|
31
ports/libxau/portfile.cmake
Normal file
31
ports/libxau/portfile.cmake
Normal file
@ -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/libxau
|
||||
REF d9443b2c57b512cfb250b35707378654d86c7dea # 1.0.9
|
||||
SHA512 d46d2be838b8ea7116ee0e312adafa80f6551762b5f7b5e503bd40e74fc0b43b45255e8135d03f831d5c483b98aac992fcd91a7e22119261e76778571a72ef07
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
set(ENV{ACLOCAL} "aclocal -I \"${CURRENT_INSTALLED_DIR}/share/xorg/aclocal/\"")
|
||||
|
||||
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")
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
endif()
|
12
ports/libxau/vcpkg.json
Normal file
12
ports/libxau/vcpkg.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "libxau",
|
||||
"version": "1.0.9",
|
||||
"description": "Functions for handling Xauthority files and entries.",
|
||||
"homepage": "https://gitlab.freedesktop.org/xorg/lib/libxau",
|
||||
"license": "MIT-open-group",
|
||||
"dependencies": [
|
||||
"bzip2",
|
||||
"xorg-macros",
|
||||
"xproto"
|
||||
]
|
||||
}
|
13
ports/libxdmcp/configure.ac.patch
Normal file
13
ports/libxdmcp/configure.ac.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 7aedf3424..43ab8dbaf 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -56,7 +56,7 @@ AC_PROG_LN_S
|
||||
AC_SEARCH_LIBS([recvfrom],[socket])
|
||||
|
||||
case $host_os in
|
||||
- *mingw*)
|
||||
+ *mingw* | *msys* )
|
||||
AC_CHECK_LIB([ws2_32],[main])
|
||||
;;
|
||||
*)
|
36
ports/libxdmcp/portfile.cmake
Normal file
36
ports/libxdmcp/portfile.cmake
Normal file
@ -0,0 +1,36 @@
|
||||
#SET(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) # this is a lie but the lib has a different name than the dll
|
||||
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/libxdmcp
|
||||
REF 618b3ba5f826d930df2ca6a6a0ce212fa75cef42 # 1.1.3
|
||||
SHA512 f8b035fa95f6948cc6bac69bfcc33498cd65db73c62aadee714bce371d61c50f283c45d1a3f43397a96b3c956b41dfe94355e94e33764760b29bf98ba8dfebe2
|
||||
HEAD_REF master
|
||||
PATCHES configure.ac.patch
|
||||
)
|
||||
|
||||
set(ENV{ACLOCAL} "aclocal -I \"${CURRENT_INSTALLED_DIR}/share/xorg/aclocal/\"")
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
set(OPTIONS --disable-dependency-tracking)
|
||||
string(APPEND VCPKG_C_FLAGS "/showIncludes ")
|
||||
string(APPEND VCPKG_CXX_FLAGS "/showIncludes ")
|
||||
endif()
|
||||
vcpkg_configure_make(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
AUTOCONFIG
|
||||
OPTIONS ${OPTIONS} --enable-unit-tests=no
|
||||
)
|
||||
|
||||
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
ports/libxdmcp/vcpkg.json
Normal file
12
ports/libxdmcp/vcpkg.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "libxdmcp",
|
||||
"version": "1.1.3",
|
||||
"description": "X Display Manager Control Protocol library",
|
||||
"homepage": "https://gitlab.freedesktop.org/xorg/lib/libxdmcp",
|
||||
"license": "MIT-open-group",
|
||||
"dependencies": [
|
||||
"bzip2",
|
||||
"xorg-macros",
|
||||
"xproto"
|
||||
]
|
||||
}
|
51
ports/pthread-stubs/portfile.cmake
Normal file
51
ports/pthread-stubs/portfile.cmake
Normal file
@ -0,0 +1,51 @@
|
||||
set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
|
||||
vcpkg_from_gitlab(
|
||||
GITLAB_URL https://gitlab.freedesktop.org/xorg
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO lib/pthread-stubs
|
||||
REF 50f0755a7f894acae168f19c66e52a3f139ca4ec # 0.4.0
|
||||
SHA512 15fcb2144a8abb7b9b1b8f6d9732759351268fb440c7a59380b0ca6ddf48b74a37ce5afbf777ce58fc1993df0c8d6ffb82e452800ce2fcaf16edcbcc1750e338
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
vcpkg_configure_make(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
AUTOCONFIG
|
||||
)
|
||||
|
||||
vcpkg_install_make()
|
||||
vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES pthread)
|
||||
|
||||
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)
|
||||
|
||||
set(_file "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/pthread-stubs.pc")
|
||||
file(READ "${_file}" _contents)
|
||||
string(REPLACE "Cflags: -pthread" "Cflags: " _contents "${_contents}")
|
||||
if(EXISTS "${CURRENT_INSTALLED_DIR}/lib/pthreadVC3.lib")
|
||||
string(REPLACE "Libs: -pthread" "Libs: -lpthreadVC3" _contents "${_contents}")
|
||||
endif()
|
||||
if(EXISTS "${CURRENT_INSTALLED_DIR}/lib/pthreadGC3.lib")
|
||||
string(REPLACE "Libs: -pthread" "Libs: -lpthreadGC3" _contents "${_contents}")
|
||||
endif()
|
||||
file(WRITE "${_file}" "${_contents}")
|
||||
|
||||
set(_file "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/pthread-stubs.pc")
|
||||
file(READ "${_file}" _contents)
|
||||
string(REPLACE "Cflags: -pthread" "Cflags: " _contents "${_contents}")
|
||||
if(EXISTS "${CURRENT_INSTALLED_DIR}/debug/lib/pthreadVC3.lib")
|
||||
string(REPLACE "Libs: -pthread" "Libs: -lpthreadVC3" _contents "${_contents}")
|
||||
endif()
|
||||
if(EXISTS "${CURRENT_INSTALLED_DIR}/debug/lib/pthreadGC3.lib")
|
||||
string(REPLACE "Libs: -pthread" "Libs: -lpthreadGC3" _contents "${_contents}")
|
||||
endif()
|
||||
if(EXISTS "${CURRENT_INSTALLED_DIR}/debug/lib/pthreadVC3d.lib")
|
||||
string(REPLACE "Libs: -pthread" "Libs: -lpthreadVC3d" _contents "${_contents}")
|
||||
endif()
|
||||
if(EXISTS "${CURRENT_INSTALLED_DIR}/debug/lib/pthreadGC3d.lib")
|
||||
string(REPLACE "Libs: -pthread" "Libs: -lpthreadGC3d" _contents "${_contents}")
|
||||
endif()
|
||||
file(WRITE "${_file}" "${_contents}")
|
10
ports/pthread-stubs/vcpkg.json
Normal file
10
ports/pthread-stubs/vcpkg.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"name": "pthread-stubs",
|
||||
"version": "0.4",
|
||||
"description": "Stub replacements for POSIX Threads functions.",
|
||||
"homepage": "https://gitlab.freedesktop.org/xorg/lib/pthread-stubs",
|
||||
"license": "X11-distribute-modifications-variant",
|
||||
"dependencies": [
|
||||
"pthread"
|
||||
]
|
||||
}
|
49
ports/xcb-proto/portfile.cmake
Normal file
49
ports/xcb-proto/portfile.cmake
Normal file
@ -0,0 +1,49 @@
|
||||
set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
|
||||
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()
|
||||
|
||||
find_program(XMLLINT_PATH NAMES xmllint PATHS "${CURRENT_HOST_INSTALLED_DIR}/tools/libxml2")
|
||||
if(NOT XMLLINT_PATH)
|
||||
message(FATAL_ERROR "${PORT} requires xmllint which was not found!")
|
||||
endif()
|
||||
|
||||
string(REGEX REPLACE "/[^/]+$" "" XMLLINT_DIR "${XMLLINT_PATH}")
|
||||
file(TO_NATIVE_PATH "${XMLLINT_DIR}" XMLLINT_DIR_NATIVE)
|
||||
message(STATUS "Using xmlling at: ${XMLLINT_PATH}")
|
||||
vcpkg_add_to_path("${XMLLINT_DIR_NATIVE}")
|
||||
|
||||
vcpkg_find_acquire_program(PYTHON3)
|
||||
get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY)
|
||||
file(TO_NATIVE_PATH "${PYTHON3_DIR}" PYTHON3_DIR_NATIVE)
|
||||
vcpkg_add_to_path("${PYTHON3_DIR}")
|
||||
set(ENV{PYTHON} "${PYTHON3}")
|
||||
|
||||
vcpkg_from_gitlab(
|
||||
GITLAB_URL https://gitlab.freedesktop.org/xorg
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO proto/xcbproto
|
||||
REF 70ca65fa35c3760661b090bc4b2601daa7a099b8 #v1.14.1 + patches
|
||||
SHA512 9e08e1d2ab1fe7a8d3985568918a858ddfb31b8016ccac8ea2447631e7cede3bcc7b1ed86491d497ab871674c9b55d94fab25ee13ff6de9a44590b91d9166fda
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
set(ENV{ACLOCAL} "aclocal -I \"${CURRENT_INSTALLED_DIR}/share/xorg/aclocal/\"")
|
||||
|
||||
vcpkg_configure_make(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
AUTOCONFIG
|
||||
OPTIONS
|
||||
ac_cv_path_PYTHON='${PYTHON3}'
|
||||
am_cv_python_pyexecdir=\\\${prefix}/tools/python3/site-packages
|
||||
am_cv_python_pythondir=\\\${prefix}/tools/python3/site-packages
|
||||
)
|
||||
|
||||
vcpkg_install_make()
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
|
||||
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
endif()
|
18
ports/xcb-proto/vcpkg.json
Normal file
18
ports/xcb-proto/vcpkg.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "xcb-proto",
|
||||
"version": "1.14.1",
|
||||
"description": "XML-XCB protocol descriptions used by libxcb for the X11 protocol & extensions",
|
||||
"homepage": "https://xcb.freedesktop.org/",
|
||||
"license": null,
|
||||
"dependencies": [
|
||||
"bzip2",
|
||||
{
|
||||
"name": "libxml2",
|
||||
"host": true,
|
||||
"features": [
|
||||
"tools"
|
||||
]
|
||||
},
|
||||
"xorg-macros"
|
||||
]
|
||||
}
|
15
ports/xcb-util-m4/portfile.cmake
Normal file
15
ports/xcb-util-m4/portfile.cmake
Normal file
@ -0,0 +1,15 @@
|
||||
set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
|
||||
|
||||
vcpkg_from_gitlab(
|
||||
GITLAB_URL https://gitlab.freedesktop.org/xorg
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO util/xcb-util-m4
|
||||
REF f662e3a93ebdec3d1c9374382dcc070093a42fed #v1.19.2
|
||||
SHA512 29840da449a434f169437fd2cef78273e0cba00a7f76d48790c838dc8f40fe55cb0932d96b649e1bd066c6c5e257dd2d9d71c663ce100aa5ca25a2ccec1b7e77
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
file(GLOB_RECURSE M4_FILES "${SOURCE_PATH}/*.m4")
|
||||
file(INSTALL ${M4_FILES} DESTINATION "${CURRENT_PACKAGES_DIR}/share/xorg/aclocal")
|
||||
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
file(TOUCH "${CURRENT_PACKAGES_DIR}/share/xcb-util-m4/copyright")
|
7
ports/xcb-util-m4/vcpkg.json
Normal file
7
ports/xcb-util-m4/vcpkg.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"name": "xcb-util-m4",
|
||||
"version-date": "2022-01-24",
|
||||
"description": "GNU autoconf macros shared across XCB projects",
|
||||
"homepage": "https://gitlab.freedesktop.org/xorg/util/xcb-util-m4",
|
||||
"license": null
|
||||
}
|
47
ports/xcb/configure.patch
Normal file
47
ports/xcb/configure.patch
Normal file
@ -0,0 +1,47 @@
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 8a05bf1aa..1f57cc688 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -22,6 +22,7 @@ AC_USE_SYSTEM_EXTENSIONS
|
||||
# Initialize libtool
|
||||
LT_PREREQ([2.2])
|
||||
LT_INIT([win32-dll])
|
||||
+AC_LIBTOOL_WIN32_DLL
|
||||
|
||||
# Require xorg-macros minimum of 1.18 - Initial version
|
||||
m4_ifndef([XORG_MACROS_VERSION],
|
||||
@@ -88,11 +88,11 @@ AC_MSG_RESULT($XCBPROTO_XCBPYTHONDIR)
|
||||
AC_SUBST(XCBPROTO_XCBPYTHONDIR)
|
||||
|
||||
AC_HEADER_STDC
|
||||
-AC_SEARCH_LIBS(getaddrinfo, socket)
|
||||
-AC_SEARCH_LIBS(connect, socket)
|
||||
+AC_SEARCH_LIBS(getaddrinfo, [socket Ws2_32])
|
||||
+AC_SEARCH_LIBS(connect, [socket Ws2_32])
|
||||
|
||||
# Find support for sending a message from a socket
|
||||
-AC_SEARCH_LIBS(sendmsg, socket, [have_sendmsg="yes"], [have_sendmsg="no"])
|
||||
+AC_SEARCH_LIBS(sendmsg, [socket Ws2_32], [have_sendmsg="yes"], [have_sendmsg="no"])
|
||||
|
||||
# XPG4v2/UNIX95 added msg_control - check to see if we need to define
|
||||
# _XOPEN_SOURCE to get it (such as on Solaris)
|
||||
@@ -140,6 +141,10 @@ mingw*)
|
||||
have_win32="yes"
|
||||
lt_enable_auto_import="-Wl,--enable-auto-import"
|
||||
;;
|
||||
+msys*)
|
||||
+ have_win32="yes"
|
||||
+ lt_enable_auto_import="-Wl,--enable-auto-import"
|
||||
+ ;;
|
||||
linux*)
|
||||
AC_DEFINE([HAVE_ABSTRACT_SOCKETS], 1, [Define if your platform supports abstract sockets])
|
||||
;;
|
||||
@@ -208,7 +213,7 @@ esac
|
||||
|
||||
dnl Link with winsock for socket functions on MinGW
|
||||
case $host_os in
|
||||
- *mingw*)
|
||||
+ *mingw*| *msys* )
|
||||
AC_CHECK_LIB([ws2_32],[main])
|
||||
;;
|
||||
*)
|
14
ports/xcb/getpid_include.patch
Normal file
14
ports/xcb/getpid_include.patch
Normal file
@ -0,0 +1,14 @@
|
||||
diff --git a/src/xcb_auth.c b/src/xcb_auth.c
|
||||
index 8ebe9a437..9a1e459fc 100644
|
||||
--- a/src/xcb_auth.c
|
||||
+++ b/src/xcb_auth.c
|
||||
@@ -46,6 +46,9 @@
|
||||
#include <X11/Xwindows.h>
|
||||
#endif
|
||||
#include "xcb_windefs.h"
|
||||
+#ifdef _MSC_VER
|
||||
+#include <process.h>
|
||||
+#endif
|
||||
#else
|
||||
#include <sys/param.h>
|
||||
#include <unistd.h>
|
13
ports/xcb/makefile.patch
Normal file
13
ports/xcb/makefile.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/src/Makefile.am b/src/Makefile.am
|
||||
index 17b64a80e..f45d9d0fe 100644
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -260,7 +260,7 @@ if XCB_SERVERSIDE_SUPPORT
|
||||
C_CLIENT_PY_EXTRA_ARGS += --server-side
|
||||
endif
|
||||
|
||||
-$(EXTSOURCES): c_client.py $(XCBPROTO_XCBINCLUDEDIR)/$(@:.c=.xml)
|
||||
+$(EXTSOURCES): c_client.py /$(@:.c=.xml)
|
||||
$(AM_V_GEN)$(PYTHON) $(srcdir)/c_client.py -c "$(PACKAGE_STRING)" -l "$(XORG_MAN_PAGE)" \
|
||||
-s "$(LIB_MAN_SUFFIX)" -p $(XCBPROTO_XCBPYTHONDIR) \
|
||||
$(C_CLIENT_PY_EXTRA_ARGS) \
|
107
ports/xcb/portfile.cmake
Normal file
107
ports/xcb/portfile.cmake
Normal file
@ -0,0 +1,107 @@
|
||||
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/libxcb
|
||||
REF ddafdba11f6919e6fcf977c09c78b06f94de47aa #v1.14 + some patches
|
||||
SHA512 d8382b04f2b00671cded9e22d6066164511ee4c08e2cf5de4ec28d09e41228e30d3ba7d0e6b5141abf4e4bc777aa662fe9d1d04f3e1e26e0b323549e845c8072
|
||||
HEAD_REF master
|
||||
PATCHES makefile.patch # without the patch target xproto.c is missing target XCBPROTO_XCBINCLUDEDIR
|
||||
configure.patch
|
||||
use_xwindows_includes.patch # use the X11 include wrappers for windows headers
|
||||
getpid_include.patch # add include for getpid on windows
|
||||
)
|
||||
|
||||
set(ENV{ACLOCAL} "aclocal -I \"${CURRENT_INSTALLED_DIR}/share/xorg/aclocal/\"")
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
set(OPTIONS --disable-dependency-tracking)
|
||||
endif()
|
||||
|
||||
vcpkg_find_acquire_program(PYTHON3)
|
||||
get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY)
|
||||
file(TO_NATIVE_PATH "${PYTHON3_DIR}" PYTHON3_DIR_NATIVE)
|
||||
vcpkg_add_to_path("${PYTHON3_DIR}")
|
||||
|
||||
if(NOT XLSTPROC)
|
||||
find_program(XLSTPROC NAMES "xsltproc${VCPKG_HOST_EXECUTABLE_SUFFIX}" PATHS "${CURRENT_HOST_INSTALLED_DIR}/tools/libxslt" PATH_SUFFIXES "bin")
|
||||
endif()
|
||||
if(NOT XLSTPROC)
|
||||
message(FATAL_ERROR "${PORT} requires xlstproc for the host system. Please install libxslt within vcpkg or your system package manager!")
|
||||
endif()
|
||||
get_filename_component(XLSTPROC_DIR "${XLSTPROC}" DIRECTORY)
|
||||
file(TO_NATIVE_PATH "${XLSTPROC_DIR}" XLSTPROC_DIR_NATIVE)
|
||||
vcpkg_add_to_path("${XLSTPROC_DIR}")
|
||||
set(ENV{XLSTPROC} "${XLSTPROC}")
|
||||
|
||||
if(DEFINED ENV{PYTHONPATH})
|
||||
set(ENV{PYTHONPATH} "${CURRENT_INSTALLED_DIR}/tools/python3/site-packages/${VCPKG_HOST_PATH_SEPARATOR}$ENV{PYTHONPATH}")
|
||||
else()
|
||||
set(ENV{PYTHONPATH} "${CURRENT_INSTALLED_DIR}/tools/python3/site-packages/")
|
||||
endif()
|
||||
|
||||
vcpkg_configure_make(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
AUTOCONFIG
|
||||
OPTIONS ${OPTIONS}
|
||||
)
|
||||
|
||||
vcpkg_install_make()
|
||||
|
||||
set(pcfile "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/xcb.pc")
|
||||
if(EXISTS "${pcfile}")
|
||||
vcpkg_replace_string("${pcfile}" "Requires: " "Requires: xau xdmcp ")
|
||||
endif()
|
||||
set(pcfile "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/xcb.pc")
|
||||
if(EXISTS "${pcfile}")
|
||||
vcpkg_replace_string("${pcfile}" "Requires: " "Requires: xau xdmcp ")
|
||||
endif()
|
||||
|
||||
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)
|
||||
|
||||
if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic" AND NOT VCPKG_TARGET_IS_MINGW)
|
||||
set(extensions
|
||||
bigreq
|
||||
composite
|
||||
damage
|
||||
dpms
|
||||
dri2
|
||||
dri3
|
||||
ge
|
||||
glx
|
||||
present
|
||||
randr
|
||||
record
|
||||
render
|
||||
res
|
||||
screensaver
|
||||
shape
|
||||
shm
|
||||
sync
|
||||
xc_misc
|
||||
xevie
|
||||
xf86dri
|
||||
xfixes
|
||||
xinerama
|
||||
xinput
|
||||
xkb
|
||||
xprint
|
||||
xtest
|
||||
xv
|
||||
xvmc)
|
||||
foreach(ext IN LISTS extensions)
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/xcb/${ext}.h"
|
||||
"extern xcb_extension_t"
|
||||
"__declspec(dllimport) extern xcb_extension_t")
|
||||
endforeach()
|
||||
endif()
|
||||
endif()
|
21
ports/xcb/use_xwindows_includes.patch
Normal file
21
ports/xcb/use_xwindows_includes.patch
Normal file
@ -0,0 +1,21 @@
|
||||
diff --git a/src/xcb_windefs.h b/src/xcb_windefs.h
|
||||
index df6026da3..7591c61e7 100644
|
||||
--- a/src/xcb_windefs.h
|
||||
+++ b/src/xcb_windefs.h
|
||||
@@ -31,10 +31,13 @@
|
||||
#define WINVER 0x0501 /* required for getaddrinfo/freeaddrinfo defined only for WinXP and above */
|
||||
#endif
|
||||
|
||||
-#include <winsock2.h>
|
||||
+#include <stdio.h>
|
||||
+#include <X11/Xwindows.h>
|
||||
+#include <X11/Xwinsock.h>
|
||||
+typedef unsigned char BYTE;
|
||||
-#include <ws2tcpip.h>
|
||||
-#include <windef.h>
|
||||
|
||||
+#define STDERR_FILENO _fileno( stderr )
|
||||
+
|
||||
struct iovec {
|
||||
void *iov_base; /* Pointer to data. */
|
||||
int iov_len; /* Length of data. */
|
22
ports/xcb/vcpkg.json
Normal file
22
ports/xcb/vcpkg.json
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
"name": "xcb",
|
||||
"version": "1.14",
|
||||
"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",
|
||||
"dependencies": [
|
||||
"bzip2",
|
||||
"libxau",
|
||||
"libxdmcp",
|
||||
{
|
||||
"name": "libxslt",
|
||||
"host": true
|
||||
},
|
||||
"pthread",
|
||||
"pthread-stubs",
|
||||
"xcb-proto",
|
||||
"xcb-util-m4",
|
||||
"xorg-macros",
|
||||
"xproto"
|
||||
]
|
||||
}
|
67
ports/xorg-macros/portfile.cmake
Normal file
67
ports/xorg-macros/portfile.cmake
Normal file
@ -0,0 +1,67 @@
|
||||
set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
|
||||
|
||||
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 AND NOT VCPKG_TARGET_IS_MINGW)
|
||||
set(PATCHES skip_rawcpp.patch)
|
||||
endif()
|
||||
|
||||
vcpkg_from_gitlab(
|
||||
GITLAB_URL https://gitlab.freedesktop.org/xorg
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO util/macros
|
||||
REF b8766308d2f78bc572abe5198007cf7aeec9b761 #v1.19.3
|
||||
SHA512 dc7383b1579dc6ef0473161764096c8161f23a4c4ba2182e7abd7f73f443eb0520e02f1dfaaba2f8ebb43e0ed93c1e6e5e7cf517561476b858d2471a8ecaf907
|
||||
HEAD_REF master
|
||||
PATCHES ${PATCHES}
|
||||
)
|
||||
|
||||
vcpkg_configure_make(
|
||||
AUTOCONFIG
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
)
|
||||
vcpkg_install_make()
|
||||
|
||||
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/xorg/")
|
||||
if(NOT WIN32)
|
||||
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/xorg/aclocal/")
|
||||
endif()
|
||||
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/share/${PORT}/aclocal/" "${CURRENT_PACKAGES_DIR}/share/xorg/aclocal")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/share/${PORT}/util-macros/" "${CURRENT_PACKAGES_DIR}/share/xorg/util-macros")
|
||||
|
||||
file(READ "${CURRENT_PACKAGES_DIR}/share/${PORT}/pkgconfig/xorg-macros.pc" _contents)
|
||||
string(REPLACE "${CURRENT_PACKAGES_DIR}" "${CURRENT_INSTALLED_DIR}" _contents "${_contents}")
|
||||
string(REPLACE "datarootdir=\${prefix}/share" "datarootdir=\${prefix}/share/xorg" _contents "${_contents}")
|
||||
string(REPLACE "includedir=${CURRENT_INSTALLED_DIR}/include" "includedir=\${prefix}/include" _contents "${_contents}")
|
||||
file(WRITE "${CURRENT_PACKAGES_DIR}/share/pkgconfig/xorg-macros.pc" "${_contents}")
|
||||
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/lib/")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/share/pkgconfig/" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig")
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/share/${PORT}/pkgconfig/xorg-macros.pc")
|
||||
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/share/${PORT}/pkgconfig/xorg-macros.pc")
|
||||
file(READ "${CURRENT_PACKAGES_DIR}/debug/share/${PORT}/pkgconfig/xorg-macros.pc" _contents)
|
||||
string(REPLACE "${CURRENT_PACKAGES_DIR}/debug" "${CURRENT_INSTALLED_DIR}/debug" _contents "${_contents}")
|
||||
string(REPLACE "datarootdir=\${prefix}/share}" "datarootdir=\${prefix}/share/xorg/debug}" _contents "${_contents}")
|
||||
string(REPLACE "includedir=${CURRENT_INSTALLED_DIR}/debug/include" "includedir=\${prefix}/../include" _contents "${_contents}")
|
||||
file(WRITE "${CURRENT_PACKAGES_DIR}/debug/share/pkgconfig/xorg-macros.pc" "${_contents}")
|
||||
if(NOT WIN32)
|
||||
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/xorg/debug/")
|
||||
endif()
|
||||
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/lib")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/share/pkgconfig/" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig")
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/share/${PORT}/pkgconfig/xorg-macros.pc")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/share/" "${CURRENT_PACKAGES_DIR}/share/xorg/debug/")
|
||||
endif()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share/")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share/${PORT}/pkgconfig")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/xorg/debug/${PORT}/pkgconfig" "${CURRENT_PACKAGES_DIR}/share/${PORT}/pkgconfig")
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
endif()
|
43
ports/xorg-macros/skip_rawcpp.patch
Normal file
43
ports/xorg-macros/skip_rawcpp.patch
Normal file
@ -0,0 +1,43 @@
|
||||
diff --git a/xorg-macros.m4.in b/xorg-macros.m4.in
|
||||
index f0a16da3a..e1c0ff1ed 100644
|
||||
--- a/xorg-macros.m4.in
|
||||
+++ b/xorg-macros.m4.in
|
||||
@@ -63,38 +63,6 @@ AC_PATH_TOOL(RAWCPP, [cpp], [${CPP}],
|
||||
# Check for flag to avoid builtin definitions - assumes unix is predefined,
|
||||
# which is not the best choice for supporting other OS'es, but covers most
|
||||
# of the ones we need for now.
|
||||
-AC_MSG_CHECKING([if $RAWCPP requires -undef])
|
||||
-AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])])
|
||||
-if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
|
||||
- AC_MSG_RESULT([no])
|
||||
-else
|
||||
- if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
|
||||
- RAWCPPFLAGS=-undef
|
||||
- AC_MSG_RESULT([yes])
|
||||
- # under Cygwin unix is still defined even with -undef
|
||||
- elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
|
||||
- RAWCPPFLAGS="-undef -ansi"
|
||||
- AC_MSG_RESULT([yes, with -ansi])
|
||||
- else
|
||||
- AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.])
|
||||
- fi
|
||||
-fi
|
||||
-rm -f conftest.$ac_ext
|
||||
-
|
||||
-AC_MSG_CHECKING([if $RAWCPP requires -traditional])
|
||||
-AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])])
|
||||
-if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
|
||||
- AC_MSG_RESULT([no])
|
||||
-else
|
||||
- if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
|
||||
- TRADITIONALCPPFLAGS="-traditional"
|
||||
- RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
|
||||
- AC_MSG_RESULT([yes])
|
||||
- else
|
||||
- AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.])
|
||||
- fi
|
||||
-fi
|
||||
-rm -f conftest.$ac_ext
|
||||
AC_SUBST(RAWCPPFLAGS)
|
||||
AC_SUBST(TRADITIONALCPPFLAGS)
|
||||
]) # XORG_PROG_RAWCPP
|
8
ports/xorg-macros/vcpkg.json
Normal file
8
ports/xorg-macros/vcpkg.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"name": "xorg-macros",
|
||||
"version": "1.19.3",
|
||||
"description": "X.org macros utilities.",
|
||||
"homepage": "https://xcb.freedesktop.org/",
|
||||
"license": null,
|
||||
"supports": "!uwp"
|
||||
}
|
51
ports/xproto/portfile.cmake
Normal file
51
ports/xproto/portfile.cmake
Normal file
@ -0,0 +1,51 @@
|
||||
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 AND NOT VCPKG_TARGET_IS_MINGW)
|
||||
set(PATCHES
|
||||
vcxserver-xw32defs.patch
|
||||
windows-long64.patch
|
||||
windows-io.patch
|
||||
windows_mean_and_lean.patch
|
||||
windows-none.patch
|
||||
windows-include-guards.patch
|
||||
)
|
||||
endif()
|
||||
|
||||
vcpkg_from_gitlab(
|
||||
GITLAB_URL https://gitlab.freedesktop.org/xorg
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO proto/xorgproto
|
||||
REF 57acac1d4c7967f4661fb1c9f86f48f34a46c48d # 2021.5
|
||||
SHA512 5d2b6096e7f6ec6a3414f4370da583f6660fbd287474e8b4cd3e51ccc35514181352d3b0b9cd4b8d6e30de7b54f4ce01a9fbf17be75cf8de18aa28e9f774b8c4
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
upstream-1.patch
|
||||
${PATCHES}
|
||||
)
|
||||
|
||||
vcpkg_configure_meson(SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS "-Dlegacy=true")
|
||||
vcpkg_install_meson()
|
||||
|
||||
# To make CMake consumption easier.
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/share/pkgconfig/")
|
||||
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/lib/")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/share/pkgconfig/" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig")
|
||||
endif()
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/share/pkgconfig/")
|
||||
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/lib/")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/share/pkgconfig/" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig")
|
||||
endif()
|
||||
|
||||
vcpkg_fixup_pkgconfig(SKIP_CHECK) # pc files requiring Xau Xt xt SM ICE X11 xcb Xdmcp are installed before they can be used.
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
|
||||
# Handle copyright
|
||||
file(GLOB_RECURSE _files "${SOURCE_PATH}/COPYING*")
|
||||
file(INSTALL ${_files} DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
vcpkg_install_copyright(FILE_LIST ${_files})
|
||||
file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" "")
|
||||
endif()
|
12
ports/xproto/upstream-1.patch
Normal file
12
ports/xproto/upstream-1.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff --git a/include/X11/XF86keysym.h b/include/X11/XF86keysym.h
|
||||
index c242e42f5fee2e28da11df2d33b005e9bb4b5441..59ba54d1a13fabdded6920ce946c1e20594f49ff 100644
|
||||
--- a/include/X11/XF86keysym.h
|
||||
+++ b/include/X11/XF86keysym.h
|
||||
@@ -394,6 +394,7 @@
|
||||
#define XF86XK_VoiceCommand _EVDEVK(0x246) /* v3.16 KEY_VOICECOMMAND */
|
||||
#define XF86XK_Assistant _EVDEVK(0x247) /* v4.13 KEY_ASSISTANT */
|
||||
/* Use: XK_ISO_Next_Group _EVDEVK(0x248) v5.2 KEY_KBD_LAYOUT_NEXT */
|
||||
+#define XF86XK_EmojiPicker _EVDEVK(0x249) /* v5.13 KEY_EMOJI_PICKER */
|
||||
#define XF86XK_BrightnessMin _EVDEVK(0x250) /* v3.16 KEY_BRIGHTNESS_MIN */
|
||||
#define XF86XK_BrightnessMax _EVDEVK(0x251) /* v3.16 KEY_BRIGHTNESS_MAX */
|
||||
#define XF86XK_KbdInputAssistPrev _EVDEVK(0x260) /* v3.18 KEY_KBDINPUTASSIST_PREV */
|
15
ports/xproto/vcpkg.json
Normal file
15
ports/xproto/vcpkg.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "xproto",
|
||||
"version": "2021.5",
|
||||
"description": "X Window System unified protocol definitions",
|
||||
"homepage": "https://gitlab.freedesktop.org/xorg/proto/xorgproto",
|
||||
"license": null,
|
||||
"dependencies": [
|
||||
"libxslt",
|
||||
{
|
||||
"name": "vcpkg-tool-meson",
|
||||
"host": true
|
||||
},
|
||||
"xorg-macros"
|
||||
]
|
||||
}
|
22
ports/xproto/vcxserver-xw32defs.patch
Normal file
22
ports/xproto/vcxserver-xw32defs.patch
Normal file
@ -0,0 +1,22 @@
|
||||
diff --git a/include/X11/Xw32defs.h b/include/X11/Xw32defs.h
|
||||
index 683b588..db1eabd 100644
|
||||
--- a/include/X11/Xw32defs.h
|
||||
+++ b/include/X11/Xw32defs.h
|
||||
@@ -27,7 +27,6 @@ typedef char *caddr_t;
|
||||
# define execve _execve
|
||||
# define execvp _execvp
|
||||
# define execvpe _execvpe
|
||||
-# define fdopen _fdopen
|
||||
# define fileno _fileno
|
||||
# define fstat _fstat
|
||||
# define getcwd _getcwd
|
||||
@@ -72,8 +71,8 @@ typedef char *caddr_t;
|
||||
# define S_IEXEC _S_IEXEC
|
||||
|
||||
# define F_OK 0
|
||||
-# define X_OK 1
|
||||
# define W_OK 2
|
||||
# define R_OK 4
|
||||
+# define X_OK R_OK
|
||||
# endif /* __GNUC__ */
|
||||
#endif
|
41
ports/xproto/windows-include-guards.patch
Normal file
41
ports/xproto/windows-include-guards.patch
Normal file
@ -0,0 +1,41 @@
|
||||
diff --git a/include/X11/Xwindows.h b/include/X11/Xwindows.h
|
||||
index 900257928..666ee6515 100644
|
||||
--- a/include/X11/Xwindows.h
|
||||
+++ b/include/X11/Xwindows.h
|
||||
@@ -41,6 +41,11 @@ The Open Group.
|
||||
* do as it's no help at all to X11 clients which also need to use the
|
||||
* Win32 API)
|
||||
*/
|
||||
+#pragma once
|
||||
+
|
||||
+#ifndef _X11_XWINDOWS_H_
|
||||
+#define _X11_XWINDOWS_H_
|
||||
+
|
||||
#undef _XFree86Server
|
||||
#ifdef XFree86Server
|
||||
# define _XFree86Server
|
||||
@@ -130,3 +135,4 @@ typedef int Status;
|
||||
# undef _XFree86Server
|
||||
#endif
|
||||
|
||||
+#endif
|
||||
diff --git a/include/X11/Xwinsock.h b/include/X11/Xwinsock.h
|
||||
index 92e0d2a33..1e3e8671b 100644
|
||||
--- a/include/X11/Xwinsock.h
|
||||
+++ b/include/X11/Xwinsock.h
|
||||
@@ -32,6 +32,10 @@ The Open Group.
|
||||
* Conflicts come from the fact that including winsock.h actually pulls
|
||||
* in the whole Windows API...
|
||||
*/
|
||||
+#pragma once
|
||||
+
|
||||
+#ifndef _X11_XWINSOCK_H_
|
||||
+#define _X11_XWINSOCK_H_
|
||||
|
||||
#undef _XFree86Server
|
||||
#ifdef XFree86Server
|
||||
@@ -100,3 +104,4 @@ typedef int Status;
|
||||
# undef _XFree86Server
|
||||
#endif
|
||||
|
||||
+#endif
|
12
ports/xproto/windows-io.patch
Normal file
12
ports/xproto/windows-io.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff --git a/include/X11/Xos.h b/include/X11/Xos.h
|
||||
index 28dfc673a..37d268f27 100644
|
||||
--- a/include/X11/Xos.h
|
||||
+++ b/include/X11/Xos.h
|
||||
@@ -80,6 +80,7 @@ in this Software without prior written authorization from The Open Group.
|
||||
# include <unistd.h>
|
||||
# endif
|
||||
# ifdef WIN32
|
||||
+# include <io.h> // For open()
|
||||
# include <X11/Xw32defs.h>
|
||||
# else
|
||||
# include <sys/file.h>
|
48
ports/xproto/windows-long64.patch
Normal file
48
ports/xproto/windows-long64.patch
Normal file
@ -0,0 +1,48 @@
|
||||
diff --git a/include/X11/Xwinsock.h b/include/X11/Xwinsock.h
|
||||
index 624047d..e8d5653 100644
|
||||
--- a/include/X11/Xwinsock.h
|
||||
+++ b/include/X11/Xwinsock.h
|
||||
@@ -47,6 +47,10 @@ The Open Group.
|
||||
#define _NO_BOOL_TYPEDEF
|
||||
#define BOOL WINBOOL
|
||||
#define INT32 wINT32
|
||||
+#ifdef __x86_64__
|
||||
+#define INT64 wINT64
|
||||
+#define LONG64 wLONG64
|
||||
+#endif
|
||||
#undef Status
|
||||
#define Status wStatus
|
||||
#define ATOM wATOM
|
||||
@@ -58,6 +62,8 @@ The Open Group.
|
||||
#undef BYTE
|
||||
#undef BOOL
|
||||
#undef INT32
|
||||
+#undef INT64
|
||||
+#undef LONG64
|
||||
#undef ATOM
|
||||
#undef FreeResource
|
||||
#undef CreateWindowA
|
||||
diff --git a/include/X11/meson.build b/include/X11/meson.build
|
||||
index 1c33c64..703ab19 100644
|
||||
--- a/include/X11/meson.build
|
||||
+++ b/include/X11/meson.build
|
||||
@@ -1,7 +1,8 @@
|
||||
fd_set_maybe_headers = [ 'sys/param.h',
|
||||
'sys/types.h',
|
||||
'sys/time.h',
|
||||
- 'sys/select.h'
|
||||
+ 'sys/select.h',
|
||||
+ 'winsock2.h'
|
||||
]
|
||||
fd_set_headers = ''
|
||||
foreach h : fd_set_maybe_headers
|
||||
@@ -15,6 +16,8 @@ if cc.has_member('fd_set', 'fds_bits', prefix: fd_set_headers)
|
||||
fds_bits = 'fds_bits'
|
||||
elif cc.has_member('fd_set', '__fds_bits', prefix: fd_set_headers)
|
||||
fds_bits = '__fds_bits'
|
||||
+elif cc.has_member('fd_set', 'fd_count', prefix: fd_set_headers)
|
||||
+ fds_bits = 'fd_count'
|
||||
else
|
||||
error('Your fd_set is too weird.')
|
||||
endif
|
||||
--
|
85
ports/xproto/windows-none.patch
Normal file
85
ports/xproto/windows-none.patch
Normal file
@ -0,0 +1,85 @@
|
||||
diff --git a/include/X11/Xwindows.h b/include/X11/Xwindows.h
|
||||
index 70e1debd5..236ec96a7 100644
|
||||
--- a/include/X11/Xwindows.h
|
||||
+++ b/include/X11/Xwindows.h
|
||||
@@ -69,6 +69,16 @@ The Open Group.
|
||||
#endif
|
||||
#undef Status
|
||||
#define Status wStatus
|
||||
+#ifdef None // FS.h defines None which is used in winnt.h
|
||||
+#pragma push_macro("None")
|
||||
+#define NoneDefined
|
||||
+#undef None
|
||||
+#endif
|
||||
+#ifdef ControlMask // X.h defines ControlMask which is used in processthreadapi.h
|
||||
+#pragma push_macro("ControlMask")
|
||||
+#define ControlMaskDefined
|
||||
+#undef ControlMask
|
||||
+#endif
|
||||
#define ATOM wATOM
|
||||
#define BYTE wBYTE
|
||||
#define FreeResource wFreeResource
|
||||
@@ -76,6 +77,14 @@ The Open Group.
|
||||
#undef NOMINMAX
|
||||
#undef Status
|
||||
-#define Status int
|
||||
+typedef int Status;
|
||||
+#ifdef NoneDefined
|
||||
+#pragma pop_macro("None")
|
||||
+#undef NoneDefined
|
||||
+#endif
|
||||
+#ifdef ControlMaskDefined
|
||||
+#pragma pop_macro("ControlMask")
|
||||
+#undef ControlMaskDefined
|
||||
+#endif
|
||||
#undef BYTE
|
||||
#undef BOOL
|
||||
#undef INT32
|
||||
diff --git a/include/X11/Xwinsock.h b/include/X11/Xwinsock.h
|
||||
index 624047d..e8d5653 100644
|
||||
--- a/include/X11/Xwinsock.h
|
||||
+++ b/include/X11/Xwinsock.h
|
||||
@@ -47,23 +47,42 @@ The Open Group.
|
||||
#define _NO_BOOL_TYPEDEF
|
||||
#define BOOL WINBOOL
|
||||
#define INT32 wINT32
|
||||
#ifdef __x86_64__
|
||||
#define INT64 wINT64
|
||||
#define LONG64 wLONG64
|
||||
#endif
|
||||
#undef Status
|
||||
#define Status wStatus
|
||||
+#ifdef None
|
||||
+#pragma push_macro("None")
|
||||
+#define NoneDefined
|
||||
+#undef None
|
||||
+#endif
|
||||
+#ifdef ControlMask
|
||||
+#pragma push_macro("ControlMask")
|
||||
+#define ControlMaskDefined
|
||||
+#undef ControlMask
|
||||
+#endif
|
||||
#define ATOM wATOM
|
||||
#define BYTE wBYTE
|
||||
#define FreeResource wFreeResource
|
||||
#include <winsock2.h>
|
||||
+#include <ws2tcpip.h>
|
||||
#undef Status
|
||||
-#define Status int
|
||||
+typedef int Status;
|
||||
+#ifdef NoneDefined
|
||||
+#pragma pop_macro("None")
|
||||
+#undef NoneDefined
|
||||
+#endif
|
||||
+#ifdef ControlMaskDefined
|
||||
+#pragma pop_macro("ControlMask")
|
||||
+#undef ControlMaskDefined
|
||||
+#endif
|
||||
#undef BYTE
|
||||
#undef BOOL
|
||||
#undef INT32
|
||||
#undef INT64
|
||||
#undef LONG64
|
||||
#undef ATOM
|
||||
#undef FreeResource
|
||||
#undef CreateWindowA
|
13
ports/xproto/windows_mean_and_lean.patch
Normal file
13
ports/xproto/windows_mean_and_lean.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/include/X11/Xwindows.h b/include/X11/Xwindows.h
|
||||
index 70e1debd5..236ec96a7 100644
|
||||
--- a/include/X11/Xwindows.h
|
||||
+++ b/include/X11/Xwindows.h
|
||||
@@ -54,7 +54,7 @@ The Open Group.
|
||||
*
|
||||
*/
|
||||
#define NOMINMAX
|
||||
-
|
||||
+#define WIN32_LEAN_AND_MEAN // Otherwise this will include winsock.h!
|
||||
/*
|
||||
* mingw-w64 headers define BOOL as a typedef, protecting against macros
|
||||
* mingw.org headers define BOOL in terms of WINBOOL
|
64
ports/xtrans/portfile.cmake
Normal file
64
ports/xtrans/portfile.cmake
Normal file
@ -0,0 +1,64 @@
|
||||
set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
|
||||
|
||||
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/libxtrans
|
||||
REF 3b5df889f58a99980a35a7b4a18eb4e7d2abeac4 #v1.4
|
||||
SHA512 d1a1ecd8aa07d19a8b4936a37109cecd0c965b859a17ea838835230f9326c1a353feef388052df03173562cbf0f3e3764146c3669b1928698cd55ccc4f92992c
|
||||
HEAD_REF master
|
||||
PATCHES win32.patch
|
||||
symbols.patch
|
||||
)
|
||||
|
||||
set(ENV{ACLOCAL} "aclocal -I \"${CURRENT_INSTALLED_DIR}/share/xorg/aclocal/\"")
|
||||
vcpkg_configure_make(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
AUTOCONFIG
|
||||
)
|
||||
|
||||
vcpkg_install_make()
|
||||
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/xorg")
|
||||
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
|
||||
if(NOT WIN32)
|
||||
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/${PORT}/include")
|
||||
endif()
|
||||
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/lib")
|
||||
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/lib")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/include/" "${CURRENT_PACKAGES_DIR}/share/${PORT}/include/")
|
||||
# the include folder is moved since it contains source files. It is not meant as a traditional include folder but as a shared files folder for different x libraries.
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/share/${PORT}/pkgconfig/" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/share/${PORT}/aclocal/" "${CURRENT_PACKAGES_DIR}/share/xorg/aclocal")
|
||||
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/share/${PORT}/pkgconfig")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/share/${PORT}/pkgconfig" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/share/" "${CURRENT_PACKAGES_DIR}/share/xorg/debug")
|
||||
endif()
|
||||
|
||||
vcpkg_fixup_pkgconfig() # must be called after files have been moved
|
||||
|
||||
set(_file "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/xtrans.pc" )
|
||||
file(READ "${_file}" _contents)
|
||||
string(REPLACE "includedir=\${prefix}/include" "includedir=\${prefix}/share/xtrans/include" _contents "${_contents}")
|
||||
file(WRITE "${_file}" "${_contents}")
|
||||
|
||||
set(_file "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/xtrans.pc" )
|
||||
if(EXISTS "${_file}")
|
||||
file(READ "${_file}" _contents)
|
||||
string(REPLACE "includedir=\${prefix}/../include" "includedir=\${prefix}/../share/xtrans/include" _contents "${_contents}")
|
||||
file(WRITE "${_file}" "${_contents}")
|
||||
endif()
|
||||
|
||||
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)
|
||||
file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" "")
|
||||
endif()
|
15
ports/xtrans/symbols.patch
Normal file
15
ports/xtrans/symbols.patch
Normal file
@ -0,0 +1,15 @@
|
||||
diff --git a/Xtransutil.c b/Xtransutil.c
|
||||
index 413a02376..2f8af0efc 100644
|
||||
--- a/Xtransutil.c
|
||||
+++ b/Xtransutil.c
|
||||
@@ -64,6 +64,10 @@ from The Open Group.
|
||||
#ifdef WIN32
|
||||
#include <X11/Xlibint.h>
|
||||
#include <X11/Xwinsock.h>
|
||||
+#ifdef _MSC_VER
|
||||
+# include <direct.h>
|
||||
+# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
|
||||
+#endif
|
||||
#endif
|
||||
|
||||
#ifdef X11_t
|
10
ports/xtrans/vcpkg.json
Normal file
10
ports/xtrans/vcpkg.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"name": "xtrans",
|
||||
"version": "1.4.0",
|
||||
"description": "xtrans - X Network Transport layer shared code",
|
||||
"homepage": "https://gitlab.freedesktop.org/xorg/lib/libxtrans",
|
||||
"license": null,
|
||||
"dependencies": [
|
||||
"xorg-macros"
|
||||
]
|
||||
}
|
58
ports/xtrans/win32.patch
Normal file
58
ports/xtrans/win32.patch
Normal file
@ -0,0 +1,58 @@
|
||||
diff --git a/Xtrans.h b/Xtrans.h
|
||||
index fbf385e01..e52e7cba2 100644
|
||||
--- a/Xtrans.h
|
||||
+++ b/Xtrans.h
|
||||
@@ -50,6 +50,10 @@ from The Open Group.
|
||||
#ifndef _XTRANS_H_
|
||||
#define _XTRANS_H_
|
||||
|
||||
+#if defined(_WIN32) && !defined(WIN32)
|
||||
+# define WIN32 _WIN32
|
||||
+#endif
|
||||
+
|
||||
#include <X11/Xfuncproto.h>
|
||||
#include <X11/Xos.h>
|
||||
#include <X11/Xmd.h>
|
||||
diff --git a/Xtransint.h b/Xtransint.h
|
||||
index 2156bd52f..735b54301 100644
|
||||
--- a/Xtransint.h
|
||||
+++ b/Xtransint.h
|
||||
@@ -72,7 +72,7 @@ from The Open Group.
|
||||
# define XTRANSDEBUG 1
|
||||
#endif
|
||||
|
||||
-#ifdef WIN32
|
||||
+#if defined(WIN32) || defined(_WIN32)
|
||||
# define _WILLWINSOCK_
|
||||
#endif
|
||||
|
||||
diff --git a/Xtranssock.c b/Xtranssock.c
|
||||
index c29390eaa..f2ef365cc 100644
|
||||
--- a/Xtranssock.c
|
||||
+++ b/Xtranssock.c
|
||||
@@ -74,6 +74,10 @@ from the copyright holders.
|
||||
#include <X11/Xthreads.h>
|
||||
#endif
|
||||
|
||||
+#if defined(_WIN32) && !defined(WIN32)
|
||||
+# define WIN32 _WIN32
|
||||
+#endif
|
||||
+
|
||||
#ifndef WIN32
|
||||
|
||||
#if defined(TCPCONN) || defined(UNIXCONN)
|
||||
diff --git a/Xtransutil.c b/Xtransutil.c
|
||||
index f15be243c..cc67315e6 100644
|
||||
--- a/Xtransutil.c
|
||||
+++ b/Xtransutil.c
|
||||
@@ -54,6 +54,10 @@ from The Open Group.
|
||||
* the internal implementation.
|
||||
*/
|
||||
|
||||
+#if defined(_WIN32) && !defined(WIN32)
|
||||
+# define WIN32 _WIN32
|
||||
+#endif
|
||||
+
|
||||
#ifdef XTHREADS
|
||||
#include <X11/Xthreads.h>
|
||||
#endif
|
@ -1194,6 +1194,8 @@ xalan-c:x64-windows-static=fail
|
||||
xalan-c:arm64-windows=fail
|
||||
xerces-c:arm-uwp=fail
|
||||
xerces-c:x64-uwp=fail
|
||||
# Crosscompiling libx11 requires additional steps and patches to the Makefiles.
|
||||
libx11:arm64-windows=fail
|
||||
xmlsec:arm-uwp=fail
|
||||
xmlsec:x64-uwp=fail
|
||||
yara:arm-uwp=fail
|
||||
|
@ -1856,6 +1856,10 @@
|
||||
"baseline": "1.0.0",
|
||||
"port-version": 2
|
||||
},
|
||||
"dbus": {
|
||||
"baseline": "1.13.18",
|
||||
"port-version": 0
|
||||
},
|
||||
"dcmtk": {
|
||||
"baseline": "3.6.7",
|
||||
"port-version": 2
|
||||
@ -4260,10 +4264,22 @@
|
||||
"baseline": "4.3.0",
|
||||
"port-version": 3
|
||||
},
|
||||
"libx11": {
|
||||
"baseline": "1.7.3.1",
|
||||
"port-version": 0
|
||||
},
|
||||
"libxau": {
|
||||
"baseline": "1.0.9",
|
||||
"port-version": 0
|
||||
},
|
||||
"libxdiff": {
|
||||
"baseline": "0.23",
|
||||
"port-version": 2
|
||||
},
|
||||
"libxdmcp": {
|
||||
"baseline": "1.1.3",
|
||||
"port-version": 0
|
||||
},
|
||||
"libxlsxwriter": {
|
||||
"baseline": "1.1.4",
|
||||
"port-version": 0
|
||||
@ -5720,6 +5736,10 @@
|
||||
"baseline": "3.0.0",
|
||||
"port-version": 1
|
||||
},
|
||||
"pthread-stubs": {
|
||||
"baseline": "0.4",
|
||||
"port-version": 0
|
||||
},
|
||||
"pthreadpool": {
|
||||
"baseline": "2020-04-10",
|
||||
"port-version": 2
|
||||
@ -7732,6 +7752,18 @@
|
||||
"baseline": "6.60",
|
||||
"port-version": 0
|
||||
},
|
||||
"xcb": {
|
||||
"baseline": "1.14",
|
||||
"port-version": 0
|
||||
},
|
||||
"xcb-proto": {
|
||||
"baseline": "1.14.1",
|
||||
"port-version": 0
|
||||
},
|
||||
"xcb-util-m4": {
|
||||
"baseline": "2022-01-24",
|
||||
"port-version": 0
|
||||
},
|
||||
"xerces-c": {
|
||||
"baseline": "3.2.3",
|
||||
"port-version": 4
|
||||
@ -7760,6 +7792,10 @@
|
||||
"baseline": "2021-05-17",
|
||||
"port-version": 2
|
||||
},
|
||||
"xorg-macros": {
|
||||
"baseline": "1.19.3",
|
||||
"port-version": 0
|
||||
},
|
||||
"xorstr": {
|
||||
"baseline": "2021-10-23",
|
||||
"port-version": 0
|
||||
@ -7768,6 +7804,10 @@
|
||||
"baseline": "0.8.1",
|
||||
"port-version": 1
|
||||
},
|
||||
"xproto": {
|
||||
"baseline": "2021.5",
|
||||
"port-version": 0
|
||||
},
|
||||
"xqilla": {
|
||||
"baseline": "2.3.4",
|
||||
"port-version": 1
|
||||
@ -7796,6 +7836,10 @@
|
||||
"baseline": "0.7.2",
|
||||
"port-version": 0
|
||||
},
|
||||
"xtrans": {
|
||||
"baseline": "1.4.0",
|
||||
"port-version": 0
|
||||
},
|
||||
"xxhash": {
|
||||
"baseline": "0.8.1",
|
||||
"port-version": 1
|
||||
|
9
versions/d-/dbus.json
Normal file
9
versions/d-/dbus.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "dc3215916b8e610dcf6c0777b5ae7a04ed78873b",
|
||||
"version": "1.13.18",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
9
versions/l-/libx11.json
Normal file
9
versions/l-/libx11.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "1347521fb39c2ccfd11521a3e641854537799ca4",
|
||||
"version": "1.7.3.1",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
9
versions/l-/libxau.json
Normal file
9
versions/l-/libxau.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "d82d4195d09a023e7a7fbc1c3a726a2f9f917a33",
|
||||
"version": "1.0.9",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
9
versions/l-/libxdmcp.json
Normal file
9
versions/l-/libxdmcp.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "eddca1f6d162a3947f167d35c21ca40de9904307",
|
||||
"version": "1.1.3",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
9
versions/p-/pthread-stubs.json
Normal file
9
versions/p-/pthread-stubs.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "4d74216d737ed231dafb8c53f2617ce7836d96fa",
|
||||
"version": "0.4",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
9
versions/x-/xcb-proto.json
Normal file
9
versions/x-/xcb-proto.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "e5933d2463549d6d3b00a8aa1f0279f2a974ec1c",
|
||||
"version": "1.14.1",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
9
versions/x-/xcb-util-m4.json
Normal file
9
versions/x-/xcb-util-m4.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "3d9a0f48392c4845b152c9dfdfa702f9f0a932d9",
|
||||
"version-date": "2022-01-24",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
9
versions/x-/xcb.json
Normal file
9
versions/x-/xcb.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "7af3e0f5bc8377ca950f83d3a0bdbb8cc40026aa",
|
||||
"version": "1.14",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
9
versions/x-/xorg-macros.json
Normal file
9
versions/x-/xorg-macros.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "76db60fb182a4c33faabfb411e1842428ae4c8ad",
|
||||
"version": "1.19.3",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
9
versions/x-/xproto.json
Normal file
9
versions/x-/xproto.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "707be677dc8929167ad434402cd6ae8678e2bffc",
|
||||
"version": "2021.5",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
9
versions/x-/xtrans.json
Normal file
9
versions/x-/xtrans.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "ef94e0330a53876e074a09a3cd9c311c4ca0aa28",
|
||||
"version": "1.4.0",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user