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 ( )
if ( VCPKG_LIBRARY_LINKAGE STREQUAL dynamic )
set ( PATCHES dllimport.patch )
endif ( )
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 1 1
2022-11-12 09:32:25 +08:00
R E F 3 a 3 0 a d a 6 0 c 5 2 1 7 a d a 3 7 b 1 4 3 b 5 4 1 c 8 e 6 f 6 2 8 4 c 7 f a
S H A 5 1 2 4 4 1 f 8 6 f f 8 2 9 3 d 2 7 4 5 9 f e a a 9 3 f 8 5 b c d 4 d 0 2 c 6 b d 6 4 f d b 4 d 9 5 1 9 9 e 5 e e 8 a 7 5 3 4 0 c 2 c e 9 b 0 f c c d 0 b 0 5 8 4 0 c e 0 d e 3 0 f f 3 a f 3 d 2 1 e 6 f 3 7 c 8 1 8 4 0 e 8 2 b 3 7 d b d d f 0 8 2 9 1 1 b 5 8 5 d
2022-08-23 03:26:13 +08:00
H E A D _ R E F m a s t e r
2024-04-24 00:14:09 +08:00
P A T C H E S
o p t i m i z e - c o n f i g u r e . p a t c h
c l . b u i l d . p a t c h
i o _ i n c l u d e . p a t c h
$ { P A T C H E S }
v c x s e r v e r . p a t c h
a d d _ d l _ p c . p a t c h
2022-08-23 03:26:13 +08:00
)
set ( ENV{ACLOCAL} "aclocal -I \" ${ CURRENT_INSTALLED_DIR } /share/xorg/aclocal/\ "" )
2022-11-12 09:32:25 +08:00
set ( OPTIONS "" )
if ( VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW )
2022-08-23 03:26:13 +08:00
set ( ENV{CPP} "cl_cpp_wrapper" )
2022-11-12 09:32:25 +08:00
list ( APPEND OPTIONS
- - e n a b l e - l o a d a b l e - i 1 8 n = n o #Pointer conversion errors
- - e n a b l e - u n i x - t r a n s p o r t = n o
- - d i s a b l e - t h r e a d - s a f e t y - c o n s t r u c t o r
2022-11-15 04:04:16 +08:00
a c _ c v _ s e a r c h _ d l o p e n = n o
2022-11-12 09:32:25 +08:00
)
2022-08-23 03:26:13 +08:00
endif ( )
if ( VCPKG_TARGET_IS_WINDOWS )
2022-11-12 09:32:25 +08:00
list ( APPEND OPTIONS
2022-08-23 03:26:13 +08:00
- - e n a b l e - m a l l o c 0 r e t u r n s n u l l = y e s #Configure fails to run the test for some reason
- - e n a b l e - i p v 6
- - e n a b l e - h y p e r v
- - e n a b l e - t c p - t r a n s p o r t
- - w i t h - l a u n c h d = n o
- - w i t h - l i n t = n o
- - d i s a b l e - s e l e c t i v e - w e r r o r
2022-11-12 09:32:25 +08:00
)
2022-08-23 03:26:13 +08:00
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 (
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 }
)
2022-08-27 04:08:05 +08:00
if ( VCPKG_CROSSCOMPILING )
file ( GLOB FOR_BUILD_FILES "${CURRENT_HOST_INSTALLED_DIR}/manual-tools/${PORT}/*" )
file ( COPY ${ FOR_BUILD_FILES } DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/src/util" )
if ( NOT VCPKG_BUILD_TYPE )
file ( COPY ${ FOR_BUILD_FILES } DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/src/util" )
endif ( )
endif ( )
2022-08-23 03:26:13 +08:00
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 )
2022-08-27 04:08:05 +08:00
if ( NOT VCPKG_CROSSCOMPILING )
file ( READ "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/config.log" config_contents )
string ( REGEX MATCH "ac_cv_objext=[^\n]+" objsuffix "${config_contents}" )
string ( REPLACE "ac_cv_objext=" "." objsuffix "${objsuffix}" )
file ( INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/src/util/makekeys${VCPKG_TARGET_EXECUTABLE_SUFFIX}" DESTINATION "${CURRENT_PACKAGES_DIR}/manual-tools/${PORT}" )
file ( INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/src/util/makekeys${objsuffix}" DESTINATION "${CURRENT_PACKAGES_DIR}/manual-tools/${PORT}" )
2022-08-23 03:26:13 +08:00
endif ( )
2022-08-27 04:08:05 +08:00
endif ( )
2022-08-23 03:26:13 +08:00
configure_file ( "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake"
2022-08-27 04:08:05 +08:00
" $ { C U R R E N T _ P A C K A G E S _ D I R } / s h a r e / x 1 1 / v c p k g - c m a k e - w r a p p e r . c m a k e " @ O N L Y )