Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Part1|xwindow PR] Split up to dbus #22642

Merged
merged 51 commits into from
Aug 22, 2022
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
464cdd2
first batch of xwindow PR ports - up to dbus
Neumann-A Jan 19, 2022
7e9e1c6
first batch of xwindow PR ports - up to dbus
Neumann-A Jan 19, 2022
80200f9
Merge branch 'xwindows_to_dbus' of https://github.com/Neumann-A/vcpkg…
Neumann-A Jan 19, 2022
c0e7784
Merge remote-tracking branch 'upstream/master' into xwindows_to_dbus
Neumann-A Jan 19, 2022
6d912fb
format manifest
Neumann-A Jan 19, 2022
3f606c0
version stuff
Neumann-A Jan 19, 2022
60af225
remove if block
Neumann-A Jan 19, 2022
8e2c588
version stuff
Neumann-A Jan 19, 2022
6b110e5
fix xcb hash
Neumann-A Jan 20, 2022
1a265e8
fix xproto dependency on meson blocking cross builds
Neumann-A Jan 20, 2022
4cdd864
adjust message
Neumann-A Jan 20, 2022
0f3fda9
use X11_xcb_LIB
Neumann-A Jan 20, 2022
3107751
version stuff
Neumann-A Jan 20, 2022
05779b4
put xlib arm64-windows on baseline
Neumann-A Jan 20, 2022
18f6351
fix dbus on osx and linux
Neumann-A Jan 20, 2022
5b6f45f
version stuff
Neumann-A Jan 20, 2022
faedbf6
forget to set the value
Neumann-A Jan 20, 2022
8235be2
fix --export-dynamic on osx
Neumann-A Jan 21, 2022
cdcadf4
version dbus
Neumann-A Jan 21, 2022
a49e1a2
ci-retrigger
Neumann-A Jan 21, 2022
b86ca3b
Merge branch 'master' into xwindows_to_dbus
LilyWangLL Feb 22, 2022
02ae414
Merge remote-tracking branch 'upstream/master' into xwindows_to_dbus
Feb 24, 2022
e2b2ceb
add license (needs tool update)
Feb 24, 2022
66508e2
version adjustments
Feb 24, 2022
1e07d62
version update
Feb 24, 2022
18f986a
Merge remote-tracking branch 'upstream/master' into xwindows_to_dbus
Neumann-A May 25, 2022
da0825f
Merge branch 'microsoft:master' into xwindows_to_dbus
Neumann-A Jun 7, 2022
65212fa
Merge branch 'master' of https://github.com/microsoft/vcpkg into xwin…
Jul 7, 2022
6401079
Merge branch 'master' of https://github.com/microsoft/vcpkg into xwin…
Jul 7, 2022
c3efd0b
Merge remote-tracking branch 'upstream/master' into xwindows_to_dbus
Neumann-A Jul 9, 2022
65338c5
remove unnecessary comments
Neumann-A Jul 9, 2022
1487910
v db
Neumann-A Jul 9, 2022
55b1be2
Merge remote-tracking branch 'upstream/master' into xwindows_to_dbus
Neumann-A Aug 2, 2022
9f38ff3
Merge remote-tracking branch 'origin/master' into HEAD
BillyONeal Aug 6, 2022
b1f2a39
Apply suggestions from code review
Neumann-A Aug 6, 2022
b99527f
Merge branch 'xwindows_to_dbus' of https://github.com/Neumann-A/vcpkg…
Neumann-A Aug 6, 2022
a505443
Merge remote-tracking branch 'upstream/master' into xwindows_to_dbus
Neumann-A Aug 6, 2022
6ca0394
nitpicks
Neumann-A Aug 6, 2022
b96b22a
rename xau to libxau
Neumann-A Aug 6, 2022
0739e4c
use vcpkg_install_copyright and silence usage
Neumann-A Aug 6, 2022
8288ee0
xtrans silence usage
Neumann-A Aug 6, 2022
634fe05
format-manifest
Neumann-A Aug 6, 2022
6aee76e
v db
Neumann-A Aug 6, 2022
6d7ae3f
make license null for ports without exact match
Neumann-A Aug 11, 2022
b5ea100
xdmcp rename to libxdmcp
Neumann-A Aug 11, 2022
1088d6c
merge x11 wrapper into xlib
Neumann-A Aug 11, 2022
3a29d50
Merge remote-tracking branch 'upstream/master' into xwindows_to_dbus
Neumann-A Aug 11, 2022
3de1318
v db
Neumann-A Aug 11, 2022
f703d74
missed dbus depending on x11.
Neumann-A Aug 11, 2022
1a13860
v db
Neumann-A Aug 11, 2022
c9a9b68
Update scripts/ci.baseline.txt
Neumann-A Aug 11, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions ports/dbus/cmake.dep.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index 8cde1ffe0..d4d09f223 100644
--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@ -91,7 +91,9 @@ endif()
add_executable(dbus-launch ${dbus_launch_SOURCES})
target_link_libraries(dbus-launch ${DBUS_LIBRARIES})
if(DBUS_BUILD_X11)
- target_link_libraries(dbus-launch ${X11_LIBRARIES} )
+ find_package(Threads REQUIRED)
+ target_link_libraries(dbus-launch ${X11_LIBRARIES} ${X11_xcb_LIB} ${X11_Xau_LIB} ${X11_Xdmcp_LIB} Threads::Threads)
+ target_include_directories(dbus-launch PRIVATE ${X11_INCLUDE_DIR})
endif()
install(TARGETS dbus-launch ${INSTALL_TARGETS_DEFAULT_ARGS})

