2022-08-23 03:26:13 +08:00
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 (
G I T L A B _ U R L h t t p s : / / g i t l a b . f r e e d e s k t o p . o r g / x o r g
O U T _ S O U R C E _ P A T H S O U R C E _ P A T H
R E P O l i b / l i b x c b
R E F d d a f d b a 1 1 f 6 9 1 9 e 6 f c f 9 7 7 c 0 9 c 7 8 b 0 6 f 9 4 d e 4 7 a a #v1.14 + some patches
S H A 5 1 2 d 8 3 8 2 b 0 4 f 2 b 0 0 6 7 1 c d e d 9 e 2 2 d 6 0 6 6 1 6 4 5 1 1 e e 4 c 0 8 e 2 c f 5 d e 4 e c 2 8 d 0 9 e 4 1 2 2 8 e 3 0 d 3 b a 7 d 0 e 6 b 5 1 4 1 a b f 4 e 4 b c 7 7 7 a a 6 6 2 f e 9 d 1 d 0 4 f 3 e 1 e 2 6 e 0 b 3 2 3 5 4 9 e 8 4 5 c 8 0 7 2
H E A D _ R E F m a s t e r
P A T C H E S m a k e f i l e . p a t c h # without the patch target xproto.c is missing target XCBPROTO_XCBINCLUDEDIR
c o n f i g u r e . p a t c h
u s e _ x w i n d o w s _ i n c l u d e s . p a t c h # use the X11 include wrappers for windows headers
g e t p i d _ i n c l u d e . p a t c h # add include for getpid on windows
2022-11-12 09:32:25 +08:00
w i n - f i x e s . p a t c h # avoid: 'close' undefined; assuming extern returning int
2022-08-23 03:26:13 +08:00
)
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 (
S O U R C E _ P A T H " $ { S O U R C E _ P A T H } "
A U T O C O N F I G
O P T I O N S $ { O P T I O N S }
)
vcpkg_install_make ( )
set ( pcfile "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/xcb.pc" )
if ( EXISTS "${pcfile}" )
2024-06-20 05:07:05 +08:00
vcpkg_replace_string ( "${pcfile}" "Requires: " "Requires: xau xdmcp " IGNORE_UNCHANGED )
2022-08-23 03:26:13 +08:00
endif ( )
set ( pcfile "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/xcb.pc" )
if ( EXISTS "${pcfile}" )
2024-06-20 05:07:05 +08:00
vcpkg_replace_string ( "${pcfile}" "Requires: " "Requires: xau xdmcp " IGNORE_UNCHANGED )
2022-08-23 03:26:13 +08:00
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
b i g r e q
c o m p o s i t e
d a m a g e
d p m s
d r i 2
d r i 3
g e
g l x
p r e s e n t
r a n d r
r e c o r d
r e n d e r
r e s
s c r e e n s a v e r
s h a p e
s h m
s y n c
x c _ m i s c
x e v i e
x f 8 6 d r i
x f i x e s
x i n e r a m a
x i n p u t
x k b
x p r i n t
x t e s t
x v
x v m c )
foreach ( ext IN LISTS extensions )
vcpkg_replace_string ( "${CURRENT_PACKAGES_DIR}/include/xcb/${ext}.h"
" e x t e r n x c b _ e x t e n s i o n _ t "
" __declspec ( dllimport ) e x t e r n x c b _ e x t e n s i o n _ t " )
endforeach ( )
endif ( )
endif ( )