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 ( )
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 t r a n s
R E F 3 b 5 d f 8 8 9 f 5 8 a 9 9 9 8 0 a 3 5 a 7 b 4 a 1 8 e b 4 e 7 d 2 a b e a c 4 #v1.4
S H A 5 1 2 d 1 a 1 e c d 8 a a 0 7 d 1 9 a 8 b 4 9 3 6 a 3 7 1 0 9 c e c d 0 c 9 6 5 b 8 5 9 a 1 7 e a 8 3 8 8 3 5 2 3 0 f 9 3 2 6 c 1 a 3 5 3 f e e f 3 8 8 0 5 2 d f 0 3 1 7 3 5 6 2 c b f 0 f 3 e 3 7 6 4 1 4 6 c 3 6 6 9 b 1 9 2 8 6 9 8 c d 5 5 c c c 4 f 9 2 9 9 2 c
H E A D _ R E F m a s t e r
P A T C H E S w i n 3 2 . p a t c h
s y m b o l s . p a t c h
)
set ( ENV{ACLOCAL} "aclocal -I \" ${ CURRENT_INSTALLED_DIR } /share/xorg/aclocal/\ "" )
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 ( )
2024-06-15 02:40:01 +08:00
2022-08-23 03:26:13 +08:00
file ( MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/xorg" )
file ( MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/${PORT}" )
# the include folder is moved since it contains source files. It is not meant as a traditional include folder but as a shared files folder for different x libraries.
2024-06-15 02:40:01 +08:00
file ( RENAME "${CURRENT_PACKAGES_DIR}/include" "${CURRENT_PACKAGES_DIR}/share/${PORT}/include" )
file ( MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/lib" )
2022-08-23 03:26:13 +08:00
file ( RENAME "${CURRENT_PACKAGES_DIR}/share/${PORT}/pkgconfig/" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig" )
file ( RENAME "${CURRENT_PACKAGES_DIR}/share/${PORT}/aclocal/" "${CURRENT_PACKAGES_DIR}/share/xorg/aclocal" )
2022-10-21 01:52:23 +08:00
if ( NOT VCPKG_BUILD_TYPE )
2024-06-15 02:40:01 +08:00
file ( MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/lib" )
2022-08-23 03:26:13 +08:00
file ( RENAME "${CURRENT_PACKAGES_DIR}/debug/share/${PORT}/pkgconfig" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig" )
file ( RENAME "${CURRENT_PACKAGES_DIR}/debug/share/" "${CURRENT_PACKAGES_DIR}/share/xorg/debug" )
endif ( )
vcpkg_fixup_pkgconfig ( ) # must be called after files have been moved
2024-06-15 02:40:01 +08:00
vcpkg_replace_string ( "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/xtrans.pc" "includedir=\${prefix}/include" "includedir=\${prefix}/share/${PORT}/include" )
2022-10-21 01:52:23 +08:00
if ( NOT VCPKG_BUILD_TYPE )
2024-06-15 02:40:01 +08:00
vcpkg_replace_string ( "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/xtrans.pc" "includedir=\${prefix}/../include" "includedir=\${prefix}/../share/${PORT}/include" )
2022-08-23 03:26:13 +08:00
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 )
file ( WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" "" )
endif ( )