26 changes: 26 additions & 0 deletions ports/dbus/getpeereid.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
diff --git a/cmake/ConfigureChecks.cmake b/cmake/ConfigureChecks.cmake
index 7bc789f0e..ec476d9ed 100644
--- a/cmake/ConfigureChecks.cmake
+++ b/cmake/ConfigureChecks.cmake
@@ -44,6 +44,7 @@ check_include_file(sys/inotify.h DBUS_BUS_ENABLE_INOTIFY)

check_symbol_exists(backtrace "execinfo.h" HAVE_BACKTRACE) # dbus-sysdeps.c, dbus-sysdeps-win.c
check_symbol_exists(getgrouplist "grp.h" HAVE_GETGROUPLIST) # dbus-sysdeps.c
+check_symbol_exists(getpeereid "sys/types.h;unistd.h" HAVE_GETPEEREID) # dbus-sysdeps.c,
check_symbol_exists(getpeerucred "ucred.h" HAVE_GETPEERUCRED) # dbus-sysdeps.c, dbus-sysdeps-win.c
check_symbol_exists(nanosleep "time.h" HAVE_NANOSLEEP) # dbus-sysdeps.c
check_symbol_exists(getpwnam_r "errno.h;pwd.h" HAVE_GETPWNAM_R) # dbus-sysdeps-util-unix.c
diff --git a/cmake/config.h.cmake b/cmake/config.h.cmake
index cbffcfa91..1f055ddb9 100644
--- a/cmake/config.h.cmake
+++ b/cmake/config.h.cmake
@@ -169,6 +169,9 @@
/* Define to 1 if you have getgrouplist */
#cmakedefine HAVE_GETGROUPLIST 1

+/* Define to 1 if you have getpeereid */
+#cmakedefine HAVE_GETPEEREID 1
+
/* Define to 1 if you have getpeerucred */
#cmakedefine HAVE_GETPEERUCRED 1

17 changes: 17 additions & 0 deletions ports/dbus/pkgconfig.patch
Original file line number Diff line number Diff line change
@@ -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})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this interrogate the results of find_package(Threads) to determine if pthread is required?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is a bit hard to parse:

  add_library(Threads::Threads INTERFACE IMPORTED)

  if(THREADS_HAVE_PTHREAD_ARG)
    set_property(TARGET Threads::Threads
                 PROPERTY INTERFACE_COMPILE_OPTIONS "$<$<COMPILE_LANG_AND_ID:CUDA,NVIDIA>:SHELL:-Xcompiler -pthread>"
                                                    "$<$<NOT:$<COMPILE_LANG_AND_ID:CUDA,NVIDIA>>:-pthread>")
  endif()

  if(CMAKE_THREAD_LIBS_INIT)
    set_property(TARGET Threads::Threads PROPERTY INTERFACE_LINK_LIBRARIES "${CMAKE_THREAD_LIBS_INIT}")
  endif()

I would rather say upstream has to come up with the correct logic to make it work for all cases. I just fix the windows case which normally does not install pc files.

