2022-08-23 03:26:13 +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 ( )
if ( VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW )
set ( PATCHES skip_rawcpp.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 u t i l / m a c r o s
R E F b 8 7 6 6 3 0 8 d 2 f 7 8 b c 5 7 2 a b e 5 1 9 8 0 0 7 c f 7 a e e c 9 b 7 6 1 #v1.19.3
S H A 5 1 2 d c 7 3 8 3 b 1 5 7 9 d c 6 e f 0 4 7 3 1 6 1 7 6 4 0 9 6 c 8 1 6 1 f 2 3 a 4 c 4 b a 2 1 8 2 e 7 a b d 7 f 7 3 f 4 4 3 e b 0 5 2 0 e 0 2 f 1 d f a a b a 2 f 8 e b b 4 3 e 0 e d 9 3 c 1 e 6 e 5 e 7 c f 5 1 7 5 6 1 4 7 6 b 8 5 8 d 2 4 7 1 a 8 e c a f 9 0 7
H E A D _ R E F m a s t e r
P A T C H E S $ { P A T C H E S }
)
vcpkg_configure_make (
A U T O C O N F I G
S O U R C E _ P A T H " $ { S O U R C E _ P A T H } "
)
vcpkg_install_make ( )
file ( MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/xorg/" )
2024-06-15 02:40:01 +08:00
if ( NOT CMAKE_HOST_WIN32 )
2022-08-23 03:26:13 +08:00
file ( MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/xorg/aclocal/" )
endif ( )
file ( RENAME "${CURRENT_PACKAGES_DIR}/share/${PORT}/aclocal/" "${CURRENT_PACKAGES_DIR}/share/xorg/aclocal" )
file ( RENAME "${CURRENT_PACKAGES_DIR}/share/${PORT}/util-macros/" "${CURRENT_PACKAGES_DIR}/share/xorg/util-macros" )
file ( READ "${CURRENT_PACKAGES_DIR}/share/${PORT}/pkgconfig/xorg-macros.pc" _contents )
string ( REPLACE "${CURRENT_PACKAGES_DIR}" "${CURRENT_INSTALLED_DIR}" _contents "${_contents}" )
string ( REPLACE "datarootdir=\${prefix}/share" "datarootdir=\${prefix}/share/xorg" _contents "${_contents}" )
string ( REPLACE "includedir=${CURRENT_INSTALLED_DIR}/include" "includedir=\${prefix}/include" _contents "${_contents}" )
file ( WRITE "${CURRENT_PACKAGES_DIR}/share/pkgconfig/xorg-macros.pc" "${_contents}" )
file ( MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/lib/" )
file ( RENAME "${CURRENT_PACKAGES_DIR}/share/pkgconfig/" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig" )
file ( REMOVE "${CURRENT_PACKAGES_DIR}/share/${PORT}/pkgconfig/xorg-macros.pc" )
if ( EXISTS "${CURRENT_PACKAGES_DIR}/debug/share/${PORT}/pkgconfig/xorg-macros.pc" )
file ( READ "${CURRENT_PACKAGES_DIR}/debug/share/${PORT}/pkgconfig/xorg-macros.pc" _contents )
string ( REPLACE "${CURRENT_PACKAGES_DIR}/debug" "${CURRENT_INSTALLED_DIR}/debug" _contents "${_contents}" )
string ( REPLACE "datarootdir=\${prefix}/share}" "datarootdir=\${prefix}/share/xorg/debug}" _contents "${_contents}" )
string ( REPLACE "includedir=${CURRENT_INSTALLED_DIR}/debug/include" "includedir=\${prefix}/../include" _contents "${_contents}" )
file ( WRITE "${CURRENT_PACKAGES_DIR}/debug/share/pkgconfig/xorg-macros.pc" "${_contents}" )
2024-06-15 02:40:01 +08:00
if ( NOT CMAKE_HOST_WIN32 )
2022-08-23 03:26:13 +08:00
file ( MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/xorg/debug/" )
endif ( )
file ( MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/lib" )
file ( RENAME "${CURRENT_PACKAGES_DIR}/debug/share/pkgconfig/" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig" )
file ( REMOVE "${CURRENT_PACKAGES_DIR}/debug/share/${PORT}/pkgconfig/xorg-macros.pc" )
file ( RENAME "${CURRENT_PACKAGES_DIR}/debug/share/" "${CURRENT_PACKAGES_DIR}/share/xorg/debug/" )
endif ( )
file ( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share/" )
file ( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share/${PORT}/pkgconfig" )
file ( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/xorg/debug/${PORT}/pkgconfig" "${CURRENT_PACKAGES_DIR}/share/${PORT}/pkgconfig" )
vcpkg_fixup_pkgconfig ( )
# Handle copyright
file ( INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright )
endif ( )