-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
X Window Part 9/N (some xcb ports) (#27240)
* [xcb-cursor] add port * [xcb-errors] add port * [xcb-image] add port * [xcb-keysyms] add port * [xcb-util] add port * [xcb-wm] add port * v db * remove xcb-cursor * Apply CR Co-authored-by: Billy O'Neal <bion@microsoft.com> * update ports to new version * v db * fix v db * add missing DESTINATION parameter * v db * rename xcb-errors and xcb-wm * v db * only apply the patch on windows * v db Co-authored-by: Billy O'Neal <bion@microsoft.com>
- Loading branch information
1 parent
043338a
commit 4aedc13
Showing
23 changed files
with
393 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/image/xcb_bitops.h b/image/xcb_bitops.h | ||
index a6872a1f3..bf6fdc179 100644 | ||
--- a/image/xcb_bitops.h | ||
+++ b/image/xcb_bitops.h | ||
@@ -207,6 +207,8 @@ xcb_host_byte_order(void) { | ||
return XCB_IMAGE_ORDER_LSB_FIRST; | ||
} | ||
assert(0); | ||
+ exit(EXIT_FAILURE); | ||
+ return -1; | ||
} | ||
|
||
#endif /* __XCB_BITOPS_H__ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
if(NOT X_VCPKG_FORCE_VCPKG_X_LIBRARIES AND NOT VCPKG_TARGET_IS_WINDOWS) | ||
message(STATUS "Utils and libraries provided by '${PORT}' should be provided by your system! Install the required packages or force vcpkg libraries by setting X_VCPKG_FORCE_VCPKG_X_LIBRARIES in your triplet!") | ||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled) | ||
else() | ||
|
||
vcpkg_from_gitlab( | ||
GITLAB_URL https://gitlab.freedesktop.org/xorg | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO lib/libxcb-image | ||
REF 525ce59fe2329d4b23fc0c52ed9dd92daac8ac2a #v 0.4.1 | ||
SHA512 e91471c45983bb3a56fb96a9ab627a5b65fcbc21424f62bed10dba283c97fdd6475d4f380d268a30a99b6544bc804f8263e7b945a4c4d22c79535e3c3b1e10db | ||
HEAD_REF master | ||
PATCHES add_return_value.patch | ||
) | ||
file(TOUCH "${SOURCE_PATH}/m4/dummy") | ||
set(ENV{ACLOCAL} "aclocal -I \"${CURRENT_INSTALLED_DIR}/share/xorg/aclocal/\"") | ||
|
||
vcpkg_configure_make( | ||
SOURCE_PATH "${SOURCE_PATH}" | ||
AUTOCONFIG | ||
) | ||
|
||
vcpkg_install_make() | ||
vcpkg_fixup_pkgconfig() | ||
|
||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") | ||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") | ||
|
||
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "xcb-image", | ||
"version": "0.4.1", | ||
"description": "XCB port of Xlib's XImage and XShmImage functions.", | ||
"homepage": "https://xcb.freedesktop.org/", | ||
"license": null, | ||
"dependencies": [ | ||
"xcb", | ||
"xcb-util" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
if(NOT X_VCPKG_FORCE_VCPKG_X_LIBRARIES AND NOT VCPKG_TARGET_IS_WINDOWS) | ||
message(STATUS "Utils and libraries provided by '${PORT}' should be provided by your system! Install the required packages or force vcpkg libraries by setting X_VCPKG_FORCE_VCPKG_X_LIBRARIES in your triplet!") | ||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled) | ||
else() | ||
|
||
vcpkg_from_gitlab( | ||
GITLAB_URL https://gitlab.freedesktop.org/xorg | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO lib/libxcb-keysyms | ||
REF 85e093f14b0ade2956e0a5d1c37cfde06d8b1ba6 #v 0.4.1 | ||
SHA512 cee1224ba673c637d20387d22d445be92970dd1b169247550befe64908e1b7f8cc4311018b7e7854e46ccaa62b8c6258293dcb144a94e320bee5a1e060b194f1 | ||
HEAD_REF master | ||
) | ||
file(TOUCH "${SOURCE_PATH}/m4/dummy") | ||
set(ENV{ACLOCAL} "aclocal -I \"${CURRENT_INSTALLED_DIR}/share/xorg/aclocal/\"") | ||
|
||
vcpkg_configure_make( | ||
SOURCE_PATH "${SOURCE_PATH}" | ||
AUTOCONFIG | ||
) | ||
|
||
vcpkg_install_make() | ||
vcpkg_fixup_pkgconfig() | ||
|
||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") | ||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") | ||
|
||
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"name": "xcb-keysyms", | ||
"version": "0.4.1", | ||
"description": "Standard X key constants and conversion to/from keycodes", | ||
"homepage": "https://xcb.freedesktop.org/", | ||
"license": null, | ||
"dependencies": [ | ||
"bzip2", | ||
"xcb", | ||
"xorg-macros", | ||
"xproto" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
diff --git a/src/extensions.py b/src/extensions.py | ||
index 94d7d57fe..022d4003e 100644 | ||
--- a/src/extensions.py | ||
+++ b/src/extensions.py | ||
@@ -1,5 +1,6 @@ | ||
#!/usr/bin/env python | ||
import sys | ||
+import glob | ||
from xml.etree.cElementTree import parse | ||
|
||
class Module(object): | ||
@@ -83,7 +84,7 @@ def parseFile(filename): | ||
|
||
# Parse the xml file | ||
output_file = sys.argv[1] | ||
-for input_file in sys.argv[2:]: | ||
+for input_file in glob.glob(sys.argv[2]): | ||
parseFile(input_file) | ||
|
||
assert xproto != None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
if(NOT X_VCPKG_FORCE_VCPKG_X_LIBRARIES AND NOT VCPKG_TARGET_IS_WINDOWS) | ||
message(STATUS "Utils and libraries provided by '${PORT}' should be provided by your system! Install the required packages or force vcpkg libraries by setting X_VCPKG_FORCE_VCPKG_X_LIBRARIES in your triplet!") | ||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled) | ||
else() | ||
|
||
if(VCPKG_TARGET_IS_WINDOWS) | ||
set(PATCHES fix_python.patch) | ||
endif() | ||
|
||
vcpkg_from_gitlab( | ||
GITLAB_URL https://gitlab.freedesktop.org/xorg | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO lib/libxcb-errors | ||
REF 517dd82c079de762a7426f20166a44f11e8d38c5 #1.0.1 | ||
SHA512 391f6bc9452bf4d6a3f1fa69232cdbef43f9fcd339b8d1965132a3b227ed7ebcbaad553fe64d42bc525811caedf3ff9d5bec108f6ac2efd5a014f75fb35cbf85 | ||
HEAD_REF master | ||
PATCHES ${PATCHES} | ||
) | ||
file(TOUCH "${SOURCE_PATH}/m4/dummy") | ||
set(ENV{ACLOCAL} "aclocal -I \"${CURRENT_INSTALLED_DIR}/share/xorg/aclocal/\"") | ||
|
||
vcpkg_find_acquire_program(PYTHON3) | ||
get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY) | ||
vcpkg_add_to_path("${PYTHON3_DIR}") | ||
|
||
vcpkg_configure_make( | ||
SOURCE_PATH "${SOURCE_PATH}" | ||
AUTOCONFIG | ||
COPY_SOURCE | ||
) | ||
|
||
vcpkg_install_make() | ||
vcpkg_fixup_pkgconfig() | ||
|
||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") | ||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") | ||
|
||
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) | ||
endif() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "xcb-util-errors", | ||
"version": "1.0.1", | ||
"description": "XCB utility library that gives human readable names to error, event, & request codes.", | ||
"homepage": "https://xcb.freedesktop.org/", | ||
"license": null, | ||
"dependencies": [ | ||
"xcb", | ||
"xcb-util" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
diff --git a/ewmh/ewmh.c.m4 b/ewmh/ewmh.c.m4 | ||
index b986105f6..a0ce37c2a 100644 | ||
--- a/ewmh/ewmh.c.m4 | ||
+++ b/ewmh/ewmh.c.m4 | ||
@@ -45,7 +45,7 @@ | ||
|
||
#include <sys/types.h> | ||
|
||
-#define ssizeof(foo) (ssize_t)sizeof(foo) | ||
+#define ssizeof(foo) (ptrdiff_t)sizeof(foo) | ||
#define countof(foo) (ssizeof(foo) / ssizeof(foo[0])) | ||
|
||
/** | ||
@@ -1119,12 +1119,13 @@ xcb_ewmh_append_wm_icon_checked(xcb_ewmh_connection_t *ewmh, | ||
uint32_t img_len, uint32_t *img) | ||
{ | ||
const uint32_t data_len = img_len + 2; | ||
- uint32_t data[data_len]; | ||
+ uint32_t *data = (uint32_t*)malloc(data_len*sizeof(uint32_t)); | ||
|
||
- set_wm_icon_data(data, width, height, img_len, img); | ||
- | ||
- return xcb_ewmh_set_wm_icon_checked(ewmh, XCB_PROP_MODE_APPEND, window, | ||
- data_len, data); | ||
+ set_wm_icon_data(data, width, height, img_len, img); | ||
+ const xcb_void_cookie_t res = xcb_ewmh_set_wm_icon_checked(ewmh, XCB_PROP_MODE_APPEND, window, | ||
+ data_len, data); | ||
+ free(data); | ||
+ return res; | ||
} | ||
|
||
xcb_void_cookie_t | ||
@@ -1134,12 +1135,13 @@ xcb_ewmh_append_wm_icon(xcb_ewmh_connection_t *ewmh, | ||
uint32_t img_len, uint32_t *img) | ||
{ | ||
const uint32_t data_len = img_len + 2; | ||
- uint32_t data[data_len]; | ||
- | ||
- set_wm_icon_data(data, width, height, img_len, img); | ||
+ uint32_t *data = (uint32_t*)malloc(data_len*sizeof(uint32_t)); | ||
|
||
- return xcb_ewmh_set_wm_icon(ewmh, XCB_PROP_MODE_APPEND, window, | ||
- data_len, data); | ||
+ set_wm_icon_data(data, width, height, img_len, img); | ||
+ const xcb_void_cookie_t res = xcb_ewmh_set_wm_icon(ewmh, XCB_PROP_MODE_APPEND, window, | ||
+ data_len, data); | ||
+ free(data); | ||
+ return res; | ||
} | ||
|
||
DO_GET_PROPERTY(wm_icon, _NET_WM_ICON, XCB_ATOM_CARDINAL, UINT_MAX) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
if(NOT X_VCPKG_FORCE_VCPKG_X_LIBRARIES AND NOT VCPKG_TARGET_IS_WINDOWS) | ||
message(STATUS "Utils and libraries provided by '${PORT}' should be provided by your system! Install the required packages or force vcpkg libraries by setting X_VCPKG_FORCE_VCPKG_X_LIBRARIES in your triplet!") | ||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled) | ||
else() | ||
|
||
vcpkg_from_gitlab( | ||
GITLAB_URL https://gitlab.freedesktop.org/xorg | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO lib/libxcb-wm | ||
REF 0c6681e465c9cc7b1fbb60778ba1eaa61ab01a14 #v 0.4.2 | ||
SHA512 6af514465eaa98d5417de352bd3e4f3880180f886dc1202c64496cb5a07c82c377afeb9396acf57e20caa73e858fe7e6309f3ed7a74e88eb58e1da1f31ac0bd8 | ||
HEAD_REF master | ||
PATCHES build.patch | ||
) | ||
file(TOUCH "${SOURCE_PATH}/m4/dummy") | ||
set(ENV{ACLOCAL} "aclocal -I \"${CURRENT_INSTALLED_DIR}/share/xorg/aclocal/\"") | ||
|
||
vcpkg_configure_make( | ||
SOURCE_PATH "${SOURCE_PATH}" | ||
AUTOCONFIG | ||
) | ||
|
||
vcpkg_install_make() | ||
vcpkg_fixup_pkgconfig() | ||
|
||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") | ||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") | ||
|
||
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"name": "xcb-util-wm", | ||
"version": "0.4.2", | ||
"description": "XCB client and window-manager helpers for ICCCM & EWMH.", | ||
"homepage": "https://gitlab.freedesktop.org/xorg/lib/libxcb-wm/", | ||
"license": null, | ||
"dependencies": [ | ||
"bzip2", | ||
"xcb", | ||
"xorg-macros", | ||
"xproto" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
if(NOT X_VCPKG_FORCE_VCPKG_X_LIBRARIES AND NOT VCPKG_TARGET_IS_WINDOWS) | ||
message(STATUS "Utils and libraries provided by '${PORT}' should be provided by your system! Install the required packages or force vcpkg libraries by setting X_VCPKG_FORCE_VCPKG_X_LIBRARIES in your triplet!") | ||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled) | ||
else() | ||
|
||
vcpkg_from_gitlab( | ||
GITLAB_URL https://gitlab.freedesktop.org/xorg | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO lib/libxcb-util | ||
REF acf790d7752f36e450d476ad79807d4012ec863b #v0.4.0 | ||
SHA512 d1ef49c1e16b7643a7afeca1495a96ab9ab9c537ea7669a13b3adda400a204626714afc8ed7fcc3d7532ebe1f89a3aa31e3ca0ee9617330d4df5b65b0c8e6dbc | ||
HEAD_REF master | ||
PATCHES ssize.patch | ||
) | ||
|
||
file(TOUCH "${SOURCE_PATH}/m4/dummy") | ||
set(ENV{ACLOCAL} "aclocal -I \"${CURRENT_INSTALLED_DIR}/share/xorg/aclocal/\"") | ||
|
||
vcpkg_configure_make( | ||
SOURCE_PATH "${SOURCE_PATH}" | ||
AUTOCONFIG | ||
) | ||
|
||
vcpkg_install_make() | ||
vcpkg_fixup_pkgconfig() | ||
|
||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") | ||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") | ||
|
||
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
diff --git a/src/event.c b/src/event.c | ||
index 88058c4e7..3bc0d635f 100644 | ||
--- a/src/event.c | ||
+++ b/src/event.c | ||
@@ -38,6 +38,10 @@ | ||
|
||
#include <sys/types.h> | ||
|
||
+#if !defined ssize_t && defined(_WIN32) | ||
+ #define ssize_t ptrdiff_t | ||
+#endif | ||
+ | ||
#define ssizeof(foo) (ssize_t)sizeof(foo) | ||
#define countof(foo) (ssizeof(foo) / ssizeof(foo[0])) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"name": "xcb-util", | ||
"version": "0.4.0", | ||
"description": "C interface to the X Window System protocol, which replaces the traditional Xlib interface.", | ||
"homepage": "https://xcb.freedesktop.org/", | ||
"license": null, | ||
"dependencies": [ | ||
"xcb", | ||
"xcb-util-m4", | ||
"xorg-macros" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.