+ endif()
+ if(1)
# convert lists of link libraries into -lstdc++ -lm etc..
foreach(LIB ${PLATFORM_LIBS})
set(LIBDBUS_LIBS "${LIBDBUS_LIBS} -l${LIB}")
64 changes: 64 additions & 0 deletions ports/dbus/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
vcpkg_from_gitlab(
GITLAB_URL https://gitlab.freedesktop.org/
OUT_SOURCE_PATH SOURCE_PATH
REPO dbus/dbus
REF c91ca6edad658274607323a438eea7c7c6c5e392 #1.13.18
SHA512 4dd4d369152591040ebe9f474a0ba8911d8a91546d64b1d6f7335b7fd8026bd99a8a4fe1c78b80eb2e31e9e58324d432857e2a7af1d1cb950d22b4430cc0f7ac
HEAD_REF master # branch name
PATCHES
cmake.dep.patch #patch name
Neumann-A marked this conversation as resolved.
Show resolved Hide resolved
rt_pc_link.patch
pkgconfig.patch
getpeereid.patch # missing check from configure.ac
rdynamic.patch # OSX doesn't like '-Wl,--export-dynamic'
)

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DDBUS_BUILD_TESTS=OFF
-DDBUS_ENABLE_XML_DOCS=OFF
-DDBUS_INSTALL_SYSTEM_LIBS=OFF
-DDBUS_ENABLE_PKGCONFIG=ON
#-DDBUS_SERVICE=ON
-DDBUS_WITH_GLIB=ON
-DXSLTPROC_EXECUTABLE=FALSE
-DENABLE_SYSTEMD=ON
-DDBUS_ENABLE_PKGCONFIG=ON
-DPKG_CONFIG_FOUND=TRUE
"-DCMAKE_INSTALL_SYSCONFDIR=${CURRENT_PACKAGES_DIR}/etc/${PORT}"
"-DWITH_SYSTEMD_SYSTEMUNITDIR=lib/systemd/system"
"-DWITH_SYSTEMD_USERUNITDIR=lib/systemd/user"
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/DBus1")
Neumann-A marked this conversation as resolved.
Show resolved Hide resolved
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)

Neumann-A marked this conversation as resolved.
Show resolved Hide resolved
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()
Neumann-A marked this conversation as resolved.
Show resolved Hide resolved
list(TRANSFORM TOOLS PREPEND "dbus-" )
vcpkg_copy_tools(TOOL_NAMES ${TOOLS} AUTO_CLEAN)


if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
endif()
15 changes: 15 additions & 0 deletions ports/dbus/rdynamic.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1c2f6ba5b..6a4c5410b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -277,8 +277,8 @@ endif()

if(UNIX AND NOT DBUS_DISABLE_ASSERT)
# required for backtrace
- set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wl,--export-dynamic")
- set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Wl,--export-dynamic")
+ set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -rdynamic")
+ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -rdynamic")
add_definitions(-DDBUS_BUILT_R_DYNAMIC)
endif()

27 changes: 27 additions & 0 deletions ports/dbus/rt_pc_link.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index caef73840..caf7e61bf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -726,7 +726,7 @@ if(DBUS_ENABLE_PKGCONFIG)
set(PLATFORM_LIBS pthread ${LIBRT})
if(PKG_CONFIG_FOUND)
# convert lists of link libraries into -lstdc++ -lm etc..
- foreach(LIB ${CMAKE_C_IMPLICIT_LINK_LIBRARIES} ${PLATFORM_LIBS})
+ foreach(LIB ${PLATFORM_LIBS})
set(LIBDBUS_LIBS "${LIBDBUS_LIBS} -l${LIB}")
endforeach()
set(original_prefix "${CMAKE_INSTALL_PREFIX}")
diff --git a/dbus/CMakeLists.txt b/dbus/CMakeLists.txt
index 63070b69b..5752b7492 100644
--- a/dbus/CMakeLists.txt
+++ b/dbus/CMakeLists.txt
@@ -253,6 +253,9 @@ endif()

# for clock_getres() on e.g. GNU/Linux (but not Android)
find_library(LIBRT rt)
+get_filename_component(LIBRT "${LIBRT}" NAME_WLE)
+string(REPLACE "lib" "" LIBRT "${LIBRT}")
+set(LIBRT "${LIBRT}" CACHE STRING "" FORCE)

# for socket() on QNX
find_library(LIBSOCKET socket)
20 changes: 20 additions & 0 deletions ports/dbus/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "dbus",
"version": "1.13.18",
"description": "D-Bus specification and reference implementation, including libdbus and dbus-daemon",
"homepage": "https://gitlab.freedesktop.org/dbus/dbus",
"license": "AFL-2.1 OR GPL-2.0-or-later",
"dependencies": [
"expat",
"glib",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
},
"x11"
]
}
52 changes: 52 additions & 0 deletions ports/pthread-stubs/portfile.cmake
Original file line number Diff line number Diff line change
@@ -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)
Neumann-A marked this conversation as resolved.
Show resolved Hide resolved

