From 464cdd29053f94eb40e5305eecede9cf184e23ed Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Wed, 19 Jan 2022 23:41:57 +0100 Subject: [PATCH 01/37] first batch of xwindow PR ports - up to dbus --- ports/dbus/cmake.dep.patch | 15 +++ ports/dbus/pkgconfig.patch | 17 +++ ports/dbus/portfile.cmake | 62 +++++++++ ports/dbus/rt_pc_link.patch | 27 ++++ ports/dbus/vcpkg.json | 19 +++ ports/pthread-stubs/portfile.cmake | 52 ++++++++ ports/pthread-stubs/vcpkg.json | 9 ++ ports/x11/portfile.cmake | 3 + ports/x11/vcpkg-cmake-wrapper.cmake | 12 ++ ports/x11/vcpkg.json | 9 ++ ports/xau/portfile.cmake | 36 ++++++ ports/xau/vcpkg.json | 11 ++ ports/xcb-proto/portfile.cmake | 51 ++++++++ ports/xcb-proto/vcpkg.json | 17 +++ ports/xcb-util-m4/portfile.cmake | 15 +++ ports/xcb-util-m4/vcpkg.json | 6 + ports/xcb/configure.patch | 47 +++++++ ports/xcb/getpid_include.patch | 14 +++ ports/xcb/makefile.patch | 13 ++ ports/xcb/portfile.cmake | 107 ++++++++++++++++ ports/xcb/use_xwindows_includes.patch | 21 ++++ ports/xcb/vcpkg.json | 21 ++++ ports/xdmcp/configure.ac.patch | 13 ++ ports/xdmcp/portfile.cmake | 36 ++++++ ports/xdmcp/vcpkg.json | 11 ++ ports/xlib/cl.build.patch | 147 ++++++++++++++++++++++ ports/xlib/dllimport.patch | 44 +++++++ ports/xlib/io_include.patch | 12 ++ ports/xlib/portfile.cmake | 76 +++++++++++ ports/xlib/vcpkg.json | 16 +++ ports/xlib/vcxserver.patch | 138 ++++++++++++++++++++ ports/xorg-macros/portfile.cmake | 67 ++++++++++ ports/xorg-macros/skip_rawcpp.patch | 75 +++++++++++ ports/xorg-macros/vcpkg.json | 7 ++ ports/xproto/portfile.cmake | 51 ++++++++ ports/xproto/upstream-1.patch | 12 ++ ports/xproto/vcpkg.json | 11 ++ ports/xproto/vcxserver-xw32defs.patch | 22 ++++ ports/xproto/windows-include-guards.patch | 41 ++++++ ports/xproto/windows-io.patch | 12 ++ ports/xproto/windows-long64.patch | 48 +++++++ ports/xproto/windows-none.patch | 85 +++++++++++++ ports/xproto/windows_mean_and_lean.patch | 13 ++ ports/xtrans/portfile.cmake | 63 ++++++++++ ports/xtrans/symbols.patch | 15 +++ ports/xtrans/vcpkg.json | 9 ++ ports/xtrans/win32.patch | 58 +++++++++ 47 files changed, 1666 insertions(+) create mode 100644 ports/dbus/cmake.dep.patch create mode 100644 ports/dbus/pkgconfig.patch create mode 100644 ports/dbus/portfile.cmake create mode 100644 ports/dbus/rt_pc_link.patch create mode 100644 ports/dbus/vcpkg.json create mode 100644 ports/pthread-stubs/portfile.cmake create mode 100644 ports/pthread-stubs/vcpkg.json create mode 100644 ports/x11/portfile.cmake create mode 100644 ports/x11/vcpkg-cmake-wrapper.cmake create mode 100644 ports/x11/vcpkg.json create mode 100644 ports/xau/portfile.cmake create mode 100644 ports/xau/vcpkg.json create mode 100644 ports/xcb-proto/portfile.cmake create mode 100644 ports/xcb-proto/vcpkg.json create mode 100644 ports/xcb-util-m4/portfile.cmake create mode 100644 ports/xcb-util-m4/vcpkg.json create mode 100644 ports/xcb/configure.patch create mode 100644 ports/xcb/getpid_include.patch create mode 100644 ports/xcb/makefile.patch create mode 100644 ports/xcb/portfile.cmake create mode 100644 ports/xcb/use_xwindows_includes.patch create mode 100644 ports/xcb/vcpkg.json create mode 100644 ports/xdmcp/configure.ac.patch create mode 100644 ports/xdmcp/portfile.cmake create mode 100644 ports/xdmcp/vcpkg.json create mode 100644 ports/xlib/cl.build.patch create mode 100644 ports/xlib/dllimport.patch create mode 100644 ports/xlib/io_include.patch create mode 100644 ports/xlib/portfile.cmake create mode 100644 ports/xlib/vcpkg.json create mode 100644 ports/xlib/vcxserver.patch create mode 100644 ports/xorg-macros/portfile.cmake create mode 100644 ports/xorg-macros/skip_rawcpp.patch create mode 100644 ports/xorg-macros/vcpkg.json create mode 100644 ports/xproto/portfile.cmake create mode 100644 ports/xproto/upstream-1.patch create mode 100644 ports/xproto/vcpkg.json create mode 100644 ports/xproto/vcxserver-xw32defs.patch create mode 100644 ports/xproto/windows-include-guards.patch create mode 100644 ports/xproto/windows-io.patch create mode 100644 ports/xproto/windows-long64.patch create mode 100644 ports/xproto/windows-none.patch create mode 100644 ports/xproto/windows_mean_and_lean.patch create mode 100644 ports/xtrans/portfile.cmake create mode 100644 ports/xtrans/symbols.patch create mode 100644 ports/xtrans/vcpkg.json create mode 100644 ports/xtrans/win32.patch diff --git a/ports/dbus/cmake.dep.patch b/ports/dbus/cmake.dep.patch new file mode 100644 index 00000000000000..3099397144179a --- /dev/null +++ b/ports/dbus/cmake.dep.patch @@ -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} xcb ${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}) + diff --git a/ports/dbus/pkgconfig.patch b/ports/dbus/pkgconfig.patch new file mode 100644 index 00000000000000..be83adb779e26e --- /dev/null +++ b/ports/dbus/pkgconfig.patch @@ -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}") diff --git a/ports/dbus/portfile.cmake b/ports/dbus/portfile.cmake new file mode 100644 index 00000000000000..0f2f6d8de26c75 --- /dev/null +++ b/ports/dbus/portfile.cmake @@ -0,0 +1,62 @@ +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 # branch name + PATCHES + cmake.dep.patch #patch name + rt_pc_link.patch + pkgconfig.patch +) + +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(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(NOT VCPKG_TARGET_IS_WINDOWS) + list(APPEND TOOLS cleanup-sockets uuidgen) +else() + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/bin/dbus-env.bat" "${CURRENT_PACKAGES_DIR}" "%~dp0/..") +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() diff --git a/ports/dbus/rt_pc_link.patch b/ports/dbus/rt_pc_link.patch new file mode 100644 index 00000000000000..ad2bcd0b4b1650 --- /dev/null +++ b/ports/dbus/rt_pc_link.patch @@ -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) diff --git a/ports/dbus/vcpkg.json b/ports/dbus/vcpkg.json new file mode 100644 index 00000000000000..d8c49e3f1b2596 --- /dev/null +++ b/ports/dbus/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "dbus", + "version-semver": "1.13.18", + "description": "D-Bus specification and reference implementation, including libdbus and dbus-daemon", + "homepage": "https://gitlab.freedesktop.org/dbus/dbus", + "dependencies": [ + "expat", + "glib", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "x11" + ] +} diff --git a/ports/pthread-stubs/portfile.cmake b/ports/pthread-stubs/portfile.cmake new file mode 100644 index 00000000000000..cb3e17913eec33 --- /dev/null +++ b/ports/pthread-stubs/portfile.cmake @@ -0,0 +1,52 @@ +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 # branch name +) + + +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}") diff --git a/ports/pthread-stubs/vcpkg.json b/ports/pthread-stubs/vcpkg.json new file mode 100644 index 00000000000000..614779cdd576da --- /dev/null +++ b/ports/pthread-stubs/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "pthread-stubs", + "version": "0.4", + "description": "Stub replacements for POSIX Threads functions.", + "homepage": "https://gitlab.freedesktop.org/xorg/lib/pthread-stubs", + "dependencies": [ + "pthread" + ] +} diff --git a/ports/x11/portfile.cmake b/ports/x11/portfile.cmake new file mode 100644 index 00000000000000..8bbaf0bbe4514f --- /dev/null +++ b/ports/x11/portfile.cmake @@ -0,0 +1,3 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) +configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" + "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY) \ No newline at end of file diff --git a/ports/x11/vcpkg-cmake-wrapper.cmake b/ports/x11/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000000..9d0d3e2270f9f3 --- /dev/null +++ b/ports/x11/vcpkg-cmake-wrapper.cmake @@ -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() diff --git a/ports/x11/vcpkg.json b/ports/x11/vcpkg.json new file mode 100644 index 00000000000000..2291b39e295fd7 --- /dev/null +++ b/ports/x11/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "x11", + "version-semver": "1.6.9", + "description": "The X Window System is a network-transparent window system that was designed at MIT.", + "homepage": "https://www.x.org/wiki/", + "dependencies": [ + "xlib" + ] +} diff --git a/ports/xau/portfile.cmake b/ports/xau/portfile.cmake new file mode 100644 index 00000000000000..d4741609c649f0 --- /dev/null +++ b/ports/xau/portfile.cmake @@ -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") + 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 # branch name +) + +set(ENV{ACLOCAL} "aclocal -I \"${CURRENT_INSTALLED_DIR}/share/xorg/aclocal/\"") + +if(WIN32) + SET(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) # dumpbin will fail on GCC + set(OPTIONS --disable-dependency-tracking) +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") + +# # Handle copyright +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +endif() \ No newline at end of file diff --git a/ports/xau/vcpkg.json b/ports/xau/vcpkg.json new file mode 100644 index 00000000000000..0a37836cc69c4a --- /dev/null +++ b/ports/xau/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "xau", + "version-semver": "1.0.9", + "description": "Functions for handling Xauthority files and entries.", + "homepage": "https://gitlab.freedesktop.org/xorg/lib/libxau", + "dependencies": [ + "bzip2", + "xorg-macros", + "xproto" + ] +} diff --git a/ports/xcb-proto/portfile.cmake b/ports/xcb-proto/portfile.cmake new file mode 100644 index 00000000000000..2fde2cf8fcb052 --- /dev/null +++ b/ports/xcb-proto/portfile.cmake @@ -0,0 +1,51 @@ +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") + 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}") +#(also requires python2?) + +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 # branch name +) + +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") + +# Handle copyright +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +endif() diff --git a/ports/xcb-proto/vcpkg.json b/ports/xcb-proto/vcpkg.json new file mode 100644 index 00000000000000..620526d766933b --- /dev/null +++ b/ports/xcb-proto/vcpkg.json @@ -0,0 +1,17 @@ +{ + "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/", + "dependencies": [ + "bzip2", + { + "name": "libxml2", + "host": true, + "features": [ + "tools" + ] + }, + "xorg-macros" + ] +} diff --git a/ports/xcb-util-m4/portfile.cmake b/ports/xcb-util-m4/portfile.cmake new file mode 100644 index 00000000000000..2826a79fb1d276 --- /dev/null +++ b/ports/xcb-util-m4/portfile.cmake @@ -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 # branch name +) + +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") diff --git a/ports/xcb-util-m4/vcpkg.json b/ports/xcb-util-m4/vcpkg.json new file mode 100644 index 00000000000000..82df949ca33827 --- /dev/null +++ b/ports/xcb-util-m4/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "xcb-util-m4", + "version-string": "1", + "description": "GNU autoconf macros shared across XCB projects", + "homepage": "https://gitlab.freedesktop.org/xorg/util/xcb-util-m4" +} diff --git a/ports/xcb/configure.patch b/ports/xcb/configure.patch new file mode 100644 index 00000000000000..94c33225b1d0be --- /dev/null +++ b/ports/xcb/configure.patch @@ -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]) + ;; + *) diff --git a/ports/xcb/getpid_include.patch b/ports/xcb/getpid_include.patch new file mode 100644 index 00000000000000..755cd3e3f4e84b --- /dev/null +++ b/ports/xcb/getpid_include.patch @@ -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 + #endif + #include "xcb_windefs.h" ++#ifdef _MSC_VER ++#include ++#endif + #else + #include + #include diff --git a/ports/xcb/makefile.patch b/ports/xcb/makefile.patch new file mode 100644 index 00000000000000..9171fcf03705db --- /dev/null +++ b/ports/xcb/makefile.patch @@ -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) \ diff --git a/ports/xcb/portfile.cmake b/ports/xcb/portfile.cmake new file mode 100644 index 00000000000000..b202f63fccbb1a --- /dev/null +++ b/ports/xcb/portfile.cmake @@ -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") + 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 49e1bf6654814d1513ad8b9142f81fefd43bc939411bf7b2ce9f9fde0961658bec5d1578ca8fd099974898a99a54ff7c6220e58c0d422375d035cd17edbdb072 # bd600b9e321f39758bf32582933b4167d335af74acd7312ecc1072bc8df3f511b4f7a85ead3075b73449a3167764cd0fc77f799a86dfe42012f94a4d20a20bd7 + HEAD_REF master # branch name + 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() diff --git a/ports/xcb/use_xwindows_includes.patch b/ports/xcb/use_xwindows_includes.patch new file mode 100644 index 00000000000000..23177fc77ed852 --- /dev/null +++ b/ports/xcb/use_xwindows_includes.patch @@ -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 ++#include ++#include ++#include ++typedef unsigned char BYTE; +-#include +-#include + ++#define STDERR_FILENO _fileno( stderr ) ++ + struct iovec { + void *iov_base; /* Pointer to data. */ + int iov_len; /* Length of data. */ diff --git a/ports/xcb/vcpkg.json b/ports/xcb/vcpkg.json new file mode 100644 index 00000000000000..944d8d64b3b9ef --- /dev/null +++ b/ports/xcb/vcpkg.json @@ -0,0 +1,21 @@ +{ + "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/", + "dependencies": [ + "bzip2", + { + "name": "libxslt", + "host": true + }, + "pthread", + "pthread-stubs", + "xau", + "xcb-proto", + "xcb-util-m4", + "xdmcp", + "xorg-macros", + "xproto" + ] +} diff --git a/ports/xdmcp/configure.ac.patch b/ports/xdmcp/configure.ac.patch new file mode 100644 index 00000000000000..8a8f474c8ca992 --- /dev/null +++ b/ports/xdmcp/configure.ac.patch @@ -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]) + ;; + *) diff --git a/ports/xdmcp/portfile.cmake b/ports/xdmcp/portfile.cmake new file mode 100644 index 00000000000000..265e94f81aa9d8 --- /dev/null +++ b/ports/xdmcp/portfile.cmake @@ -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") + 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 # branch name + PATCHES configure.ac.patch #patch name +) + +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() diff --git a/ports/xdmcp/vcpkg.json b/ports/xdmcp/vcpkg.json new file mode 100644 index 00000000000000..57339e513e2d80 --- /dev/null +++ b/ports/xdmcp/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "xdmcp", + "version": "1.1.3", + "description": "X Display Manager Control Protocol library", + "homepage": "https://gitlab.freedesktop.org/xorg/lib/libxdmcp", + "dependencies": [ + "bzip2", + "xorg-macros", + "xproto" + ] +} diff --git a/ports/xlib/cl.build.patch b/ports/xlib/cl.build.patch new file mode 100644 index 00000000000000..2845f1d3192268 --- /dev/null +++ b/ports/xlib/cl.build.patch @@ -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 ++#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 + #include + ++#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 + ++#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 ++#ifdef HAVE_UNISTD_H + #include ++#endif + + /************************************************************************/ + diff --git a/ports/xlib/dllimport.patch b/ports/xlib/dllimport.patch new file mode 100644 index 00000000000000..a06adc0d59f4d2 --- /dev/null +++ b/ports/xlib/dllimport.patch @@ -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__) diff --git a/ports/xlib/io_include.patch b/ports/xlib/io_include.patch new file mode 100644 index 00000000000000..184b8d556a4eca --- /dev/null +++ b/ports/xlib/io_include.patch @@ -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 + #ifdef WIN32 + #include ++#include + #endif + + /* Needed for FIONREAD on Solaris */ diff --git a/ports/xlib/portfile.cmake b/ports/xlib/portfile.cmake new file mode 100644 index 00000000000000..31771614bd1ee7 --- /dev/null +++ b/ports/xlib/portfile.cmake @@ -0,0 +1,76 @@ +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") + 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 # branch name + PATCHES cl.build.patch #patch name + 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() diff --git a/ports/xlib/vcpkg.json b/ports/xlib/vcpkg.json new file mode 100644 index 00000000000000..9598592ac24060 --- /dev/null +++ b/ports/xlib/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "xlib", + "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/", + "dependencies": [ + "bzip2", + { + "name": "libxslt", + "host": true + }, + "xcb", + "xproto", + "xtrans" + ] +} diff --git a/ports/xlib/vcxserver.patch b/ports/xlib/vcxserver.patch new file mode 100644 index 00000000000000..10a6312f927c66 --- /dev/null +++ b/ports/xlib/vcxserver.patch @@ -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 ++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 + #include + #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 diff --git a/ports/xorg-macros/portfile.cmake b/ports/xorg-macros/portfile.cmake new file mode 100644 index 00000000000000..401a1fcae3c13a --- /dev/null +++ b/ports/xorg-macros/portfile.cmake @@ -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") + 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 # branch name + 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() diff --git a/ports/xorg-macros/skip_rawcpp.patch b/ports/xorg-macros/skip_rawcpp.patch new file mode 100644 index 00000000000000..76f76493bb603e --- /dev/null +++ b/ports/xorg-macros/skip_rawcpp.patch @@ -0,0 +1,75 @@ +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,38 @@ 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_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 diff --git a/ports/xorg-macros/vcpkg.json b/ports/xorg-macros/vcpkg.json new file mode 100644 index 00000000000000..4c1c5b11c8fc2d --- /dev/null +++ b/ports/xorg-macros/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "xorg-macros", + "version-semver": "1.19.3", + "description": "X.org macros utilities.", + "homepage": "https://xcb.freedesktop.org/", + "supports": "!uwp" +} diff --git a/ports/xproto/portfile.cmake b/ports/xproto/portfile.cmake new file mode 100644 index 00000000000000..43105b60bc20a6 --- /dev/null +++ b/ports/xproto/portfile.cmake @@ -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") + 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 # branch name + 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}") +file(TOUCH "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright") + +endif() diff --git a/ports/xproto/upstream-1.patch b/ports/xproto/upstream-1.patch new file mode 100644 index 00000000000000..55f283f6382024 --- /dev/null +++ b/ports/xproto/upstream-1.patch @@ -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 */ diff --git a/ports/xproto/vcpkg.json b/ports/xproto/vcpkg.json new file mode 100644 index 00000000000000..ff64ae9eed67e9 --- /dev/null +++ b/ports/xproto/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "xproto", + "version-string": "2021.5", + "description": "X Window System unified protocol definitions", + "homepage": "https://gitlab.freedesktop.org/xorg/proto/xorgproto", + "dependencies": [ + "libxslt", + "tool-meson", + "xorg-macros" + ] +} diff --git a/ports/xproto/vcxserver-xw32defs.patch b/ports/xproto/vcxserver-xw32defs.patch new file mode 100644 index 00000000000000..03b84a4cf5a910 --- /dev/null +++ b/ports/xproto/vcxserver-xw32defs.patch @@ -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 diff --git a/ports/xproto/windows-include-guards.patch b/ports/xproto/windows-include-guards.patch new file mode 100644 index 00000000000000..7e252aacdff4b6 --- /dev/null +++ b/ports/xproto/windows-include-guards.patch @@ -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 diff --git a/ports/xproto/windows-io.patch b/ports/xproto/windows-io.patch new file mode 100644 index 00000000000000..159d1217d73e18 --- /dev/null +++ b/ports/xproto/windows-io.patch @@ -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 + # endif + # ifdef WIN32 ++# include // For open() + # include + # else + # include diff --git a/ports/xproto/windows-long64.patch b/ports/xproto/windows-long64.patch new file mode 100644 index 00000000000000..5d8b74396bddfa --- /dev/null +++ b/ports/xproto/windows-long64.patch @@ -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 +-- \ No newline at end of file diff --git a/ports/xproto/windows-none.patch b/ports/xproto/windows-none.patch new file mode 100644 index 00000000000000..87764c88b42b51 --- /dev/null +++ b/ports/xproto/windows-none.patch @@ -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 ++#include + #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 diff --git a/ports/xproto/windows_mean_and_lean.patch b/ports/xproto/windows_mean_and_lean.patch new file mode 100644 index 00000000000000..f50e4c8806f941 --- /dev/null +++ b/ports/xproto/windows_mean_and_lean.patch @@ -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 diff --git a/ports/xtrans/portfile.cmake b/ports/xtrans/portfile.cmake new file mode 100644 index 00000000000000..224503a3b6c06c --- /dev/null +++ b/ports/xtrans/portfile.cmake @@ -0,0 +1,63 @@ +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") + 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 # branch name + 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) +endif() diff --git a/ports/xtrans/symbols.patch b/ports/xtrans/symbols.patch new file mode 100644 index 00000000000000..2110d31b120b74 --- /dev/null +++ b/ports/xtrans/symbols.patch @@ -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 + #include ++#ifdef _MSC_VER ++# include ++# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) ++#endif + #endif + + #ifdef X11_t diff --git a/ports/xtrans/vcpkg.json b/ports/xtrans/vcpkg.json new file mode 100644 index 00000000000000..b3a25d304c4182 --- /dev/null +++ b/ports/xtrans/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "xtrans", + "version": "1.4.0", + "description": "xtrans - X Network Transport layer shared code", + "homepage": "https://gitlab.freedesktop.org/xorg/lib/libxtrans", + "dependencies": [ + "xorg-macros" + ] +} diff --git a/ports/xtrans/win32.patch b/ports/xtrans/win32.patch new file mode 100644 index 00000000000000..dee4c79d7329da --- /dev/null +++ b/ports/xtrans/win32.patch @@ -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 + #include + #include +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 + #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 + #endif From 7e9e1c6ab26952de91e46f5b24d41e5417cea23f Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Wed, 19 Jan 2022 23:41:57 +0100 Subject: [PATCH 02/37] first batch of xwindow PR ports - up to dbus --- ports/dbus/cmake.dep.patch | 15 +++ ports/dbus/pkgconfig.patch | 17 +++ ports/dbus/portfile.cmake | 62 +++++++++ ports/dbus/rt_pc_link.patch | 27 ++++ ports/dbus/vcpkg.json | 19 +++ ports/pthread-stubs/portfile.cmake | 52 ++++++++ ports/pthread-stubs/vcpkg.json | 9 ++ ports/x11/portfile.cmake | 3 + ports/x11/vcpkg-cmake-wrapper.cmake | 12 ++ ports/x11/vcpkg.json | 9 ++ ports/xau/portfile.cmake | 36 ++++++ ports/xau/vcpkg.json | 11 ++ ports/xcb-proto/portfile.cmake | 51 ++++++++ ports/xcb-proto/vcpkg.json | 17 +++ ports/xcb-util-m4/portfile.cmake | 15 +++ ports/xcb-util-m4/vcpkg.json | 6 + ports/xcb/configure.patch | 47 +++++++ ports/xcb/getpid_include.patch | 14 +++ ports/xcb/makefile.patch | 13 ++ ports/xcb/portfile.cmake | 107 ++++++++++++++++ ports/xcb/use_xwindows_includes.patch | 21 ++++ ports/xcb/vcpkg.json | 21 ++++ ports/xdmcp/configure.ac.patch | 13 ++ ports/xdmcp/portfile.cmake | 36 ++++++ ports/xdmcp/vcpkg.json | 11 ++ ports/xlib/cl.build.patch | 147 ++++++++++++++++++++++ ports/xlib/dllimport.patch | 44 +++++++ ports/xlib/io_include.patch | 12 ++ ports/xlib/portfile.cmake | 76 +++++++++++ ports/xlib/vcpkg.json | 16 +++ ports/xlib/vcxserver.patch | 138 ++++++++++++++++++++ ports/xorg-macros/portfile.cmake | 67 ++++++++++ ports/xorg-macros/skip_rawcpp.patch | 75 +++++++++++ ports/xorg-macros/vcpkg.json | 7 ++ ports/xproto/portfile.cmake | 51 ++++++++ ports/xproto/upstream-1.patch | 12 ++ ports/xproto/vcpkg.json | 11 ++ ports/xproto/vcxserver-xw32defs.patch | 22 ++++ ports/xproto/windows-include-guards.patch | 41 ++++++ ports/xproto/windows-io.patch | 12 ++ ports/xproto/windows-long64.patch | 48 +++++++ ports/xproto/windows-none.patch | 85 +++++++++++++ ports/xproto/windows_mean_and_lean.patch | 13 ++ ports/xtrans/portfile.cmake | 63 ++++++++++ ports/xtrans/symbols.patch | 15 +++ ports/xtrans/vcpkg.json | 9 ++ ports/xtrans/win32.patch | 58 +++++++++ 47 files changed, 1666 insertions(+) create mode 100644 ports/dbus/cmake.dep.patch create mode 100644 ports/dbus/pkgconfig.patch create mode 100644 ports/dbus/portfile.cmake create mode 100644 ports/dbus/rt_pc_link.patch create mode 100644 ports/dbus/vcpkg.json create mode 100644 ports/pthread-stubs/portfile.cmake create mode 100644 ports/pthread-stubs/vcpkg.json create mode 100644 ports/x11/portfile.cmake create mode 100644 ports/x11/vcpkg-cmake-wrapper.cmake create mode 100644 ports/x11/vcpkg.json create mode 100644 ports/xau/portfile.cmake create mode 100644 ports/xau/vcpkg.json create mode 100644 ports/xcb-proto/portfile.cmake create mode 100644 ports/xcb-proto/vcpkg.json create mode 100644 ports/xcb-util-m4/portfile.cmake create mode 100644 ports/xcb-util-m4/vcpkg.json create mode 100644 ports/xcb/configure.patch create mode 100644 ports/xcb/getpid_include.patch create mode 100644 ports/xcb/makefile.patch create mode 100644 ports/xcb/portfile.cmake create mode 100644 ports/xcb/use_xwindows_includes.patch create mode 100644 ports/xcb/vcpkg.json create mode 100644 ports/xdmcp/configure.ac.patch create mode 100644 ports/xdmcp/portfile.cmake create mode 100644 ports/xdmcp/vcpkg.json create mode 100644 ports/xlib/cl.build.patch create mode 100644 ports/xlib/dllimport.patch create mode 100644 ports/xlib/io_include.patch create mode 100644 ports/xlib/portfile.cmake create mode 100644 ports/xlib/vcpkg.json create mode 100644 ports/xlib/vcxserver.patch create mode 100644 ports/xorg-macros/portfile.cmake create mode 100644 ports/xorg-macros/skip_rawcpp.patch create mode 100644 ports/xorg-macros/vcpkg.json create mode 100644 ports/xproto/portfile.cmake create mode 100644 ports/xproto/upstream-1.patch create mode 100644 ports/xproto/vcpkg.json create mode 100644 ports/xproto/vcxserver-xw32defs.patch create mode 100644 ports/xproto/windows-include-guards.patch create mode 100644 ports/xproto/windows-io.patch create mode 100644 ports/xproto/windows-long64.patch create mode 100644 ports/xproto/windows-none.patch create mode 100644 ports/xproto/windows_mean_and_lean.patch create mode 100644 ports/xtrans/portfile.cmake create mode 100644 ports/xtrans/symbols.patch create mode 100644 ports/xtrans/vcpkg.json create mode 100644 ports/xtrans/win32.patch diff --git a/ports/dbus/cmake.dep.patch b/ports/dbus/cmake.dep.patch new file mode 100644 index 00000000000000..3099397144179a --- /dev/null +++ b/ports/dbus/cmake.dep.patch @@ -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} xcb ${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}) + diff --git a/ports/dbus/pkgconfig.patch b/ports/dbus/pkgconfig.patch new file mode 100644 index 00000000000000..be83adb779e26e --- /dev/null +++ b/ports/dbus/pkgconfig.patch @@ -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}") diff --git a/ports/dbus/portfile.cmake b/ports/dbus/portfile.cmake new file mode 100644 index 00000000000000..0f2f6d8de26c75 --- /dev/null +++ b/ports/dbus/portfile.cmake @@ -0,0 +1,62 @@ +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 # branch name + PATCHES + cmake.dep.patch #patch name + rt_pc_link.patch + pkgconfig.patch +) + +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(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(NOT VCPKG_TARGET_IS_WINDOWS) + list(APPEND TOOLS cleanup-sockets uuidgen) +else() + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/bin/dbus-env.bat" "${CURRENT_PACKAGES_DIR}" "%~dp0/..") +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() diff --git a/ports/dbus/rt_pc_link.patch b/ports/dbus/rt_pc_link.patch new file mode 100644 index 00000000000000..ad2bcd0b4b1650 --- /dev/null +++ b/ports/dbus/rt_pc_link.patch @@ -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) diff --git a/ports/dbus/vcpkg.json b/ports/dbus/vcpkg.json new file mode 100644 index 00000000000000..d8c49e3f1b2596 --- /dev/null +++ b/ports/dbus/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "dbus", + "version-semver": "1.13.18", + "description": "D-Bus specification and reference implementation, including libdbus and dbus-daemon", + "homepage": "https://gitlab.freedesktop.org/dbus/dbus", + "dependencies": [ + "expat", + "glib", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "x11" + ] +} diff --git a/ports/pthread-stubs/portfile.cmake b/ports/pthread-stubs/portfile.cmake new file mode 100644 index 00000000000000..cb3e17913eec33 --- /dev/null +++ b/ports/pthread-stubs/portfile.cmake @@ -0,0 +1,52 @@ +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 # branch name +) + + +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}") diff --git a/ports/pthread-stubs/vcpkg.json b/ports/pthread-stubs/vcpkg.json new file mode 100644 index 00000000000000..614779cdd576da --- /dev/null +++ b/ports/pthread-stubs/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "pthread-stubs", + "version": "0.4", + "description": "Stub replacements for POSIX Threads functions.", + "homepage": "https://gitlab.freedesktop.org/xorg/lib/pthread-stubs", + "dependencies": [ + "pthread" + ] +} diff --git a/ports/x11/portfile.cmake b/ports/x11/portfile.cmake new file mode 100644 index 00000000000000..8bbaf0bbe4514f --- /dev/null +++ b/ports/x11/portfile.cmake @@ -0,0 +1,3 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) +configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" + "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY) \ No newline at end of file diff --git a/ports/x11/vcpkg-cmake-wrapper.cmake b/ports/x11/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000000..9d0d3e2270f9f3 --- /dev/null +++ b/ports/x11/vcpkg-cmake-wrapper.cmake @@ -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() diff --git a/ports/x11/vcpkg.json b/ports/x11/vcpkg.json new file mode 100644 index 00000000000000..2291b39e295fd7 --- /dev/null +++ b/ports/x11/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "x11", + "version-semver": "1.6.9", + "description": "The X Window System is a network-transparent window system that was designed at MIT.", + "homepage": "https://www.x.org/wiki/", + "dependencies": [ + "xlib" + ] +} diff --git a/ports/xau/portfile.cmake b/ports/xau/portfile.cmake new file mode 100644 index 00000000000000..d4741609c649f0 --- /dev/null +++ b/ports/xau/portfile.cmake @@ -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") + 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 # branch name +) + +set(ENV{ACLOCAL} "aclocal -I \"${CURRENT_INSTALLED_DIR}/share/xorg/aclocal/\"") + +if(WIN32) + SET(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) # dumpbin will fail on GCC + set(OPTIONS --disable-dependency-tracking) +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") + +# # Handle copyright +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +endif() \ No newline at end of file diff --git a/ports/xau/vcpkg.json b/ports/xau/vcpkg.json new file mode 100644 index 00000000000000..0a37836cc69c4a --- /dev/null +++ b/ports/xau/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "xau", + "version-semver": "1.0.9", + "description": "Functions for handling Xauthority files and entries.", + "homepage": "https://gitlab.freedesktop.org/xorg/lib/libxau", + "dependencies": [ + "bzip2", + "xorg-macros", + "xproto" + ] +} diff --git a/ports/xcb-proto/portfile.cmake b/ports/xcb-proto/portfile.cmake new file mode 100644 index 00000000000000..2fde2cf8fcb052 --- /dev/null +++ b/ports/xcb-proto/portfile.cmake @@ -0,0 +1,51 @@ +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") + 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}") +#(also requires python2?) + +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 # branch name +) + +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") + +# Handle copyright +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +endif() diff --git a/ports/xcb-proto/vcpkg.json b/ports/xcb-proto/vcpkg.json new file mode 100644 index 00000000000000..620526d766933b --- /dev/null +++ b/ports/xcb-proto/vcpkg.json @@ -0,0 +1,17 @@ +{ + "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/", + "dependencies": [ + "bzip2", + { + "name": "libxml2", + "host": true, + "features": [ + "tools" + ] + }, + "xorg-macros" + ] +} diff --git a/ports/xcb-util-m4/portfile.cmake b/ports/xcb-util-m4/portfile.cmake new file mode 100644 index 00000000000000..2826a79fb1d276 --- /dev/null +++ b/ports/xcb-util-m4/portfile.cmake @@ -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 # branch name +) + +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") diff --git a/ports/xcb-util-m4/vcpkg.json b/ports/xcb-util-m4/vcpkg.json new file mode 100644 index 00000000000000..82df949ca33827 --- /dev/null +++ b/ports/xcb-util-m4/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "xcb-util-m4", + "version-string": "1", + "description": "GNU autoconf macros shared across XCB projects", + "homepage": "https://gitlab.freedesktop.org/xorg/util/xcb-util-m4" +} diff --git a/ports/xcb/configure.patch b/ports/xcb/configure.patch new file mode 100644 index 00000000000000..94c33225b1d0be --- /dev/null +++ b/ports/xcb/configure.patch @@ -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]) + ;; + *) diff --git a/ports/xcb/getpid_include.patch b/ports/xcb/getpid_include.patch new file mode 100644 index 00000000000000..755cd3e3f4e84b --- /dev/null +++ b/ports/xcb/getpid_include.patch @@ -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 + #endif + #include "xcb_windefs.h" ++#ifdef _MSC_VER ++#include ++#endif + #else + #include + #include diff --git a/ports/xcb/makefile.patch b/ports/xcb/makefile.patch new file mode 100644 index 00000000000000..9171fcf03705db --- /dev/null +++ b/ports/xcb/makefile.patch @@ -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) \ diff --git a/ports/xcb/portfile.cmake b/ports/xcb/portfile.cmake new file mode 100644 index 00000000000000..b202f63fccbb1a --- /dev/null +++ b/ports/xcb/portfile.cmake @@ -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") + 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 49e1bf6654814d1513ad8b9142f81fefd43bc939411bf7b2ce9f9fde0961658bec5d1578ca8fd099974898a99a54ff7c6220e58c0d422375d035cd17edbdb072 # bd600b9e321f39758bf32582933b4167d335af74acd7312ecc1072bc8df3f511b4f7a85ead3075b73449a3167764cd0fc77f799a86dfe42012f94a4d20a20bd7 + HEAD_REF master # branch name + 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() diff --git a/ports/xcb/use_xwindows_includes.patch b/ports/xcb/use_xwindows_includes.patch new file mode 100644 index 00000000000000..23177fc77ed852 --- /dev/null +++ b/ports/xcb/use_xwindows_includes.patch @@ -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 ++#include ++#include ++#include ++typedef unsigned char BYTE; +-#include +-#include + ++#define STDERR_FILENO _fileno( stderr ) ++ + struct iovec { + void *iov_base; /* Pointer to data. */ + int iov_len; /* Length of data. */ diff --git a/ports/xcb/vcpkg.json b/ports/xcb/vcpkg.json new file mode 100644 index 00000000000000..944d8d64b3b9ef --- /dev/null +++ b/ports/xcb/vcpkg.json @@ -0,0 +1,21 @@ +{ + "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/", + "dependencies": [ + "bzip2", + { + "name": "libxslt", + "host": true + }, + "pthread", + "pthread-stubs", + "xau", + "xcb-proto", + "xcb-util-m4", + "xdmcp", + "xorg-macros", + "xproto" + ] +} diff --git a/ports/xdmcp/configure.ac.patch b/ports/xdmcp/configure.ac.patch new file mode 100644 index 00000000000000..8a8f474c8ca992 --- /dev/null +++ b/ports/xdmcp/configure.ac.patch @@ -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]) + ;; + *) diff --git a/ports/xdmcp/portfile.cmake b/ports/xdmcp/portfile.cmake new file mode 100644 index 00000000000000..265e94f81aa9d8 --- /dev/null +++ b/ports/xdmcp/portfile.cmake @@ -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") + 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 # branch name + PATCHES configure.ac.patch #patch name +) + +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() diff --git a/ports/xdmcp/vcpkg.json b/ports/xdmcp/vcpkg.json new file mode 100644 index 00000000000000..57339e513e2d80 --- /dev/null +++ b/ports/xdmcp/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "xdmcp", + "version": "1.1.3", + "description": "X Display Manager Control Protocol library", + "homepage": "https://gitlab.freedesktop.org/xorg/lib/libxdmcp", + "dependencies": [ + "bzip2", + "xorg-macros", + "xproto" + ] +} diff --git a/ports/xlib/cl.build.patch b/ports/xlib/cl.build.patch new file mode 100644 index 00000000000000..2845f1d3192268 --- /dev/null +++ b/ports/xlib/cl.build.patch @@ -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 ++#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 + #include + ++#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 + ++#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 ++#ifdef HAVE_UNISTD_H + #include ++#endif + + /************************************************************************/ + diff --git a/ports/xlib/dllimport.patch b/ports/xlib/dllimport.patch new file mode 100644 index 00000000000000..a06adc0d59f4d2 --- /dev/null +++ b/ports/xlib/dllimport.patch @@ -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__) diff --git a/ports/xlib/io_include.patch b/ports/xlib/io_include.patch new file mode 100644 index 00000000000000..184b8d556a4eca --- /dev/null +++ b/ports/xlib/io_include.patch @@ -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 + #ifdef WIN32 + #include ++#include + #endif + + /* Needed for FIONREAD on Solaris */ diff --git a/ports/xlib/portfile.cmake b/ports/xlib/portfile.cmake new file mode 100644 index 00000000000000..31771614bd1ee7 --- /dev/null +++ b/ports/xlib/portfile.cmake @@ -0,0 +1,76 @@ +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") + 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 # branch name + PATCHES cl.build.patch #patch name + 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() diff --git a/ports/xlib/vcpkg.json b/ports/xlib/vcpkg.json new file mode 100644 index 00000000000000..9598592ac24060 --- /dev/null +++ b/ports/xlib/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "xlib", + "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/", + "dependencies": [ + "bzip2", + { + "name": "libxslt", + "host": true + }, + "xcb", + "xproto", + "xtrans" + ] +} diff --git a/ports/xlib/vcxserver.patch b/ports/xlib/vcxserver.patch new file mode 100644 index 00000000000000..10a6312f927c66 --- /dev/null +++ b/ports/xlib/vcxserver.patch @@ -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 ++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 + #include + #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 diff --git a/ports/xorg-macros/portfile.cmake b/ports/xorg-macros/portfile.cmake new file mode 100644 index 00000000000000..401a1fcae3c13a --- /dev/null +++ b/ports/xorg-macros/portfile.cmake @@ -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") + 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 # branch name + 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() diff --git a/ports/xorg-macros/skip_rawcpp.patch b/ports/xorg-macros/skip_rawcpp.patch new file mode 100644 index 00000000000000..76f76493bb603e --- /dev/null +++ b/ports/xorg-macros/skip_rawcpp.patch @@ -0,0 +1,75 @@ +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,38 @@ 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_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 diff --git a/ports/xorg-macros/vcpkg.json b/ports/xorg-macros/vcpkg.json new file mode 100644 index 00000000000000..4c1c5b11c8fc2d --- /dev/null +++ b/ports/xorg-macros/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "xorg-macros", + "version-semver": "1.19.3", + "description": "X.org macros utilities.", + "homepage": "https://xcb.freedesktop.org/", + "supports": "!uwp" +} diff --git a/ports/xproto/portfile.cmake b/ports/xproto/portfile.cmake new file mode 100644 index 00000000000000..43105b60bc20a6 --- /dev/null +++ b/ports/xproto/portfile.cmake @@ -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") + 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 # branch name + 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}") +file(TOUCH "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright") + +endif() diff --git a/ports/xproto/upstream-1.patch b/ports/xproto/upstream-1.patch new file mode 100644 index 00000000000000..55f283f6382024 --- /dev/null +++ b/ports/xproto/upstream-1.patch @@ -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 */ diff --git a/ports/xproto/vcpkg.json b/ports/xproto/vcpkg.json new file mode 100644 index 00000000000000..ff64ae9eed67e9 --- /dev/null +++ b/ports/xproto/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "xproto", + "version-string": "2021.5", + "description": "X Window System unified protocol definitions", + "homepage": "https://gitlab.freedesktop.org/xorg/proto/xorgproto", + "dependencies": [ + "libxslt", + "tool-meson", + "xorg-macros" + ] +} diff --git a/ports/xproto/vcxserver-xw32defs.patch b/ports/xproto/vcxserver-xw32defs.patch new file mode 100644 index 00000000000000..03b84a4cf5a910 --- /dev/null +++ b/ports/xproto/vcxserver-xw32defs.patch @@ -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 diff --git a/ports/xproto/windows-include-guards.patch b/ports/xproto/windows-include-guards.patch new file mode 100644 index 00000000000000..7e252aacdff4b6 --- /dev/null +++ b/ports/xproto/windows-include-guards.patch @@ -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 diff --git a/ports/xproto/windows-io.patch b/ports/xproto/windows-io.patch new file mode 100644 index 00000000000000..159d1217d73e18 --- /dev/null +++ b/ports/xproto/windows-io.patch @@ -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 + # endif + # ifdef WIN32 ++# include // For open() + # include + # else + # include diff --git a/ports/xproto/windows-long64.patch b/ports/xproto/windows-long64.patch new file mode 100644 index 00000000000000..5d8b74396bddfa --- /dev/null +++ b/ports/xproto/windows-long64.patch @@ -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 +-- \ No newline at end of file diff --git a/ports/xproto/windows-none.patch b/ports/xproto/windows-none.patch new file mode 100644 index 00000000000000..87764c88b42b51 --- /dev/null +++ b/ports/xproto/windows-none.patch @@ -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 ++#include + #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 diff --git a/ports/xproto/windows_mean_and_lean.patch b/ports/xproto/windows_mean_and_lean.patch new file mode 100644 index 00000000000000..f50e4c8806f941 --- /dev/null +++ b/ports/xproto/windows_mean_and_lean.patch @@ -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 diff --git a/ports/xtrans/portfile.cmake b/ports/xtrans/portfile.cmake new file mode 100644 index 00000000000000..224503a3b6c06c --- /dev/null +++ b/ports/xtrans/portfile.cmake @@ -0,0 +1,63 @@ +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") + 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 # branch name + 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) +endif() diff --git a/ports/xtrans/symbols.patch b/ports/xtrans/symbols.patch new file mode 100644 index 00000000000000..2110d31b120b74 --- /dev/null +++ b/ports/xtrans/symbols.patch @@ -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 + #include ++#ifdef _MSC_VER ++# include ++# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) ++#endif + #endif + + #ifdef X11_t diff --git a/ports/xtrans/vcpkg.json b/ports/xtrans/vcpkg.json new file mode 100644 index 00000000000000..b3a25d304c4182 --- /dev/null +++ b/ports/xtrans/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "xtrans", + "version": "1.4.0", + "description": "xtrans - X Network Transport layer shared code", + "homepage": "https://gitlab.freedesktop.org/xorg/lib/libxtrans", + "dependencies": [ + "xorg-macros" + ] +} diff --git a/ports/xtrans/win32.patch b/ports/xtrans/win32.patch new file mode 100644 index 00000000000000..dee4c79d7329da --- /dev/null +++ b/ports/xtrans/win32.patch @@ -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 + #include + #include +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 + #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 + #endif From 6d912fbd0693e5d5daceb13f48d29736bf5f8fc3 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Wed, 19 Jan 2022 23:44:28 +0100 Subject: [PATCH 03/37] format manifest --- ports/xlib/vcpkg.json | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/ports/xlib/vcpkg.json b/ports/xlib/vcpkg.json index 9598592ac24060..5cb2137eaff613 100644 --- a/ports/xlib/vcpkg.json +++ b/ports/xlib/vcpkg.json @@ -1,16 +1,16 @@ -{ - "name": "xlib", - "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/", - "dependencies": [ - "bzip2", - { - "name": "libxslt", - "host": true - }, - "xcb", - "xproto", - "xtrans" - ] -} +{ + "name": "xlib", + "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/", + "dependencies": [ + "bzip2", + { + "name": "libxslt", + "host": true + }, + "xcb", + "xproto", + "xtrans" + ] +} From 3f606c07516292f4725e874b7327b40c321d5e1d Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Wed, 19 Jan 2022 23:45:04 +0100 Subject: [PATCH 04/37] version stuff --- versions/baseline.json | 48 ++++++++++++++++++++++++++++++++++ versions/d-/dbus.json | 9 +++++++ versions/p-/pthread-stubs.json | 9 +++++++ versions/x-/x11.json | 9 +++++++ versions/x-/xau.json | 9 +++++++ versions/x-/xcb-proto.json | 9 +++++++ versions/x-/xcb-util-m4.json | 9 +++++++ versions/x-/xcb.json | 9 +++++++ versions/x-/xdmcp.json | 9 +++++++ versions/x-/xlib.json | 9 +++++++ versions/x-/xorg-macros.json | 9 +++++++ versions/x-/xproto.json | 9 +++++++ versions/x-/xtrans.json | 9 +++++++ 13 files changed, 156 insertions(+) create mode 100644 versions/d-/dbus.json create mode 100644 versions/p-/pthread-stubs.json create mode 100644 versions/x-/x11.json create mode 100644 versions/x-/xau.json create mode 100644 versions/x-/xcb-proto.json create mode 100644 versions/x-/xcb-util-m4.json create mode 100644 versions/x-/xcb.json create mode 100644 versions/x-/xdmcp.json create mode 100644 versions/x-/xlib.json create mode 100644 versions/x-/xorg-macros.json create mode 100644 versions/x-/xproto.json create mode 100644 versions/x-/xtrans.json diff --git a/versions/baseline.json b/versions/baseline.json index a5ee132a31e2da..fe482a62827550 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -1788,6 +1788,10 @@ "baseline": "1.0.0", "port-version": 1 }, + "dbus": { + "baseline": "1.13.18", + "port-version": 0 + }, "dcmtk": { "baseline": "3.6.6", "port-version": 2 @@ -5480,6 +5484,10 @@ "baseline": "3.0.0", "port-version": 1 }, + "pthread-stubs": { + "baseline": "0.4", + "port-version": 0 + }, "pthreadpool": { "baseline": "2020-04-10", "port-version": 1 @@ -7348,6 +7356,10 @@ "baseline": "3.0.3", "port-version": 0 }, + "x11": { + "baseline": "1.6.9", + "port-version": 0 + }, "x264": { "baseline": "164-5db6aa6cab1b146", "port-version": 3 @@ -7360,6 +7372,10 @@ "baseline": "1.12", "port-version": 1 }, + "xau": { + "baseline": "1.0.9", + "port-version": 0 + }, "xaudio2redist": { "baseline": "1.2.8", "port-version": 0 @@ -7368,6 +7384,22 @@ "baseline": "6.00", "port-version": 0 }, + "xcb": { + "baseline": "1.14", + "port-version": 0 + }, + "xcb-proto": { + "baseline": "1.14.1", + "port-version": 0 + }, + "xcb-util-m4": { + "baseline": "1", + "port-version": 0 + }, + "xdmcp": { + "baseline": "1.1.3", + "port-version": 0 + }, "xerces-c": { "baseline": "3.2.3", "port-version": 3 @@ -7380,6 +7412,10 @@ "baseline": "0.3.0", "port-version": 1 }, + "xlib": { + "baseline": "1.7.3.1", + "port-version": 0 + }, "xlnt": { "baseline": "1.5.0", "port-version": 3 @@ -7400,6 +7436,10 @@ "baseline": "2021-05-17", "port-version": 1 }, + "xorg-macros": { + "baseline": "1.19.3", + "port-version": 0 + }, "xorstr": { "baseline": "2021-10-23", "port-version": 0 @@ -7408,6 +7448,10 @@ "baseline": "0.8.1", "port-version": 1 }, + "xproto": { + "baseline": "2021.5", + "port-version": 0 + }, "xsimd": { "baseline": "8.0.3", "port-version": 0 @@ -7432,6 +7476,10 @@ "baseline": "0.7.2", "port-version": 0 }, + "xtrans": { + "baseline": "1.4.0", + "port-version": 0 + }, "xxhash": { "baseline": "0.8.1", "port-version": 1 diff --git a/versions/d-/dbus.json b/versions/d-/dbus.json new file mode 100644 index 00000000000000..2e14f4248c9fb5 --- /dev/null +++ b/versions/d-/dbus.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "621c4aad736c2fbfca9acf9604d4eb20bdbb9f62", + "version-semver": "1.13.18", + "port-version": 0 + } + ] +} diff --git a/versions/p-/pthread-stubs.json b/versions/p-/pthread-stubs.json new file mode 100644 index 00000000000000..2d9eab6d52c0b0 --- /dev/null +++ b/versions/p-/pthread-stubs.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "c7bdb15be81cdafc9306be0644d64c2072decf6b", + "version": "0.4", + "port-version": 0 + } + ] +} diff --git a/versions/x-/x11.json b/versions/x-/x11.json new file mode 100644 index 00000000000000..af15d32c29ec1d --- /dev/null +++ b/versions/x-/x11.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "b58bf936b9722c749d0db33fc30164e4c153786e", + "version-semver": "1.6.9", + "port-version": 0 + } + ] +} diff --git a/versions/x-/xau.json b/versions/x-/xau.json new file mode 100644 index 00000000000000..e054e44174322a --- /dev/null +++ b/versions/x-/xau.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "fa9471f5c4c4481b3b544b51c552c849f9671bbb", + "version-semver": "1.0.9", + "port-version": 0 + } + ] +} diff --git a/versions/x-/xcb-proto.json b/versions/x-/xcb-proto.json new file mode 100644 index 00000000000000..b808d6425a4c9e --- /dev/null +++ b/versions/x-/xcb-proto.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "3da8b0d6b7c5a6a6281cabf1d1e7062c3365c42b", + "version": "1.14.1", + "port-version": 0 + } + ] +} diff --git a/versions/x-/xcb-util-m4.json b/versions/x-/xcb-util-m4.json new file mode 100644 index 00000000000000..8fc174d13e02ff --- /dev/null +++ b/versions/x-/xcb-util-m4.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "f5617ff04d96f3348f64f8794c6c9e41ade43d50", + "version-string": "1", + "port-version": 0 + } + ] +} diff --git a/versions/x-/xcb.json b/versions/x-/xcb.json new file mode 100644 index 00000000000000..8b8f8f15a4806c --- /dev/null +++ b/versions/x-/xcb.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "8578b871d0ef7ae7da4f541a426cbb6eabb74d5a", + "version": "1.14", + "port-version": 0 + } + ] +} diff --git a/versions/x-/xdmcp.json b/versions/x-/xdmcp.json new file mode 100644 index 00000000000000..db2d5ffae74d73 --- /dev/null +++ b/versions/x-/xdmcp.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "dbdfe30e1306531a3e8ae06aa23af229ede1ecac", + "version": "1.1.3", + "port-version": 0 + } + ] +} diff --git a/versions/x-/xlib.json b/versions/x-/xlib.json new file mode 100644 index 00000000000000..d3a7071b48dec8 --- /dev/null +++ b/versions/x-/xlib.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "eb5dddadda5b4d8ad971f74eafd21f3ab4bb0715", + "version": "1.7.3.1", + "port-version": 0 + } + ] +} diff --git a/versions/x-/xorg-macros.json b/versions/x-/xorg-macros.json new file mode 100644 index 00000000000000..f1c0cfd4f5b870 --- /dev/null +++ b/versions/x-/xorg-macros.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "9eb2d00e214b6e133dc407e47ca1f6053715aee2", + "version-semver": "1.19.3", + "port-version": 0 + } + ] +} diff --git a/versions/x-/xproto.json b/versions/x-/xproto.json new file mode 100644 index 00000000000000..5b3db78a8de053 --- /dev/null +++ b/versions/x-/xproto.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "698873d8613a285fef3bf6ef8f5f78c39865289d", + "version-string": "2021.5", + "port-version": 0 + } + ] +} diff --git a/versions/x-/xtrans.json b/versions/x-/xtrans.json new file mode 100644 index 00000000000000..8b8c527875c9ba --- /dev/null +++ b/versions/x-/xtrans.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "a068cead3f502402db1dfee9e7e2abe4470ae3fd", + "version": "1.4.0", + "port-version": 0 + } + ] +} From 60af2257a59f10a6cc273e17c0e64e2a187a390b Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Wed, 19 Jan 2022 23:47:15 +0100 Subject: [PATCH 05/37] remove if block --- ports/xau/portfile.cmake | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ports/xau/portfile.cmake b/ports/xau/portfile.cmake index d4741609c649f0..18c51e150acfb0 100644 --- a/ports/xau/portfile.cmake +++ b/ports/xau/portfile.cmake @@ -14,11 +14,6 @@ vcpkg_from_gitlab( set(ENV{ACLOCAL} "aclocal -I \"${CURRENT_INSTALLED_DIR}/share/xorg/aclocal/\"") -if(WIN32) - SET(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) # dumpbin will fail on GCC - set(OPTIONS --disable-dependency-tracking) -endif() - vcpkg_configure_make( SOURCE_PATH "${SOURCE_PATH}" AUTOCONFIG From 8e2c58849dd594bb489916391ff60daa45bbb10d Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Wed, 19 Jan 2022 23:47:25 +0100 Subject: [PATCH 06/37] version stuff --- versions/x-/xau.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/x-/xau.json b/versions/x-/xau.json index e054e44174322a..9be386f53c883e 100644 --- a/versions/x-/xau.json +++ b/versions/x-/xau.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "fa9471f5c4c4481b3b544b51c552c849f9671bbb", + "git-tree": "c0b5acaabcaa8ba6ccedaf4b1a72a0341d5d5b85", "version-semver": "1.0.9", "port-version": 0 } From 6b110e5d1577423e178d7a04424b26444b1cb975 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 20 Jan 2022 08:28:30 +0100 Subject: [PATCH 07/37] fix xcb hash --- ports/xcb/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/xcb/portfile.cmake b/ports/xcb/portfile.cmake index b202f63fccbb1a..2d5add3f396550 100644 --- a/ports/xcb/portfile.cmake +++ b/ports/xcb/portfile.cmake @@ -8,7 +8,7 @@ vcpkg_from_gitlab( OUT_SOURCE_PATH SOURCE_PATH REPO lib/libxcb REF ddafdba11f6919e6fcf977c09c78b06f94de47aa #v1.14 + some patches - SHA512 49e1bf6654814d1513ad8b9142f81fefd43bc939411bf7b2ce9f9fde0961658bec5d1578ca8fd099974898a99a54ff7c6220e58c0d422375d035cd17edbdb072 # bd600b9e321f39758bf32582933b4167d335af74acd7312ecc1072bc8df3f511b4f7a85ead3075b73449a3167764cd0fc77f799a86dfe42012f94a4d20a20bd7 + SHA512 d8382b04f2b00671cded9e22d6066164511ee4c08e2cf5de4ec28d09e41228e30d3ba7d0e6b5141abf4e4bc777aa662fe9d1d04f3e1e26e0b323549e845c8072 HEAD_REF master # branch name PATCHES makefile.patch # without the patch target xproto.c is missing target XCBPROTO_XCBINCLUDEDIR configure.patch From 1a265e876e24506064390d2e58497e247f8c22ca Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 20 Jan 2022 08:29:06 +0100 Subject: [PATCH 08/37] fix xproto dependency on meson blocking cross builds --- ports/xproto/vcpkg.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ports/xproto/vcpkg.json b/ports/xproto/vcpkg.json index ff64ae9eed67e9..7dedbab8875047 100644 --- a/ports/xproto/vcpkg.json +++ b/ports/xproto/vcpkg.json @@ -5,7 +5,10 @@ "homepage": "https://gitlab.freedesktop.org/xorg/proto/xorgproto", "dependencies": [ "libxslt", - "tool-meson", + { + "name": "vcpkg-tool-meson", + "host": true + }, "xorg-macros" ] } From 4cdd86479b7b7ea146f9e05c1c491bfaa9f2aade Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 20 Jan 2022 08:49:27 +0100 Subject: [PATCH 09/37] adjust message --- ports/xau/portfile.cmake | 2 +- ports/xcb-proto/portfile.cmake | 2 +- ports/xcb/portfile.cmake | 2 +- ports/xdmcp/portfile.cmake | 2 +- ports/xlib/portfile.cmake | 2 +- ports/xorg-macros/portfile.cmake | 2 +- ports/xproto/portfile.cmake | 2 +- ports/xtrans/portfile.cmake | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ports/xau/portfile.cmake b/ports/xau/portfile.cmake index 18c51e150acfb0..cfca554031a194 100644 --- a/ports/xau/portfile.cmake +++ b/ports/xau/portfile.cmake @@ -1,5 +1,5 @@ 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") + 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() diff --git a/ports/xcb-proto/portfile.cmake b/ports/xcb-proto/portfile.cmake index 2fde2cf8fcb052..282ff0028bcf7f 100644 --- a/ports/xcb-proto/portfile.cmake +++ b/ports/xcb-proto/portfile.cmake @@ -1,6 +1,6 @@ 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") + 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() diff --git a/ports/xcb/portfile.cmake b/ports/xcb/portfile.cmake index 2d5add3f396550..eccb1ac5cb1955 100644 --- a/ports/xcb/portfile.cmake +++ b/ports/xcb/portfile.cmake @@ -1,5 +1,5 @@ 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") + 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() diff --git a/ports/xdmcp/portfile.cmake b/ports/xdmcp/portfile.cmake index 265e94f81aa9d8..a85716e30338ed 100644 --- a/ports/xdmcp/portfile.cmake +++ b/ports/xdmcp/portfile.cmake @@ -1,6 +1,6 @@ #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") + 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( diff --git a/ports/xlib/portfile.cmake b/ports/xlib/portfile.cmake index 31771614bd1ee7..2014ae5174aced 100644 --- a/ports/xlib/portfile.cmake +++ b/ports/xlib/portfile.cmake @@ -1,5 +1,5 @@ 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") + 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() diff --git a/ports/xorg-macros/portfile.cmake b/ports/xorg-macros/portfile.cmake index 401a1fcae3c13a..7adf44639dacce 100644 --- a/ports/xorg-macros/portfile.cmake +++ b/ports/xorg-macros/portfile.cmake @@ -1,7 +1,7 @@ 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") + 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() diff --git a/ports/xproto/portfile.cmake b/ports/xproto/portfile.cmake index 43105b60bc20a6..e827477ae92658 100644 --- a/ports/xproto/portfile.cmake +++ b/ports/xproto/portfile.cmake @@ -1,5 +1,5 @@ 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") + 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() diff --git a/ports/xtrans/portfile.cmake b/ports/xtrans/portfile.cmake index 224503a3b6c06c..bb28aad15ba5a0 100644 --- a/ports/xtrans/portfile.cmake +++ b/ports/xtrans/portfile.cmake @@ -1,7 +1,7 @@ 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") + 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() From 0f3fda94f6e31bc8079039d558a8ea66579fc063 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 20 Jan 2022 09:19:35 +0100 Subject: [PATCH 10/37] use X11_xcb_LIB --- ports/dbus/cmake.dep.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/dbus/cmake.dep.patch b/ports/dbus/cmake.dep.patch index 3099397144179a..ac827f0c27f18e 100644 --- a/ports/dbus/cmake.dep.patch +++ b/ports/dbus/cmake.dep.patch @@ -8,7 +8,7 @@ index 8cde1ffe0..d4d09f223 100644 if(DBUS_BUILD_X11) - target_link_libraries(dbus-launch ${X11_LIBRARIES} ) + find_package(Threads REQUIRED) -+ target_link_libraries(dbus-launch ${X11_LIBRARIES} xcb ${X11_Xau_LIB} ${X11_Xdmcp_LIB} Threads::Threads) ++ 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}) From 31077511c304c115b64a9e02eb3ba417b7b32c9c Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 20 Jan 2022 09:20:17 +0100 Subject: [PATCH 11/37] version stuff --- versions/d-/dbus.json | 2 +- versions/x-/xau.json | 2 +- versions/x-/xcb-proto.json | 2 +- versions/x-/xcb.json | 2 +- versions/x-/xdmcp.json | 2 +- versions/x-/xlib.json | 2 +- versions/x-/xorg-macros.json | 2 +- versions/x-/xproto.json | 2 +- versions/x-/xtrans.json | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/versions/d-/dbus.json b/versions/d-/dbus.json index 2e14f4248c9fb5..56024d55e2e73d 100644 --- a/versions/d-/dbus.json +++ b/versions/d-/dbus.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "621c4aad736c2fbfca9acf9604d4eb20bdbb9f62", + "git-tree": "4cc1454a1dabb5d4f248cbbe4b3896feb8463cc8", "version-semver": "1.13.18", "port-version": 0 } diff --git a/versions/x-/xau.json b/versions/x-/xau.json index 9be386f53c883e..c0f64a8692c2f9 100644 --- a/versions/x-/xau.json +++ b/versions/x-/xau.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "c0b5acaabcaa8ba6ccedaf4b1a72a0341d5d5b85", + "git-tree": "cd068ed347c0a24a6e5f95144d600fcbad984888", "version-semver": "1.0.9", "port-version": 0 } diff --git a/versions/x-/xcb-proto.json b/versions/x-/xcb-proto.json index b808d6425a4c9e..b10ab926d58f52 100644 --- a/versions/x-/xcb-proto.json +++ b/versions/x-/xcb-proto.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "3da8b0d6b7c5a6a6281cabf1d1e7062c3365c42b", + "git-tree": "ec8f478736cb1ae7d47bd420b5e2c8aff0a05419", "version": "1.14.1", "port-version": 0 } diff --git a/versions/x-/xcb.json b/versions/x-/xcb.json index 8b8f8f15a4806c..c8480f5b344a59 100644 --- a/versions/x-/xcb.json +++ b/versions/x-/xcb.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "8578b871d0ef7ae7da4f541a426cbb6eabb74d5a", + "git-tree": "335348f7134942bd9e6684e6953742e539a0bcdb", "version": "1.14", "port-version": 0 } diff --git a/versions/x-/xdmcp.json b/versions/x-/xdmcp.json index db2d5ffae74d73..667302f3982fc1 100644 --- a/versions/x-/xdmcp.json +++ b/versions/x-/xdmcp.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "dbdfe30e1306531a3e8ae06aa23af229ede1ecac", + "git-tree": "b7c0329ad3cdfbb5061d46130e5e80771b89a466", "version": "1.1.3", "port-version": 0 } diff --git a/versions/x-/xlib.json b/versions/x-/xlib.json index d3a7071b48dec8..ba821af1429099 100644 --- a/versions/x-/xlib.json +++ b/versions/x-/xlib.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "eb5dddadda5b4d8ad971f74eafd21f3ab4bb0715", + "git-tree": "a8909b0df9c9e8cb2f6ed7161a4e26bbdd831912", "version": "1.7.3.1", "port-version": 0 } diff --git a/versions/x-/xorg-macros.json b/versions/x-/xorg-macros.json index f1c0cfd4f5b870..0487319b33de2c 100644 --- a/versions/x-/xorg-macros.json +++ b/versions/x-/xorg-macros.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "9eb2d00e214b6e133dc407e47ca1f6053715aee2", + "git-tree": "9cb231d0ac80bdf86f3c8265fd804406ce0d6f4a", "version-semver": "1.19.3", "port-version": 0 } diff --git a/versions/x-/xproto.json b/versions/x-/xproto.json index 5b3db78a8de053..79056592ccaf59 100644 --- a/versions/x-/xproto.json +++ b/versions/x-/xproto.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "698873d8613a285fef3bf6ef8f5f78c39865289d", + "git-tree": "0240964997bc22023864ac26034a8efad1998275", "version-string": "2021.5", "port-version": 0 } diff --git a/versions/x-/xtrans.json b/versions/x-/xtrans.json index 8b8c527875c9ba..4cfa7b61d93f11 100644 --- a/versions/x-/xtrans.json +++ b/versions/x-/xtrans.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "a068cead3f502402db1dfee9e7e2abe4470ae3fd", + "git-tree": "c595faed191fcfa0e11a2e74a11aef51663f25cf", "version": "1.4.0", "port-version": 0 } From 05779b4dfdf0f18c6641f04a1d51a5d3cc0e65d2 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 20 Jan 2022 23:08:01 +0100 Subject: [PATCH 12/37] put xlib arm64-windows on baseline --- scripts/ci.baseline.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index ac5d73c169acb2..996352b2537ae6 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -1503,6 +1503,8 @@ xbyak:arm-uwp=fail xbyak:x64-uwp=fail xerces-c:arm-uwp=fail xerces-c:x64-uwp=fail +# Crosscompiling xlib requires additional steps and patches to the Makefiles. +xlib:arm64-windows xmlsec:arm-uwp=fail xmlsec:x64-uwp=fail # The xmsh upstream repository is gone, if we find no replacement before From 18f6351134a212c286ab925e65ad7b344d18c2e6 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 20 Jan 2022 23:08:19 +0100 Subject: [PATCH 13/37] fix dbus on osx and linux --- ports/dbus/getpeereid.patch | 26 ++++++++++++++++++++++++++ ports/dbus/portfile.cmake | 1 + 2 files changed, 27 insertions(+) create mode 100644 ports/dbus/getpeereid.patch diff --git a/ports/dbus/getpeereid.patch b/ports/dbus/getpeereid.patch new file mode 100644 index 00000000000000..d94600208342d8 --- /dev/null +++ b/ports/dbus/getpeereid.patch @@ -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 + diff --git a/ports/dbus/portfile.cmake b/ports/dbus/portfile.cmake index 0f2f6d8de26c75..26da29ef403e8e 100644 --- a/ports/dbus/portfile.cmake +++ b/ports/dbus/portfile.cmake @@ -9,6 +9,7 @@ vcpkg_from_gitlab( cmake.dep.patch #patch name rt_pc_link.patch pkgconfig.patch + getpeereid.patch # missing check from configure.ac ) vcpkg_cmake_configure( From 5b6f45f96430eb8992fe0be2281845d77663157c Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 20 Jan 2022 23:08:57 +0100 Subject: [PATCH 14/37] version stuff --- versions/d-/dbus.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/d-/dbus.json b/versions/d-/dbus.json index 56024d55e2e73d..763798f2a9545b 100644 --- a/versions/d-/dbus.json +++ b/versions/d-/dbus.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "4cc1454a1dabb5d4f248cbbe4b3896feb8463cc8", + "git-tree": "32e018edc144d9e1346647e498f697db9065f309", "version-semver": "1.13.18", "port-version": 0 } From faedbf624efe6b3dba3919b41f85ef022b7e797e Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 20 Jan 2022 23:22:05 +0100 Subject: [PATCH 15/37] forget to set the value --- scripts/ci.baseline.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index 996352b2537ae6..506d91c5f6eae7 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -1504,7 +1504,7 @@ xbyak:x64-uwp=fail xerces-c:arm-uwp=fail xerces-c:x64-uwp=fail # Crosscompiling xlib requires additional steps and patches to the Makefiles. -xlib:arm64-windows +xlib:arm64-windows=fail xmlsec:arm-uwp=fail xmlsec:x64-uwp=fail # The xmsh upstream repository is gone, if we find no replacement before From 8235be2206ff205773f49cdc7de152ff9497df36 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Fri, 21 Jan 2022 10:19:02 +0100 Subject: [PATCH 16/37] fix --export-dynamic on osx --- ports/dbus/portfile.cmake | 1 + ports/dbus/rdynamic.patch | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 ports/dbus/rdynamic.patch diff --git a/ports/dbus/portfile.cmake b/ports/dbus/portfile.cmake index 26da29ef403e8e..f4cc33f9e1e234 100644 --- a/ports/dbus/portfile.cmake +++ b/ports/dbus/portfile.cmake @@ -10,6 +10,7 @@ vcpkg_from_gitlab( 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( diff --git a/ports/dbus/rdynamic.patch b/ports/dbus/rdynamic.patch new file mode 100644 index 00000000000000..34096a3ddf9cbc --- /dev/null +++ b/ports/dbus/rdynamic.patch @@ -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() + From cdcadf4236e79218733342bd5e2e544053d61c52 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Fri, 21 Jan 2022 10:19:27 +0100 Subject: [PATCH 17/37] version dbus --- versions/d-/dbus.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/d-/dbus.json b/versions/d-/dbus.json index 763798f2a9545b..c46e1bea8e5a48 100644 --- a/versions/d-/dbus.json +++ b/versions/d-/dbus.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "32e018edc144d9e1346647e498f697db9065f309", + "git-tree": "cca964b9a49660acb4758bf21403967be51fe6ee", "version-semver": "1.13.18", "port-version": 0 } From a49e1a2e7c6c7afd16dac3fb37a9b143c476f128 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Fri, 21 Jan 2022 20:36:40 +0100 Subject: [PATCH 18/37] ci-retrigger From e2b2ceb00e9d1331016ea0fcc4eb89bef4adefb0 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 24 Feb 2022 16:26:03 +0100 Subject: [PATCH 19/37] add license (needs tool update) --- ports/dbus/vcpkg.json | 1 + ports/pthread-stubs/vcpkg.json | 1 + ports/x11/vcpkg.json | 1 + ports/xau/vcpkg.json | 1 + ports/xcb-proto/vcpkg.json | 1 + ports/xcb-util-m4/vcpkg.json | 3 ++- ports/xcb/vcpkg.json | 1 + ports/xdmcp/vcpkg.json | 1 + ports/xlib/vcpkg.json | 1 + ports/xorg-macros/vcpkg.json | 1 + ports/xproto/vcpkg.json | 1 + ports/xtrans/vcpkg.json | 1 + 12 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ports/dbus/vcpkg.json b/ports/dbus/vcpkg.json index d8c49e3f1b2596..f7da6d7dcc27a5 100644 --- a/ports/dbus/vcpkg.json +++ b/ports/dbus/vcpkg.json @@ -3,6 +3,7 @@ "version-semver": "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", diff --git a/ports/pthread-stubs/vcpkg.json b/ports/pthread-stubs/vcpkg.json index 614779cdd576da..f72f2ae2ec0df0 100644 --- a/ports/pthread-stubs/vcpkg.json +++ b/ports/pthread-stubs/vcpkg.json @@ -3,6 +3,7 @@ "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" ] diff --git a/ports/x11/vcpkg.json b/ports/x11/vcpkg.json index 2291b39e295fd7..701bc063f959e4 100644 --- a/ports/x11/vcpkg.json +++ b/ports/x11/vcpkg.json @@ -3,6 +3,7 @@ "version-semver": "1.6.9", "description": "The X Window System is a network-transparent window system that was designed at MIT.", "homepage": "https://www.x.org/wiki/", + "license": null, "dependencies": [ "xlib" ] diff --git a/ports/xau/vcpkg.json b/ports/xau/vcpkg.json index 0a37836cc69c4a..288ee5612a292d 100644 --- a/ports/xau/vcpkg.json +++ b/ports/xau/vcpkg.json @@ -3,6 +3,7 @@ "version-semver": "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", diff --git a/ports/xcb-proto/vcpkg.json b/ports/xcb-proto/vcpkg.json index 620526d766933b..33ef8bca6bb79f 100644 --- a/ports/xcb-proto/vcpkg.json +++ b/ports/xcb-proto/vcpkg.json @@ -3,6 +3,7 @@ "version": "1.14.1", "description": "XML-XCB protocol descriptions used by libxcb for the X11 protocol & extensions", "homepage": "https://xcb.freedesktop.org/", + "license": "X11-distribute-modifications-variant", "dependencies": [ "bzip2", { diff --git a/ports/xcb-util-m4/vcpkg.json b/ports/xcb-util-m4/vcpkg.json index 82df949ca33827..142d89804183f8 100644 --- a/ports/xcb-util-m4/vcpkg.json +++ b/ports/xcb-util-m4/vcpkg.json @@ -2,5 +2,6 @@ "name": "xcb-util-m4", "version-string": "1", "description": "GNU autoconf macros shared across XCB projects", - "homepage": "https://gitlab.freedesktop.org/xorg/util/xcb-util-m4" + "homepage": "https://gitlab.freedesktop.org/xorg/util/xcb-util-m4", + "license": null } diff --git a/ports/xcb/vcpkg.json b/ports/xcb/vcpkg.json index 944d8d64b3b9ef..0ec720d3c61f09 100644 --- a/ports/xcb/vcpkg.json +++ b/ports/xcb/vcpkg.json @@ -3,6 +3,7 @@ "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", { diff --git a/ports/xdmcp/vcpkg.json b/ports/xdmcp/vcpkg.json index 57339e513e2d80..234ff29adff302 100644 --- a/ports/xdmcp/vcpkg.json +++ b/ports/xdmcp/vcpkg.json @@ -3,6 +3,7 @@ "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", diff --git a/ports/xlib/vcpkg.json b/ports/xlib/vcpkg.json index 5cb2137eaff613..3f4e2d9f78d5d2 100644 --- a/ports/xlib/vcpkg.json +++ b/ports/xlib/vcpkg.json @@ -3,6 +3,7 @@ "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", { diff --git a/ports/xorg-macros/vcpkg.json b/ports/xorg-macros/vcpkg.json index 4c1c5b11c8fc2d..541df30128a699 100644 --- a/ports/xorg-macros/vcpkg.json +++ b/ports/xorg-macros/vcpkg.json @@ -3,5 +3,6 @@ "version-semver": "1.19.3", "description": "X.org macros utilities.", "homepage": "https://xcb.freedesktop.org/", + "license": "MIT", "supports": "!uwp" } diff --git a/ports/xproto/vcpkg.json b/ports/xproto/vcpkg.json index 7dedbab8875047..ead7d2db92c89c 100644 --- a/ports/xproto/vcpkg.json +++ b/ports/xproto/vcpkg.json @@ -3,6 +3,7 @@ "version-string": "2021.5", "description": "X Window System unified protocol definitions", "homepage": "https://gitlab.freedesktop.org/xorg/proto/xorgproto", + "license": null, "dependencies": [ "libxslt", { diff --git a/ports/xtrans/vcpkg.json b/ports/xtrans/vcpkg.json index b3a25d304c4182..377d72e5688009 100644 --- a/ports/xtrans/vcpkg.json +++ b/ports/xtrans/vcpkg.json @@ -3,6 +3,7 @@ "version": "1.4.0", "description": "xtrans - X Network Transport layer shared code", "homepage": "https://gitlab.freedesktop.org/xorg/lib/libxtrans", + "license": "MIT-open-group", "dependencies": [ "xorg-macros" ] From 66508e24dae3f7fdf29cc633c453815c2a1f866e Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 24 Feb 2022 16:35:05 +0100 Subject: [PATCH 20/37] version adjustments --- ports/dbus/vcpkg.json | 2 +- ports/x11/vcpkg.json | 2 +- ports/xau/vcpkg.json | 2 +- ports/xcb-util-m4/vcpkg.json | 2 +- ports/xorg-macros/vcpkg.json | 2 +- ports/xproto/vcpkg.json | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ports/dbus/vcpkg.json b/ports/dbus/vcpkg.json index f7da6d7dcc27a5..53a353ed5c0bbd 100644 --- a/ports/dbus/vcpkg.json +++ b/ports/dbus/vcpkg.json @@ -1,6 +1,6 @@ { "name": "dbus", - "version-semver": "1.13.18", + "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", diff --git a/ports/x11/vcpkg.json b/ports/x11/vcpkg.json index 701bc063f959e4..d5abba9b230802 100644 --- a/ports/x11/vcpkg.json +++ b/ports/x11/vcpkg.json @@ -1,6 +1,6 @@ { "name": "x11", - "version-semver": "1.6.9", + "version": "1.6.9", "description": "The X Window System is a network-transparent window system that was designed at MIT.", "homepage": "https://www.x.org/wiki/", "license": null, diff --git a/ports/xau/vcpkg.json b/ports/xau/vcpkg.json index 288ee5612a292d..ca56309a16e370 100644 --- a/ports/xau/vcpkg.json +++ b/ports/xau/vcpkg.json @@ -1,6 +1,6 @@ { "name": "xau", - "version-semver": "1.0.9", + "version": "1.0.9", "description": "Functions for handling Xauthority files and entries.", "homepage": "https://gitlab.freedesktop.org/xorg/lib/libxau", "license": "MIT-open-group", diff --git a/ports/xcb-util-m4/vcpkg.json b/ports/xcb-util-m4/vcpkg.json index 142d89804183f8..e2d7d051e4719f 100644 --- a/ports/xcb-util-m4/vcpkg.json +++ b/ports/xcb-util-m4/vcpkg.json @@ -1,6 +1,6 @@ { "name": "xcb-util-m4", - "version-string": "1", + "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 diff --git a/ports/xorg-macros/vcpkg.json b/ports/xorg-macros/vcpkg.json index 541df30128a699..a5e93e2538e639 100644 --- a/ports/xorg-macros/vcpkg.json +++ b/ports/xorg-macros/vcpkg.json @@ -1,6 +1,6 @@ { "name": "xorg-macros", - "version-semver": "1.19.3", + "version": "1.19.3", "description": "X.org macros utilities.", "homepage": "https://xcb.freedesktop.org/", "license": "MIT", diff --git a/ports/xproto/vcpkg.json b/ports/xproto/vcpkg.json index ead7d2db92c89c..43a4509c3698c3 100644 --- a/ports/xproto/vcpkg.json +++ b/ports/xproto/vcpkg.json @@ -1,6 +1,6 @@ { "name": "xproto", - "version-string": "2021.5", + "version": "2021.5", "description": "X Window System unified protocol definitions", "homepage": "https://gitlab.freedesktop.org/xorg/proto/xorgproto", "license": null, From 1e07d62d317f92c8db3d4a36bed9cf7509e5c1ea Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 24 Feb 2022 16:36:03 +0100 Subject: [PATCH 21/37] version update --- versions/baseline.json | 3 ++- versions/d-/dbus.json | 4 ++-- versions/p-/pthread-stubs.json | 2 +- versions/x-/x11.json | 4 ++-- versions/x-/xau.json | 4 ++-- versions/x-/xcb-proto.json | 2 +- versions/x-/xcb-util-m4.json | 4 ++-- versions/x-/xcb.json | 2 +- versions/x-/xdmcp.json | 2 +- versions/x-/xlib.json | 2 +- versions/x-/xorg-macros.json | 4 ++-- versions/x-/xproto.json | 4 ++-- versions/x-/xtrans.json | 2 +- 13 files changed, 20 insertions(+), 19 deletions(-) diff --git a/versions/baseline.json b/versions/baseline.json index 11a1323a8c1349..92a6b5a61eba39 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -7445,7 +7445,7 @@ "port-version": 0 }, "xcb-util-m4": { - "baseline": "1", + "baseline": "2022-01-24", "port-version": 0 }, "xdmcp": { @@ -7498,6 +7498,7 @@ }, "xproto": { "baseline": "2021.5", + "port-version": 0 }, "xqilla": { "baseline": "2.3.4", diff --git a/versions/d-/dbus.json b/versions/d-/dbus.json index c46e1bea8e5a48..748581763a8814 100644 --- a/versions/d-/dbus.json +++ b/versions/d-/dbus.json @@ -1,8 +1,8 @@ { "versions": [ { - "git-tree": "cca964b9a49660acb4758bf21403967be51fe6ee", - "version-semver": "1.13.18", + "git-tree": "52b32e9d4b656c3ff79cf7e0519005df0f9d00a9", + "version": "1.13.18", "port-version": 0 } ] diff --git a/versions/p-/pthread-stubs.json b/versions/p-/pthread-stubs.json index 2d9eab6d52c0b0..d61ae5adb6e4b4 100644 --- a/versions/p-/pthread-stubs.json +++ b/versions/p-/pthread-stubs.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "c7bdb15be81cdafc9306be0644d64c2072decf6b", + "git-tree": "0a47dbdd166d75873c85d12a27b9cdd7f68d3ef1", "version": "0.4", "port-version": 0 } diff --git a/versions/x-/x11.json b/versions/x-/x11.json index af15d32c29ec1d..fba8ec64c59eca 100644 --- a/versions/x-/x11.json +++ b/versions/x-/x11.json @@ -1,8 +1,8 @@ { "versions": [ { - "git-tree": "b58bf936b9722c749d0db33fc30164e4c153786e", - "version-semver": "1.6.9", + "git-tree": "4609420afc21371fbde18aeb5a4a3d5a9c80dc07", + "version": "1.6.9", "port-version": 0 } ] diff --git a/versions/x-/xau.json b/versions/x-/xau.json index c0f64a8692c2f9..a6130baee0f2ea 100644 --- a/versions/x-/xau.json +++ b/versions/x-/xau.json @@ -1,8 +1,8 @@ { "versions": [ { - "git-tree": "cd068ed347c0a24a6e5f95144d600fcbad984888", - "version-semver": "1.0.9", + "git-tree": "63c290223d683cf4f6d712df5daf1534981000c4", + "version": "1.0.9", "port-version": 0 } ] diff --git a/versions/x-/xcb-proto.json b/versions/x-/xcb-proto.json index b10ab926d58f52..a4515f1bb57d0a 100644 --- a/versions/x-/xcb-proto.json +++ b/versions/x-/xcb-proto.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "ec8f478736cb1ae7d47bd420b5e2c8aff0a05419", + "git-tree": "c5e0c123a4e4532da2f2a0d83b9f4bd38997a885", "version": "1.14.1", "port-version": 0 } diff --git a/versions/x-/xcb-util-m4.json b/versions/x-/xcb-util-m4.json index 8fc174d13e02ff..12fd8edacfa320 100644 --- a/versions/x-/xcb-util-m4.json +++ b/versions/x-/xcb-util-m4.json @@ -1,8 +1,8 @@ { "versions": [ { - "git-tree": "f5617ff04d96f3348f64f8794c6c9e41ade43d50", - "version-string": "1", + "git-tree": "1801687ef4c9b6d53ece284c7ae67d7c40bd0840", + "version-date": "2022-01-24", "port-version": 0 } ] diff --git a/versions/x-/xcb.json b/versions/x-/xcb.json index c8480f5b344a59..c9b7199fe6099d 100644 --- a/versions/x-/xcb.json +++ b/versions/x-/xcb.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "335348f7134942bd9e6684e6953742e539a0bcdb", + "git-tree": "1441e8e91044348d36709e9c97575720a5755f71", "version": "1.14", "port-version": 0 } diff --git a/versions/x-/xdmcp.json b/versions/x-/xdmcp.json index 667302f3982fc1..5ab73c6a35d4af 100644 --- a/versions/x-/xdmcp.json +++ b/versions/x-/xdmcp.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "b7c0329ad3cdfbb5061d46130e5e80771b89a466", + "git-tree": "ac3c5bc624ed8013ab084c21efccf780af381a3e", "version": "1.1.3", "port-version": 0 } diff --git a/versions/x-/xlib.json b/versions/x-/xlib.json index ba821af1429099..f81ae9890d3147 100644 --- a/versions/x-/xlib.json +++ b/versions/x-/xlib.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "a8909b0df9c9e8cb2f6ed7161a4e26bbdd831912", + "git-tree": "95d832e6f8625a8f6f23ffb1e9197f21a21e9aa9", "version": "1.7.3.1", "port-version": 0 } diff --git a/versions/x-/xorg-macros.json b/versions/x-/xorg-macros.json index 0487319b33de2c..380c4deecf3c66 100644 --- a/versions/x-/xorg-macros.json +++ b/versions/x-/xorg-macros.json @@ -1,8 +1,8 @@ { "versions": [ { - "git-tree": "9cb231d0ac80bdf86f3c8265fd804406ce0d6f4a", - "version-semver": "1.19.3", + "git-tree": "ba40376574cc6bb060a3a72d38933a36751bb677", + "version": "1.19.3", "port-version": 0 } ] diff --git a/versions/x-/xproto.json b/versions/x-/xproto.json index 79056592ccaf59..5c40992cae2e2f 100644 --- a/versions/x-/xproto.json +++ b/versions/x-/xproto.json @@ -1,8 +1,8 @@ { "versions": [ { - "git-tree": "0240964997bc22023864ac26034a8efad1998275", - "version-string": "2021.5", + "git-tree": "9274b15cd3f3df8c1c3235e28fe9be11d614718a", + "version": "2021.5", "port-version": 0 } ] diff --git a/versions/x-/xtrans.json b/versions/x-/xtrans.json index 4cfa7b61d93f11..8ec4f3778040b9 100644 --- a/versions/x-/xtrans.json +++ b/versions/x-/xtrans.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "c595faed191fcfa0e11a2e74a11aef51663f25cf", + "git-tree": "30dac93c712086475cd46eaee7f4dd6da55e305f", "version": "1.4.0", "port-version": 0 } From 65338c5c3f9776e952b39a7924e0f260dfe364c3 Mon Sep 17 00:00:00 2001 From: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> Date: Sat, 9 Jul 2022 22:16:33 +0200 Subject: [PATCH 22/37] remove unnecessary comments --- ports/xorg-macros/skip_rawcpp.patch | 34 +---------------------------- 1 file changed, 1 insertion(+), 33 deletions(-) diff --git a/ports/xorg-macros/skip_rawcpp.patch b/ports/xorg-macros/skip_rawcpp.patch index 76f76493bb603e..3e5ce9a7e77141 100644 --- a/ports/xorg-macros/skip_rawcpp.patch +++ b/ports/xorg-macros/skip_rawcpp.patch @@ -2,7 +2,7 @@ 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,38 @@ AC_PATH_TOOL(RAWCPP, [cpp], [${CPP}], +@@ -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. @@ -38,38 +38,6 @@ index f0a16da3a..e1c0ff1ed 100644 - fi -fi -rm -f conftest.$ac_ext -+# 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 From 1487910ffc2b08525eaa20a4582b56304e393971 Mon Sep 17 00:00:00 2001 From: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> Date: Sat, 9 Jul 2022 22:17:02 +0200 Subject: [PATCH 23/37] v db --- versions/x-/xorg-macros.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/x-/xorg-macros.json b/versions/x-/xorg-macros.json index 380c4deecf3c66..317600ff387488 100644 --- a/versions/x-/xorg-macros.json +++ b/versions/x-/xorg-macros.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "ba40376574cc6bb060a3a72d38933a36751bb677", + "git-tree": "b91f2f04e4d48e77d57830d99402b31b9c3da3a6", "version": "1.19.3", "port-version": 0 } From b1f2a398df008ff7886bb210c3eeaa1e4c841bd2 Mon Sep 17 00:00:00 2001 From: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> Date: Sat, 6 Aug 2022 14:15:54 +0200 Subject: [PATCH 24/37] Apply suggestions from code review Co-authored-by: Billy O'Neal --- ports/dbus/portfile.cmake | 12 ++++++------ ports/xcb-proto/portfile.cmake | 4 +--- ports/xcb-util-m4/portfile.cmake | 2 +- ports/xcb/portfile.cmake | 2 +- ports/xlib/portfile.cmake | 4 ++-- ports/xorg-macros/portfile.cmake | 2 +- ports/xproto/portfile.cmake | 2 +- ports/xtrans/portfile.cmake | 6 +++--- 8 files changed, 16 insertions(+), 18 deletions(-) diff --git a/ports/dbus/portfile.cmake b/ports/dbus/portfile.cmake index f4cc33f9e1e234..26819c6bb8fd65 100644 --- a/ports/dbus/portfile.cmake +++ b/ports/dbus/portfile.cmake @@ -4,9 +4,9 @@ vcpkg_from_gitlab( REPO dbus/dbus REF c91ca6edad658274607323a438eea7c7c6c5e392 #1.13.18 SHA512 4dd4d369152591040ebe9f474a0ba8911d8a91546d64b1d6f7335b7fd8026bd99a8a4fe1c78b80eb2e31e9e58324d432857e2a7af1d1cb950d22b4430cc0f7ac - HEAD_REF master # branch name + HEAD_REF master PATCHES - cmake.dep.patch #patch name + cmake.dep.patch rt_pc_link.patch pkgconfig.patch getpeereid.patch # missing check from configure.ac @@ -32,7 +32,7 @@ vcpkg_cmake_configure( ) vcpkg_cmake_install() vcpkg_copy_pdbs() -vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/DBus1") +vcpkg_cmake_config_fixup(PACKAGE_NAME "DBus1" CONFIG_PATH "lib/cmake/DBus1") vcpkg_fixup_pkgconfig() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") @@ -50,10 +50,10 @@ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/var/" file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}") set(TOOLS daemon launch monitor run-session send test-tool update-activation-environment) -if(NOT VCPKG_TARGET_IS_WINDOWS) - list(APPEND TOOLS cleanup-sockets uuidgen) -else() +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) diff --git a/ports/xcb-proto/portfile.cmake b/ports/xcb-proto/portfile.cmake index 282ff0028bcf7f..8927d2a8d4caf6 100644 --- a/ports/xcb-proto/portfile.cmake +++ b/ports/xcb-proto/portfile.cmake @@ -13,7 +13,6 @@ 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}") -#(also requires python2?) vcpkg_find_acquire_program(PYTHON3) get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY) @@ -27,7 +26,7 @@ vcpkg_from_gitlab( REPO proto/xcbproto REF 70ca65fa35c3760661b090bc4b2601daa7a099b8 #v1.14.1 + patches SHA512 9e08e1d2ab1fe7a8d3985568918a858ddfb31b8016ccac8ea2447631e7cede3bcc7b1ed86491d497ab871674c9b55d94fab25ee13ff6de9a44590b91d9166fda - HEAD_REF master # branch name + HEAD_REF master ) set(ENV{ACLOCAL} "aclocal -I \"${CURRENT_INSTALLED_DIR}/share/xorg/aclocal/\"") @@ -46,6 +45,5 @@ vcpkg_fixup_pkgconfig() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") -# Handle copyright file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) endif() diff --git a/ports/xcb-util-m4/portfile.cmake b/ports/xcb-util-m4/portfile.cmake index 2826a79fb1d276..f38f1027eb228e 100644 --- a/ports/xcb-util-m4/portfile.cmake +++ b/ports/xcb-util-m4/portfile.cmake @@ -6,7 +6,7 @@ vcpkg_from_gitlab( REPO util/xcb-util-m4 REF f662e3a93ebdec3d1c9374382dcc070093a42fed #v1.19.2 SHA512 29840da449a434f169437fd2cef78273e0cba00a7f76d48790c838dc8f40fe55cb0932d96b649e1bd066c6c5e257dd2d9d71c663ce100aa5ca25a2ccec1b7e77 - HEAD_REF master # branch name + HEAD_REF master ) file(GLOB_RECURSE M4_FILES "${SOURCE_PATH}/*.m4") diff --git a/ports/xcb/portfile.cmake b/ports/xcb/portfile.cmake index eccb1ac5cb1955..fa466623bf09d2 100644 --- a/ports/xcb/portfile.cmake +++ b/ports/xcb/portfile.cmake @@ -65,7 +65,7 @@ vcpkg_fixup_pkgconfig() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") -# # Handle copyright +# 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) diff --git a/ports/xlib/portfile.cmake b/ports/xlib/portfile.cmake index 2014ae5174aced..46f742dede51d7 100644 --- a/ports/xlib/portfile.cmake +++ b/ports/xlib/portfile.cmake @@ -13,8 +13,8 @@ vcpkg_from_gitlab( REPO lib/libx11 REF 4c96f3567a8d045ee57b886fddc9618b71282530 #x11 v 1.7.3.1 SHA512 15c55b6283aec363f6af5b549584d487ec5a8c0f74b95dc44674ff50764abe5b9fa216e2af3c5408faf12d17b04e9433f0ad66da6e32a0dfef0427ca131ef23b - HEAD_REF master # branch name - PATCHES cl.build.patch #patch name + HEAD_REF master + PATCHES cl.build.patch io_include.patch ${PATCHES} vcxserver.patch diff --git a/ports/xorg-macros/portfile.cmake b/ports/xorg-macros/portfile.cmake index 7adf44639dacce..75bdc7e35d753d 100644 --- a/ports/xorg-macros/portfile.cmake +++ b/ports/xorg-macros/portfile.cmake @@ -15,7 +15,7 @@ vcpkg_from_gitlab( REPO util/macros REF b8766308d2f78bc572abe5198007cf7aeec9b761 #v1.19.3 SHA512 dc7383b1579dc6ef0473161764096c8161f23a4c4ba2182e7abd7f73f443eb0520e02f1dfaaba2f8ebb43e0ed93c1e6e5e7cf517561476b858d2471a8ecaf907 - HEAD_REF master # branch name + HEAD_REF master PATCHES ${PATCHES} ) diff --git a/ports/xproto/portfile.cmake b/ports/xproto/portfile.cmake index e827477ae92658..cbd581b8a599e1 100644 --- a/ports/xproto/portfile.cmake +++ b/ports/xproto/portfile.cmake @@ -20,7 +20,7 @@ vcpkg_from_gitlab( REPO proto/xorgproto REF 57acac1d4c7967f4661fb1c9f86f48f34a46c48d # 2021.5 SHA512 5d2b6096e7f6ec6a3414f4370da583f6660fbd287474e8b4cd3e51ccc35514181352d3b0b9cd4b8d6e30de7b54f4ce01a9fbf17be75cf8de18aa28e9f774b8c4 - HEAD_REF master # branch name + HEAD_REF master PATCHES upstream-1.patch ${PATCHES} diff --git a/ports/xtrans/portfile.cmake b/ports/xtrans/portfile.cmake index bb28aad15ba5a0..4c906e99cc79c6 100644 --- a/ports/xtrans/portfile.cmake +++ b/ports/xtrans/portfile.cmake @@ -11,7 +11,7 @@ vcpkg_from_gitlab( REPO lib/libxtrans REF 3b5df889f58a99980a35a7b4a18eb4e7d2abeac4 #v1.4 SHA512 d1a1ecd8aa07d19a8b4936a37109cecd0c965b859a17ea838835230f9326c1a353feef388052df03173562cbf0f3e3764146c3669b1928698cd55ccc4f92992c - HEAD_REF master # branch name + HEAD_REF master PATCHES win32.patch symbols.patch ) @@ -23,8 +23,8 @@ vcpkg_configure_make( ) vcpkg_install_make() -file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/xorg/") -file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/${PORT}/") +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") From 6ca0394d29ae6adb422e975415b680f47f6994df Mon Sep 17 00:00:00 2001 From: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> Date: Sat, 6 Aug 2022 14:34:59 +0200 Subject: [PATCH 25/37] nitpicks --- ports/dbus/portfile.cmake | 2 +- ports/pthread-stubs/portfile.cmake | 7 +++---- ports/xcb/portfile.cmake | 2 +- ports/xdmcp/portfile.cmake | 4 ++-- ports/xproto/portfile.cmake | 2 +- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/ports/dbus/portfile.cmake b/ports/dbus/portfile.cmake index 26819c6bb8fd65..a4be54ff661fb3 100644 --- a/ports/dbus/portfile.cmake +++ b/ports/dbus/portfile.cmake @@ -38,7 +38,7 @@ vcpkg_fixup_pkgconfig() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") -# # Handle copyright +# Handle copyright file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/var/" diff --git a/ports/pthread-stubs/portfile.cmake b/ports/pthread-stubs/portfile.cmake index cb3e17913eec33..10f0df6955f621 100644 --- a/ports/pthread-stubs/portfile.cmake +++ b/ports/pthread-stubs/portfile.cmake @@ -5,9 +5,8 @@ vcpkg_from_gitlab( REPO lib/pthread-stubs REF 50f0755a7f894acae168f19c66e52a3f139ca4ec # 0.4.0 SHA512 15fcb2144a8abb7b9b1b8f6d9732759351268fb440c7a59380b0ca6ddf48b74a37ce5afbf777ce58fc1993df0c8d6ffb82e452800ce2fcaf16edcbcc1750e338 - HEAD_REF master # branch name -) - + HEAD_REF master +) vcpkg_configure_make( SOURCE_PATH "${SOURCE_PATH}" @@ -20,7 +19,7 @@ vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES pthread) file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") -# # Handle copyright +# 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") diff --git a/ports/xcb/portfile.cmake b/ports/xcb/portfile.cmake index fa466623bf09d2..a8fcbd51311e38 100644 --- a/ports/xcb/portfile.cmake +++ b/ports/xcb/portfile.cmake @@ -9,7 +9,7 @@ vcpkg_from_gitlab( REPO lib/libxcb REF ddafdba11f6919e6fcf977c09c78b06f94de47aa #v1.14 + some patches SHA512 d8382b04f2b00671cded9e22d6066164511ee4c08e2cf5de4ec28d09e41228e30d3ba7d0e6b5141abf4e4bc777aa662fe9d1d04f3e1e26e0b323549e845c8072 - HEAD_REF master # branch name + 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 diff --git a/ports/xdmcp/portfile.cmake b/ports/xdmcp/portfile.cmake index a85716e30338ed..a48b84dee3aaed 100644 --- a/ports/xdmcp/portfile.cmake +++ b/ports/xdmcp/portfile.cmake @@ -9,8 +9,8 @@ vcpkg_from_gitlab( REPO lib/libxdmcp REF 618b3ba5f826d930df2ca6a6a0ce212fa75cef42 # 1.1.3 SHA512 f8b035fa95f6948cc6bac69bfcc33498cd65db73c62aadee714bce371d61c50f283c45d1a3f43397a96b3c956b41dfe94355e94e33764760b29bf98ba8dfebe2 - HEAD_REF master # branch name - PATCHES configure.ac.patch #patch name + HEAD_REF master + PATCHES configure.ac.patch ) set(ENV{ACLOCAL} "aclocal -I \"${CURRENT_INSTALLED_DIR}/share/xorg/aclocal/\"") diff --git a/ports/xproto/portfile.cmake b/ports/xproto/portfile.cmake index cbd581b8a599e1..04f18fc5d3d36a 100644 --- a/ports/xproto/portfile.cmake +++ b/ports/xproto/portfile.cmake @@ -30,7 +30,7 @@ vcpkg_configure_meson(SOURCE_PATH "${SOURCE_PATH}" OPTIONS "-Dlegacy=true") vcpkg_install_meson() -# To make CMake consumption easier. +# 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") From b96b22a64d88cd6518b220e0a0bcf5f4c65b7fab Mon Sep 17 00:00:00 2001 From: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> Date: Sat, 6 Aug 2022 14:35:23 +0200 Subject: [PATCH 26/37] rename xau to libxau --- ports/{xau => libxau}/portfile.cmake | 6 +++--- ports/{xau => libxau}/vcpkg.json | 2 +- ports/xcb/vcpkg.json | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) rename ports/{xau => libxau}/portfile.cmake (92%) rename ports/{xau => libxau}/vcpkg.json (92%) diff --git a/ports/xau/portfile.cmake b/ports/libxau/portfile.cmake similarity index 92% rename from ports/xau/portfile.cmake rename to ports/libxau/portfile.cmake index cfca554031a194..e745eb6b60876b 100644 --- a/ports/xau/portfile.cmake +++ b/ports/libxau/portfile.cmake @@ -9,7 +9,7 @@ vcpkg_from_gitlab( REPO lib/libxau REF d9443b2c57b512cfb250b35707378654d86c7dea # 1.0.9 SHA512 d46d2be838b8ea7116ee0e312adafa80f6551762b5f7b5e503bd40e74fc0b43b45255e8135d03f831d5c483b98aac992fcd91a7e22119261e76778571a72ef07 - HEAD_REF master # branch name + HEAD_REF master ) set(ENV{ACLOCAL} "aclocal -I \"${CURRENT_INSTALLED_DIR}/share/xorg/aclocal/\"") @@ -26,6 +26,6 @@ vcpkg_fixup_pkgconfig() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") -# # Handle copyright +# Handle copyright file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) -endif() \ No newline at end of file +endif() diff --git a/ports/xau/vcpkg.json b/ports/libxau/vcpkg.json similarity index 92% rename from ports/xau/vcpkg.json rename to ports/libxau/vcpkg.json index ca56309a16e370..f1cbde68d71731 100644 --- a/ports/xau/vcpkg.json +++ b/ports/libxau/vcpkg.json @@ -1,5 +1,5 @@ { - "name": "xau", + "name": "libxau", "version": "1.0.9", "description": "Functions for handling Xauthority files and entries.", "homepage": "https://gitlab.freedesktop.org/xorg/lib/libxau", diff --git a/ports/xcb/vcpkg.json b/ports/xcb/vcpkg.json index 0ec720d3c61f09..591ebb7fa95a3e 100644 --- a/ports/xcb/vcpkg.json +++ b/ports/xcb/vcpkg.json @@ -12,7 +12,7 @@ }, "pthread", "pthread-stubs", - "xau", + "libxau", "xcb-proto", "xcb-util-m4", "xdmcp", From 0739e4c6dd60d9d186118e45a9208f22a874b2c2 Mon Sep 17 00:00:00 2001 From: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> Date: Sat, 6 Aug 2022 15:09:03 +0200 Subject: [PATCH 27/37] use vcpkg_install_copyright and silence usage --- ports/xproto/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/xproto/portfile.cmake b/ports/xproto/portfile.cmake index 04f18fc5d3d36a..87380da9aee29c 100644 --- a/ports/xproto/portfile.cmake +++ b/ports/xproto/portfile.cmake @@ -46,6 +46,6 @@ 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}") -file(TOUCH "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright") - +vcpkg_install_copyright(FILE_LIST ${_files}) +file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" "") endif() From 8288ee07af38843b619539aa909d2f328de03cf6 Mon Sep 17 00:00:00 2001 From: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> Date: Sat, 6 Aug 2022 15:09:13 +0200 Subject: [PATCH 28/37] xtrans silence usage --- ports/xtrans/portfile.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/xtrans/portfile.cmake b/ports/xtrans/portfile.cmake index 4c906e99cc79c6..e7e726e0628f10 100644 --- a/ports/xtrans/portfile.cmake +++ b/ports/xtrans/portfile.cmake @@ -60,4 +60,5 @@ 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() From 634fe050e88fd238c52ee309c7089159315b245b Mon Sep 17 00:00:00 2001 From: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> Date: Sat, 6 Aug 2022 15:09:59 +0200 Subject: [PATCH 29/37] format-manifest --- ports/xcb/vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/xcb/vcpkg.json b/ports/xcb/vcpkg.json index 591ebb7fa95a3e..d4b8b524c55c93 100644 --- a/ports/xcb/vcpkg.json +++ b/ports/xcb/vcpkg.json @@ -6,13 +6,13 @@ "license": "X11-distribute-modifications-variant", "dependencies": [ "bzip2", + "libxau", { "name": "libxslt", "host": true }, "pthread", "pthread-stubs", - "libxau", "xcb-proto", "xcb-util-m4", "xdmcp", From 6aee76ef8dcdf3595d5e2b0df8cedfec35ee684a Mon Sep 17 00:00:00 2001 From: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> Date: Sat, 6 Aug 2022 15:10:46 +0200 Subject: [PATCH 30/37] v db --- versions/baseline.json | 8 ++++---- versions/d-/dbus.json | 2 +- versions/{x-/xau.json => l-/libxau.json} | 2 +- versions/p-/pthread-stubs.json | 2 +- versions/x-/xcb-proto.json | 2 +- versions/x-/xcb-util-m4.json | 2 +- versions/x-/xcb.json | 2 +- versions/x-/xdmcp.json | 2 +- versions/x-/xlib.json | 2 +- versions/x-/xorg-macros.json | 2 +- versions/x-/xproto.json | 2 +- versions/x-/xtrans.json | 2 +- 12 files changed, 15 insertions(+), 15 deletions(-) rename versions/{x-/xau.json => l-/libxau.json} (58%) diff --git a/versions/baseline.json b/versions/baseline.json index 6cdc5a50ac334e..85a03ab979a2ec 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4264,6 +4264,10 @@ "baseline": "4.3.0", "port-version": 3 }, + "libxau": { + "baseline": "1.0.9", + "port-version": 0 + }, "libxdiff": { "baseline": "0.23", "port-version": 2 @@ -7720,10 +7724,6 @@ "baseline": "1.12", "port-version": 1 }, - "xau": { - "baseline": "1.0.9", - "port-version": 0 - }, "xaudio2redist": { "baseline": "1.2.9", "port-version": 0 diff --git a/versions/d-/dbus.json b/versions/d-/dbus.json index 748581763a8814..60d7d49b0746b4 100644 --- a/versions/d-/dbus.json +++ b/versions/d-/dbus.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "52b32e9d4b656c3ff79cf7e0519005df0f9d00a9", + "git-tree": "e50673fe28f8ad5f700b3c9a45628955fccb3976", "version": "1.13.18", "port-version": 0 } diff --git a/versions/x-/xau.json b/versions/l-/libxau.json similarity index 58% rename from versions/x-/xau.json rename to versions/l-/libxau.json index a6130baee0f2ea..85719192bd6fa1 100644 --- a/versions/x-/xau.json +++ b/versions/l-/libxau.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "63c290223d683cf4f6d712df5daf1534981000c4", + "git-tree": "d82d4195d09a023e7a7fbc1c3a726a2f9f917a33", "version": "1.0.9", "port-version": 0 } diff --git a/versions/p-/pthread-stubs.json b/versions/p-/pthread-stubs.json index d61ae5adb6e4b4..395c6164ded630 100644 --- a/versions/p-/pthread-stubs.json +++ b/versions/p-/pthread-stubs.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "0a47dbdd166d75873c85d12a27b9cdd7f68d3ef1", + "git-tree": "4d74216d737ed231dafb8c53f2617ce7836d96fa", "version": "0.4", "port-version": 0 } diff --git a/versions/x-/xcb-proto.json b/versions/x-/xcb-proto.json index a4515f1bb57d0a..569588968056df 100644 --- a/versions/x-/xcb-proto.json +++ b/versions/x-/xcb-proto.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "c5e0c123a4e4532da2f2a0d83b9f4bd38997a885", + "git-tree": "fa0f9e187bc162cbdb9c753f329d61f2a46fd966", "version": "1.14.1", "port-version": 0 } diff --git a/versions/x-/xcb-util-m4.json b/versions/x-/xcb-util-m4.json index 12fd8edacfa320..45f1929e4e911e 100644 --- a/versions/x-/xcb-util-m4.json +++ b/versions/x-/xcb-util-m4.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "1801687ef4c9b6d53ece284c7ae67d7c40bd0840", + "git-tree": "3d9a0f48392c4845b152c9dfdfa702f9f0a932d9", "version-date": "2022-01-24", "port-version": 0 } diff --git a/versions/x-/xcb.json b/versions/x-/xcb.json index c9b7199fe6099d..bdcfd62f7519e5 100644 --- a/versions/x-/xcb.json +++ b/versions/x-/xcb.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "1441e8e91044348d36709e9c97575720a5755f71", + "git-tree": "2fa01c94b939d83f81768eab525c95377db4e240", "version": "1.14", "port-version": 0 } diff --git a/versions/x-/xdmcp.json b/versions/x-/xdmcp.json index 5ab73c6a35d4af..6fe63a793632a4 100644 --- a/versions/x-/xdmcp.json +++ b/versions/x-/xdmcp.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "ac3c5bc624ed8013ab084c21efccf780af381a3e", + "git-tree": "d977bac07099d42d6f2d24fbb5bbb427c5a6ceff", "version": "1.1.3", "port-version": 0 } diff --git a/versions/x-/xlib.json b/versions/x-/xlib.json index f81ae9890d3147..01ee177ca68646 100644 --- a/versions/x-/xlib.json +++ b/versions/x-/xlib.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "95d832e6f8625a8f6f23ffb1e9197f21a21e9aa9", + "git-tree": "72ea35d939b075480a01e2d4ae9693e95026c100", "version": "1.7.3.1", "port-version": 0 } diff --git a/versions/x-/xorg-macros.json b/versions/x-/xorg-macros.json index 317600ff387488..7949953a65ce60 100644 --- a/versions/x-/xorg-macros.json +++ b/versions/x-/xorg-macros.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "b91f2f04e4d48e77d57830d99402b31b9c3da3a6", + "git-tree": "28413ebd70e13a7e84bd062f678fc3583bd35baa", "version": "1.19.3", "port-version": 0 } diff --git a/versions/x-/xproto.json b/versions/x-/xproto.json index 5c40992cae2e2f..e4e8d7daf383cd 100644 --- a/versions/x-/xproto.json +++ b/versions/x-/xproto.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "9274b15cd3f3df8c1c3235e28fe9be11d614718a", + "git-tree": "707be677dc8929167ad434402cd6ae8678e2bffc", "version": "2021.5", "port-version": 0 } diff --git a/versions/x-/xtrans.json b/versions/x-/xtrans.json index 8ec4f3778040b9..6cf212047dab7a 100644 --- a/versions/x-/xtrans.json +++ b/versions/x-/xtrans.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "30dac93c712086475cd46eaee7f4dd6da55e305f", + "git-tree": "130f926645ddd311c404323a38593038b6c54d99", "version": "1.4.0", "port-version": 0 } From 6d7ae3f96fb9628e62ecad2c357c58ac7281730f Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 11 Aug 2022 21:23:37 +0200 Subject: [PATCH 31/37] make license null for ports without exact match --- ports/xcb-proto/vcpkg.json | 2 +- ports/xorg-macros/vcpkg.json | 2 +- ports/xtrans/vcpkg.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/xcb-proto/vcpkg.json b/ports/xcb-proto/vcpkg.json index 33ef8bca6bb79f..0f285d781eeaf9 100644 --- a/ports/xcb-proto/vcpkg.json +++ b/ports/xcb-proto/vcpkg.json @@ -3,7 +3,7 @@ "version": "1.14.1", "description": "XML-XCB protocol descriptions used by libxcb for the X11 protocol & extensions", "homepage": "https://xcb.freedesktop.org/", - "license": "X11-distribute-modifications-variant", + "license": null, "dependencies": [ "bzip2", { diff --git a/ports/xorg-macros/vcpkg.json b/ports/xorg-macros/vcpkg.json index a5e93e2538e639..4da7766849e00d 100644 --- a/ports/xorg-macros/vcpkg.json +++ b/ports/xorg-macros/vcpkg.json @@ -3,6 +3,6 @@ "version": "1.19.3", "description": "X.org macros utilities.", "homepage": "https://xcb.freedesktop.org/", - "license": "MIT", + "license": null, "supports": "!uwp" } diff --git a/ports/xtrans/vcpkg.json b/ports/xtrans/vcpkg.json index 377d72e5688009..151d527b8c138c 100644 --- a/ports/xtrans/vcpkg.json +++ b/ports/xtrans/vcpkg.json @@ -3,7 +3,7 @@ "version": "1.4.0", "description": "xtrans - X Network Transport layer shared code", "homepage": "https://gitlab.freedesktop.org/xorg/lib/libxtrans", - "license": "MIT-open-group", + "license": null, "dependencies": [ "xorg-macros" ] From b5ea1004aba11511a840cd024ec02139c964c307 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 11 Aug 2022 21:24:16 +0200 Subject: [PATCH 32/37] xdmcp rename to libxdmcp --- ports/{xdmcp => libxdmcp}/configure.ac.patch | 0 ports/{xdmcp => libxdmcp}/portfile.cmake | 0 ports/{xdmcp => libxdmcp}/vcpkg.json | 2 +- ports/xcb/vcpkg.json | 2 +- 4 files changed, 2 insertions(+), 2 deletions(-) rename ports/{xdmcp => libxdmcp}/configure.ac.patch (100%) rename ports/{xdmcp => libxdmcp}/portfile.cmake (100%) rename ports/{xdmcp => libxdmcp}/vcpkg.json (92%) diff --git a/ports/xdmcp/configure.ac.patch b/ports/libxdmcp/configure.ac.patch similarity index 100% rename from ports/xdmcp/configure.ac.patch rename to ports/libxdmcp/configure.ac.patch diff --git a/ports/xdmcp/portfile.cmake b/ports/libxdmcp/portfile.cmake similarity index 100% rename from ports/xdmcp/portfile.cmake rename to ports/libxdmcp/portfile.cmake diff --git a/ports/xdmcp/vcpkg.json b/ports/libxdmcp/vcpkg.json similarity index 92% rename from ports/xdmcp/vcpkg.json rename to ports/libxdmcp/vcpkg.json index 234ff29adff302..a2a977cbe16853 100644 --- a/ports/xdmcp/vcpkg.json +++ b/ports/libxdmcp/vcpkg.json @@ -1,5 +1,5 @@ { - "name": "xdmcp", + "name": "libxdmcp", "version": "1.1.3", "description": "X Display Manager Control Protocol library", "homepage": "https://gitlab.freedesktop.org/xorg/lib/libxdmcp", diff --git a/ports/xcb/vcpkg.json b/ports/xcb/vcpkg.json index d4b8b524c55c93..cc87d4357fe5fd 100644 --- a/ports/xcb/vcpkg.json +++ b/ports/xcb/vcpkg.json @@ -7,6 +7,7 @@ "dependencies": [ "bzip2", "libxau", + "libxdmcp", { "name": "libxslt", "host": true @@ -15,7 +16,6 @@ "pthread-stubs", "xcb-proto", "xcb-util-m4", - "xdmcp", "xorg-macros", "xproto" ] From 1088d6c62dc01f221270a8e0013b5fae6c4adeb8 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 11 Aug 2022 21:25:02 +0200 Subject: [PATCH 33/37] merge x11 wrapper into xlib rename xlib to libx11 to avoid a metaport --- ports/{xlib => libx11}/cl.build.patch | 0 ports/{xlib => libx11}/dllimport.patch | 0 ports/{xlib => libx11}/io_include.patch | 0 ports/{xlib => libx11}/portfile.cmake | 4 ++++ ports/{x11 => libx11}/vcpkg-cmake-wrapper.cmake | 0 ports/{xlib => libx11}/vcpkg.json | 2 +- ports/{xlib => libx11}/vcxserver.patch | 0 ports/x11/portfile.cmake | 3 --- ports/x11/vcpkg.json | 10 ---------- 9 files changed, 5 insertions(+), 14 deletions(-) rename ports/{xlib => libx11}/cl.build.patch (100%) rename ports/{xlib => libx11}/dllimport.patch (100%) rename ports/{xlib => libx11}/io_include.patch (100%) rename ports/{xlib => libx11}/portfile.cmake (92%) rename ports/{x11 => libx11}/vcpkg-cmake-wrapper.cmake (100%) rename ports/{xlib => libx11}/vcpkg.json (94%) rename ports/{xlib => libx11}/vcxserver.patch (100%) delete mode 100644 ports/x11/portfile.cmake delete mode 100644 ports/x11/vcpkg.json diff --git a/ports/xlib/cl.build.patch b/ports/libx11/cl.build.patch similarity index 100% rename from ports/xlib/cl.build.patch rename to ports/libx11/cl.build.patch diff --git a/ports/xlib/dllimport.patch b/ports/libx11/dllimport.patch similarity index 100% rename from ports/xlib/dllimport.patch rename to ports/libx11/dllimport.patch diff --git a/ports/xlib/io_include.patch b/ports/libx11/io_include.patch similarity index 100% rename from ports/xlib/io_include.patch rename to ports/libx11/io_include.patch diff --git a/ports/xlib/portfile.cmake b/ports/libx11/portfile.cmake similarity index 92% rename from ports/xlib/portfile.cmake rename to ports/libx11/portfile.cmake index 46f742dede51d7..52449bbe530993 100644 --- a/ports/xlib/portfile.cmake +++ b/ports/libx11/portfile.cmake @@ -74,3 +74,7 @@ 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) \ No newline at end of file diff --git a/ports/x11/vcpkg-cmake-wrapper.cmake b/ports/libx11/vcpkg-cmake-wrapper.cmake similarity index 100% rename from ports/x11/vcpkg-cmake-wrapper.cmake rename to ports/libx11/vcpkg-cmake-wrapper.cmake diff --git a/ports/xlib/vcpkg.json b/ports/libx11/vcpkg.json similarity index 94% rename from ports/xlib/vcpkg.json rename to ports/libx11/vcpkg.json index 3f4e2d9f78d5d2..4f68d076b46e20 100644 --- a/ports/xlib/vcpkg.json +++ b/ports/libx11/vcpkg.json @@ -1,5 +1,5 @@ { - "name": "xlib", + "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/", diff --git a/ports/xlib/vcxserver.patch b/ports/libx11/vcxserver.patch similarity index 100% rename from ports/xlib/vcxserver.patch rename to ports/libx11/vcxserver.patch diff --git a/ports/x11/portfile.cmake b/ports/x11/portfile.cmake deleted file mode 100644 index 8bbaf0bbe4514f..00000000000000 --- a/ports/x11/portfile.cmake +++ /dev/null @@ -1,3 +0,0 @@ -set(VCPKG_POLICY_EMPTY_PACKAGE enabled) -configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" - "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY) \ No newline at end of file diff --git a/ports/x11/vcpkg.json b/ports/x11/vcpkg.json deleted file mode 100644 index d5abba9b230802..00000000000000 --- a/ports/x11/vcpkg.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "x11", - "version": "1.6.9", - "description": "The X Window System is a network-transparent window system that was designed at MIT.", - "homepage": "https://www.x.org/wiki/", - "license": null, - "dependencies": [ - "xlib" - ] -} From 3de1318bb3aefecf369e547137a380e92fe81178 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 11 Aug 2022 21:27:18 +0200 Subject: [PATCH 34/37] v db --- versions/baseline.json | 20 ++++++++------------ versions/{x-/xlib.json => l-/libx11.json} | 2 +- versions/{x-/xdmcp.json => l-/libxdmcp.json} | 2 +- versions/x-/x11.json | 9 --------- versions/x-/xcb-proto.json | 2 +- versions/x-/xcb.json | 2 +- versions/x-/xorg-macros.json | 2 +- versions/x-/xtrans.json | 2 +- 8 files changed, 14 insertions(+), 27 deletions(-) rename versions/{x-/xlib.json => l-/libx11.json} (58%) rename versions/{x-/xdmcp.json => l-/libxdmcp.json} (58%) delete mode 100644 versions/x-/x11.json diff --git a/versions/baseline.json b/versions/baseline.json index b3f925dbdf2484..edf8c435decfa3 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4264,6 +4264,10 @@ "baseline": "4.3.0", "port-version": 3 }, + "libx11": { + "baseline": "1.7.3.1", + "port-version": 0 + }, "libxau": { "baseline": "1.0.9", "port-version": 0 @@ -4272,6 +4276,10 @@ "baseline": "0.23", "port-version": 2 }, + "libxdmcp": { + "baseline": "1.1.3", + "port-version": 0 + }, "libxlsxwriter": { "baseline": "1.1.4", "port-version": 0 @@ -7708,10 +7716,6 @@ "baseline": "3.0.3", "port-version": 1 }, - "x11": { - "baseline": "1.6.9", - "port-version": 0 - }, "x264": { "baseline": "164-5db6aa6cab1b146", "port-version": 4 @@ -7744,10 +7748,6 @@ "baseline": "2022-01-24", "port-version": 0 }, - "xdmcp": { - "baseline": "1.1.3", - "port-version": 0 - }, "xerces-c": { "baseline": "3.2.3", "port-version": 4 @@ -7760,10 +7760,6 @@ "baseline": "0.3.0", "port-version": 1 }, - "xlib": { - "baseline": "1.7.3.1", - "port-version": 0 - }, "xlnt": { "baseline": "1.5.0", "port-version": 4 diff --git a/versions/x-/xlib.json b/versions/l-/libx11.json similarity index 58% rename from versions/x-/xlib.json rename to versions/l-/libx11.json index 01ee177ca68646..fe64a753250d6b 100644 --- a/versions/x-/xlib.json +++ b/versions/l-/libx11.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "72ea35d939b075480a01e2d4ae9693e95026c100", + "git-tree": "1347521fb39c2ccfd11521a3e641854537799ca4", "version": "1.7.3.1", "port-version": 0 } diff --git a/versions/x-/xdmcp.json b/versions/l-/libxdmcp.json similarity index 58% rename from versions/x-/xdmcp.json rename to versions/l-/libxdmcp.json index 6fe63a793632a4..2121b322ba7522 100644 --- a/versions/x-/xdmcp.json +++ b/versions/l-/libxdmcp.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "d977bac07099d42d6f2d24fbb5bbb427c5a6ceff", + "git-tree": "eddca1f6d162a3947f167d35c21ca40de9904307", "version": "1.1.3", "port-version": 0 } diff --git a/versions/x-/x11.json b/versions/x-/x11.json deleted file mode 100644 index fba8ec64c59eca..00000000000000 --- a/versions/x-/x11.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "versions": [ - { - "git-tree": "4609420afc21371fbde18aeb5a4a3d5a9c80dc07", - "version": "1.6.9", - "port-version": 0 - } - ] -} diff --git a/versions/x-/xcb-proto.json b/versions/x-/xcb-proto.json index 569588968056df..20e240c6086729 100644 --- a/versions/x-/xcb-proto.json +++ b/versions/x-/xcb-proto.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "fa0f9e187bc162cbdb9c753f329d61f2a46fd966", + "git-tree": "e5933d2463549d6d3b00a8aa1f0279f2a974ec1c", "version": "1.14.1", "port-version": 0 } diff --git a/versions/x-/xcb.json b/versions/x-/xcb.json index bdcfd62f7519e5..29168c9ce98dbd 100644 --- a/versions/x-/xcb.json +++ b/versions/x-/xcb.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "2fa01c94b939d83f81768eab525c95377db4e240", + "git-tree": "7af3e0f5bc8377ca950f83d3a0bdbb8cc40026aa", "version": "1.14", "port-version": 0 } diff --git a/versions/x-/xorg-macros.json b/versions/x-/xorg-macros.json index 7949953a65ce60..66137c08e43631 100644 --- a/versions/x-/xorg-macros.json +++ b/versions/x-/xorg-macros.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "28413ebd70e13a7e84bd062f678fc3583bd35baa", + "git-tree": "76db60fb182a4c33faabfb411e1842428ae4c8ad", "version": "1.19.3", "port-version": 0 } diff --git a/versions/x-/xtrans.json b/versions/x-/xtrans.json index 6cf212047dab7a..5c6c6557a2b3e4 100644 --- a/versions/x-/xtrans.json +++ b/versions/x-/xtrans.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "130f926645ddd311c404323a38593038b6c54d99", + "git-tree": "ef94e0330a53876e074a09a3cd9c311c4ca0aa28", "version": "1.4.0", "port-version": 0 } From f703d748dff079b2787383244daa6086a1d8990b Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 11 Aug 2022 21:30:18 +0200 Subject: [PATCH 35/37] missed dbus depending on x11. --- ports/dbus/vcpkg.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/dbus/vcpkg.json b/ports/dbus/vcpkg.json index 53a353ed5c0bbd..97c67d4c46d9f0 100644 --- a/ports/dbus/vcpkg.json +++ b/ports/dbus/vcpkg.json @@ -7,6 +7,7 @@ "dependencies": [ "expat", "glib", + "libx11", { "name": "vcpkg-cmake", "host": true @@ -14,7 +15,6 @@ { "name": "vcpkg-cmake-config", "host": true - }, - "x11" + } ] } From 1a138600ba2895b1e838bc9715a1b3efda7c2288 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 11 Aug 2022 21:30:39 +0200 Subject: [PATCH 36/37] v db --- versions/d-/dbus.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/d-/dbus.json b/versions/d-/dbus.json index 60d7d49b0746b4..4e7b50aa84ba80 100644 --- a/versions/d-/dbus.json +++ b/versions/d-/dbus.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "e50673fe28f8ad5f700b3c9a45628955fccb3976", + "git-tree": "dc3215916b8e610dcf6c0777b5ae7a04ed78873b", "version": "1.13.18", "port-version": 0 } From c9a9b6861884e9dc820f565c66e758a6f447ee16 Mon Sep 17 00:00:00 2001 From: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> Date: Thu, 11 Aug 2022 21:56:48 +0200 Subject: [PATCH 37/37] Update scripts/ci.baseline.txt --- scripts/ci.baseline.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index 3ea015d7fa2564..8ef3c1a0bf61f6 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -1168,8 +1168,8 @@ xalan-c:x64-windows-static=fail xalan-c:arm64-windows=fail xerces-c:arm-uwp=fail xerces-c:x64-uwp=fail -# Crosscompiling xlib requires additional steps and patches to the Makefiles. -xlib:arm64-windows=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