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
R E F 4 c 9 6 f 3 5 6 7 a 8 d 0 4 5 e e 5 7 b 8 8 6 f d d c 9 6 1 8 b 7 1 2 8 2 5 3 0 #x11 v 1.7.3.1
S H A 5 1 2 1 5 c 5 5 b 6 2 8 3 a e c 3 6 3 f 6 a f 5 b 5 4 9 5 8 4 d 4 8 7 e c 5 a 8 c 0 f 7 4 b 9 5 d c 4 4 6 7 4 f f 5 0 7 6 4 a b e 5 b 9 f a 2 1 6 e 2 a f 3 c 5 4 0 8 f a f 1 2 d 1 7 b 0 4 e 9 4 3 3 f 0 a d 6 6 d a 6 e 3 2 a 0 d f e f 0 4 2 7 c a 1 3 1 e f 2 3 b
H E A D _ R E F m a s t e r
P A T C H E S 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
)
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
- - 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 - l o a d a b l e - i 1 8 n = n o #Pointer conversion errors
- - 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
- - e n a b l e - u n i x - t r a n s p o r t = n o )
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 )