set(_file "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/pthread-stubs.pc")
file(READ "${_file}" _contents)
string(REPLACE "Cflags: -pthread" "Cflags: " _contents "${_contents}")
if(EXISTS "${CURRENT_INSTALLED_DIR}/lib/pthreadVC3.lib")
string(REPLACE "Libs: -pthread" "Libs: -lpthreadVC3" _contents "${_contents}")
endif()
if(EXISTS "${CURRENT_INSTALLED_DIR}/lib/pthreadGC3.lib")
string(REPLACE "Libs: -pthread" "Libs: -lpthreadGC3" _contents "${_contents}")
endif()
file(WRITE "${_file}" "${_contents}")

set(_file "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/pthread-stubs.pc")
file(READ "${_file}" _contents)
string(REPLACE "Cflags: -pthread" "Cflags: " _contents "${_contents}")
if(EXISTS "${CURRENT_INSTALLED_DIR}/debug/lib/pthreadVC3.lib")
string(REPLACE "Libs: -pthread" "Libs: -lpthreadVC3" _contents "${_contents}")
endif()
if(EXISTS "${CURRENT_INSTALLED_DIR}/debug/lib/pthreadGC3.lib")
string(REPLACE "Libs: -pthread" "Libs: -lpthreadGC3" _contents "${_contents}")
endif()
if(EXISTS "${CURRENT_INSTALLED_DIR}/debug/lib/pthreadVC3d.lib")
string(REPLACE "Libs: -pthread" "Libs: -lpthreadVC3d" _contents "${_contents}")
endif()
if(EXISTS "${CURRENT_INSTALLED_DIR}/debug/lib/pthreadGC3d.lib")
string(REPLACE "Libs: -pthread" "Libs: -lpthreadGC3d" _contents "${_contents}")
endif()
file(WRITE "${_file}" "${_contents}")
10 changes: 10 additions & 0 deletions ports/pthread-stubs/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "pthread-stubs",
"version": "0.4",
"description": "Stub replacements for POSIX Threads functions.",
"homepage": "https://gitlab.freedesktop.org/xorg/lib/pthread-stubs",
"license": "X11-distribute-modifications-variant",
"dependencies": [
"pthread"
]
}
3 changes: 3 additions & 0 deletions ports/x11/portfile.cmake
Original file line number Diff line number Diff line change
@@ -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)
12 changes: 12 additions & 0 deletions ports/x11/vcpkg-cmake-wrapper.cmake
Original file line number Diff line number Diff line change
@@ -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()
10 changes: 10 additions & 0 deletions ports/x11/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"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"
]
}
31 changes: 31 additions & 0 deletions ports/xau/portfile.cmake
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")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we name the right package(s) when we do this for at least Ubuntu 22.04?

:sigh: We really need vcpkg_try_install_system(APT hello DNF world YUM world ZYPPER zip PACMAN pack APK alpine) don't we?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could also completely get rid of these messages and make the linkage against X dynamic in the triplet. ;)
But I think this a future step and would require an additional linux CI without any X libraries being installed so that we can fix the X dependencies within vcpkg itself first.

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/\"")

vcpkg_configure_make(
SOURCE_PATH "${SOURCE_PATH}"
AUTOCONFIG
OPTIONS "${OPTIONS}"
)

vcpkg_install_make()
vcpkg_fixup_pkgconfig()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")

# # Handle copyright
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
endif()
12 changes: 12 additions & 0 deletions ports/xau/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "xau",
Neumann-A marked this conversation as resolved.
Show resolved Hide resolved
"version": "1.0.9",
"description": "Functions for handling Xauthority files and entries.",
"homepage": "https://gitlab.freedesktop.org/xorg/lib/libxau",
"license": "MIT-open-group",
"dependencies": [
"bzip2",
"xorg-macros",
"xproto"
]
}
51 changes: 51 additions & 0 deletions ports/xcb-proto/portfile.cmake
Original file line number Diff line number Diff line change
@@ -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 in your triplet")
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
else()

find_program(XMLLINT_PATH NAMES xmllint PATHS "${CURRENT_HOST_INSTALLED_DIR}/tools/libxml2")
if(NOT XMLLINT_PATH)
message(FATAL_ERROR "${PORT} requires xmllint which was not found!")
endif()

string(REGEX REPLACE "/[^/]+$" "" XMLLINT_DIR "${XMLLINT_PATH}")
file(TO_NATIVE_PATH "${XMLLINT_DIR}" XMLLINT_DIR_NATIVE)
message(STATUS "Using xmlling at: ${XMLLINT_PATH}")
vcpkg_add_to_path("${XMLLINT_DIR_NATIVE}")
#(also requires python2?)
Neumann-A marked this conversation as resolved.
Show resolved Hide resolved

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
Neumann-A marked this conversation as resolved.
Show resolved Hide resolved
)

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
Neumann-A marked this conversation as resolved.
Show resolved Hide resolved
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
endif()
Loading