2017-12-24 00:14:20 +08:00
vcpkg_from_github (
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 g i t 2 / l i b g i t 2
2024-04-30 08:20:16 +08:00
R E F v 1 . 8 . 0
S H A 5 1 2 e 5 6 3 4 2 6 7 b d 9 c 6 a 5 9 4 c 9 a 9 5 4 d 0 9 c 6 5 7 e 7 b 8 a a d f 2 1 3 6 0 9 b f 7 d d 8 3 b 9 9 8 6 3 d 0 d 0 c 7 1 0 9 a 5 2 7 7 6 1 7 d d 5 0 8 a b c 2 d a 5 4 e a 3 f 1 2 c 2 a f 1 9 0 8 d 1 a e b 7 3 c 0 0 0 e 9 4 0 5 6 e 2 f 3 6 5 3 1 4 4
H E A D _ R E F m a i n
2021-11-28 15:32:06 +08:00
P A T C H E S
2023-07-12 02:18:41 +08:00
c - s t a n d a r d . d i f f # for 'inline' in system headers
c l i - i n c l u d e - d i r s . d i f f
d e p e n d e n c i e s . d i f f
m i n g w - w i n h t t p . d i f f
u n o f f i c i a l - c o n f i g - e x p o r t . d i f f
2024-11-20 06:42:29 +08:00
f i x - a r m 6 4 - w i n d o w s . p a t c h
2023-07-12 02:18:41 +08:00
)
file ( REMOVE_RECURSE
" $ { S O U R C E _ P A T H } / c m a k e / F i n d P C R E . c m a k e "
" $ { S O U R C E _ P A T H } / c m a k e / F i n d P C R E 2 . c m a k e "
" $ { S O U R C E _ P A T H } / d e p s / c h r o m i u m - z l i b "
" $ { S O U R C E _ P A T H } / d e p s / h t t p - p a r s e r "
" $ { S O U R C E _ P A T H } / d e p s / p c r e "
" $ { S O U R C E _ P A T H } / d e p s / w i n h t t p "
" $ { S O U R C E _ P A T H } / d e p s / z l i b "
2018-10-09 15:27:45 +08:00
)
2021-11-28 15:32:06 +08:00
2018-10-09 15:27:45 +08:00
string ( COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" STATIC_CRT )
2017-12-24 00:14:20 +08:00
2020-10-21 03:23:12 +08:00
set ( REGEX_BACKEND OFF )
set ( USE_HTTPS OFF )
2024-04-30 08:20:16 +08:00
set ( USE_SSH OFF )
2020-10-21 03:23:12 +08:00
function ( set_regex_backend VALUE )
if ( REGEX_BACKEND )
message ( FATAL_ERROR "Only one regex backend (pcre,pcre2) is allowed" )
endif ( )
set ( REGEX_BACKEND ${ VALUE } PARENT_SCOPE )
endfunction ( )
function ( set_tls_backend VALUE )
if ( USE_HTTPS )
message ( FATAL_ERROR "Only one TLS backend (openssl,winhttp,sectransp,mbedtls) is allowed" )
endif ( )
set ( USE_HTTPS ${ VALUE } PARENT_SCOPE )
endfunction ( )
foreach ( GIT2_FEATURE ${ FEATURES } )
if ( GIT2_FEATURE STREQUAL "pcre" )
set_regex_backend ( "pcre" )
elseif ( GIT2_FEATURE STREQUAL "pcre2" )
set_regex_backend ( "pcre2" )
elseif ( GIT2_FEATURE STREQUAL "openssl" )
set_tls_backend ( "OpenSSL" )
elseif ( GIT2_FEATURE STREQUAL "winhttp" )
set_tls_backend ( "WinHTTP" )
elseif ( GIT2_FEATURE STREQUAL "sectransp" )
set_tls_backend ( "SecureTransport" )
elseif ( GIT2_FEATURE STREQUAL "mbedtls" )
set_tls_backend ( "mbedTLS" )
2024-04-30 08:20:16 +08:00
elseif ( GIT2_FEATURE STREQUAL "ssh" )
set ( USE_SSH ON )
message ( STATUS "This version of `libgit2` uses the default (`libssh2`) backend. To use the newer backend which utilizes the `ssh` CLI from a local install of OpenSSH instead, create an overlay port of this with USE_SSH set to 'exec' and the `libssh2` dependency removed." )
message ( STATUS "This recipe is at ${CMAKE_CURRENT_LIST_DIR}" )
message ( STATUS "See the overlay ports documentation at https://learn.microsoft.com/vcpkg/concepts/overlay-ports" )
2020-10-21 03:23:12 +08:00
endif ( )
endforeach ( )
if ( NOT REGEX_BACKEND )
message ( FATAL_ERROR "Must choose pcre or pcre2 regex backend" )
2020-03-12 00:16:42 +08:00
endif ( )
2023-07-12 02:18:41 +08:00
vcpkg_find_acquire_program ( PKGCONFIG )
2020-10-21 03:23:12 +08:00
vcpkg_check_features (
O U T _ F E A T U R E _ O P T I O N S G I T 2 _ F E A T U R E S
2024-04-30 08:20:16 +08:00
F E A T U R E S
2023-07-12 02:18:41 +08:00
t o o l s B U I L D _ C L I
2020-10-21 03:23:12 +08:00
)
2021-09-08 22:55:21 +08:00
vcpkg_cmake_configure (
S O U R C E _ P A T H " $ { S O U R C E _ P A T H } "
2018-08-08 13:47:52 +08:00
O P T I O N S
2022-03-05 05:30:30 +08:00
- D B U I L D _ T E S T S = O F F
2020-10-21 03:23:12 +08:00
- D U S E _ H T T P _ P A R S E R = s y s t e m
- D U S E _ H T T P S = $ { U S E _ H T T P S }
2020-03-12 00:16:42 +08:00
- D R E G E X _ B A C K E N D = $ { R E G E X _ B A C K E N D }
2024-04-30 08:20:16 +08:00
- D U S E _ S S H = $ { U S E _ S S H }
2018-10-09 15:27:45 +08:00
- D S T A T I C _ C R T = $ { S T A T I C _ C R T }
2023-07-12 02:18:41 +08:00
" - D P K G _ C O N F I G _ E X E C U T A B L E = $ { P K G C O N F I G } "
- D C M A K E _ D I S A B L E _ F I N D _ P A C K A G E _ G S S A P I : B O O L = O N
2020-10-21 03:23:12 +08:00
$ { G I T 2 _ F E A T U R E S }
2023-07-12 02:18:41 +08:00
O P T I O N S _ D E B U G
- D B U I L D _ C L I = O F F
M A Y B E _ U N U S E D _ V A R I A B L E S
S T A T I C _ C R T
2017-12-24 00:14:20 +08:00
)
2021-09-08 22:55:21 +08:00
vcpkg_cmake_install ( )
2021-11-05 01:39:06 +08:00
vcpkg_fixup_pkgconfig ( )
2017-12-24 00:14:20 +08:00
2023-07-12 02:18:41 +08:00
file ( INSTALL "${CMAKE_CURRENT_LIST_DIR}/unofficial-git2-config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/unofficial-git2" )
file ( INSTALL "${CMAKE_CURRENT_LIST_DIR}/unofficial-libgit2-config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/unofficial-libgit2" )
vcpkg_cmake_config_fixup ( PACKAGE_NAME unofficial-libgit2 CONFIG_PATH share/unofficial-libgit2 )
if ( "tools" IN_LIST FEATURES )
vcpkg_copy_tools ( TOOL_NAMES git2 AUTO_CLEAN )
endif ( )
2021-09-08 22:55:21 +08:00
file ( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" )
2017-12-24 00:14:20 +08:00
2023-07-12 02:18:41 +08:00
file ( INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" )
set ( file_list "${SOURCE_PATH}/COPYING" )
if ( NOT VCPKG_TARGET_IS_WINDOWS )
file ( WRITE "${CURRENT_BUILDTREES_DIR}/Notice for ntlmclient" [[
Copyright ( c ) E d w a r d T h o m s o n . A l l r i g h t s r e s e r v e d .
T h e s e s o u r c e f i l e s a r e p a r t o f n t l m c l i e n t , d i s t r i b u t e d u n d e r t h e M I T l i c e n s e .
] ] )
list ( APPEND file_list "${CURRENT_BUILDTREES_DIR}/Notice for ntlmclient" )
endif ( )
vcpkg_install_copyright ( FILE_LIST ${ file_list } )