2022-09-20 03:08:27 +08:00
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 ( )
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 f o n t / u t i l
R E F d 4 5 0 1 1 b 8 3 2 4 f e c e b b 4 f c 7 9 e 5 7 4 9 1 d 3 4 1 d d 9 6 e 3 2 5 #1.3.2
S H A 5 1 2 d 7 8 3 c b b 5 b 8 b 0 9 7 5 8 9 1 a 2 4 7 f 9 8 b 7 8 c 2 a f a d f d 3 3 e 1 d 2 6 e e 8 b c f 7 a b 7 c c c 1 1 6 1 5 b 0 1 5 0 d 0 7 3 4 5 c 7 1 9 1 8 2 b 0 9 2 9 a f c 3 c 5 4 d c 3 2 8 8 a 0 1 a 7 8 9 b 5 3 7 4 e 1 8 a f f 8 8 3 a c 2 3 d 1 5 b 0 4
H E A D _ R E F m a s t e r
P A T C H E S b u i l d . p a t c h
)
set ( ENV{ACLOCAL} "aclocal -I \" ${ CURRENT_INSTALLED_DIR } /share/xorg/aclocal/\ "" )
if ( VCPKG_TARGET_IS_WINDOWS )
list ( APPEND VCPKG_C_FLAGS " /DNEED_BASENAME" )
list ( APPEND VCPKG_CXX_FLAGS " /DNEED_BASENAME" )
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
)
vcpkg_install_make ( )
vcpkg_fixup_pkgconfig ( )
file ( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" )
file ( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share" )
file ( MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/xorg/" )
file ( RENAME "${CURRENT_PACKAGES_DIR}/share/${PORT}/aclocal/" "${CURRENT_PACKAGES_DIR}/share/xorg/aclocal" )
file ( RENAME "${CURRENT_PACKAGES_DIR}/share/${PORT}/fonts/" "${CURRENT_PACKAGES_DIR}/share/xorg/fonts" )
file ( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/debug" )
set ( _file "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/fontutil.pc" )
file ( READ "${_file}" _contents )
string ( REPLACE "datarootdir=\${prefix}/share/${PORT}" "datarootdir=\${prefix}/share/xorg" _contents "${_contents}" )
string ( REPLACE "exec_prefix=\${prefix}" "exec_prefix=\${prefix}/tools/${PORT}" _contents "${_contents}" )
file ( WRITE "${_file}" "${_contents}" )
2022-10-21 01:52:23 +08:00
if ( NOT VCPKG_BUILD_TYPE )
set ( _file "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/fontutil.pc" )
file ( READ "${_file}" _contents )
string ( REPLACE "datarootdir=\${prefix}/share/${PORT}" "datarootdir=\${prefix}/../share/xorg" _contents "${_contents}" )
string ( REPLACE "exec_prefix=\${prefix}" "exec_prefix=\${prefix}/../tools/${PORT}" _contents "${_contents}" )
file ( WRITE "${_file}" "${_contents}" )
endif ( )
2022-09-20 03:08:27 +08:00
# Handle copyright
file ( INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME "copyright" )
2022-10-21 01:52:23 +08:00
endif ( )