2023-01-10 06:15:51 +08:00
set ( VCPKG_POLICY_DLLS_IN_STATIC_LIBRARY enabled ) # for plugins
2021-10-13 08:02:59 +08:00
vcpkg_from_gitlab (
G I T L A B _ U R L h t t p s : / / g i t l a b . c o m
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 g r a p h v i z / g r a p h v i z
2022-11-10 01:37:41 +08:00
R E F " $ { V E R S I O N } "
2023-09-19 00:28:07 +08:00
S H A 5 1 2 1 e d c f 6 a a 2 3 2 d 3 8 d 1 8 6 1 a 3 4 4 c 1 a 4 a 8 8 a a c 5 1 f d 4 6 5 6 d 6 6 7 7 8 3 c a 1 6 0 8 a c 6 9 4 0 2 5 1 9 9 5 9 5 a 7 2 a 2 9 3 c 4 e e e 2 f 7 c 7 3 2 6 c e 5 4 f 2 2 b 7 8 7 a 5 b 7 f 4 c 4 4 9 4 6 f 2 d e 6 0 9 6 b d 8 f 0 e 7 9 d
2021-10-13 08:02:59 +08:00
H E A D _ R E F m a i n
P A T C H E S
2022-11-10 01:37:41 +08:00
f i x - d e p e n d e n c i e s . p a t c h
2023-01-10 06:15:51 +08:00
n o - a b s o l u t e - p a t h s . p a t c h
2022-11-10 01:37:41 +08:00
s e l e c t - p l u g i n s . p a t c h
2023-01-10 06:15:51 +08:00
s t a t i c - l i n k a g e . p a t c h
2023-09-19 00:28:07 +08:00
c p p - e r r o r . p a t c h
2021-10-13 08:02:59 +08:00
)
2022-02-23 04:56:16 +08:00
if ( VCPKG_TARGET_IS_OSX )
message ( "${PORT} currently requires the following libraries from the system package manager:\n libtool\n\nThey can be installed with brew install libtool" )
elseif ( VCPKG_TARGET_IS_LINUX )
message ( "${PORT} currently requires the following libraries from the system package manager:\n libtool\n\nThey can be installed with apt-get install libtool" )
2022-11-10 01:37:41 +08:00
endif ( )
vcpkg_list ( SET OPTIONS )
if ( VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW )
2022-02-23 04:56:16 +08:00
vcpkg_download_distfile (
L T D L _ H _ P A T H
2023-07-11 06:20:45 +08:00
U R L S " h t t p s : / / g i t l a b . c o m / g r a p h v i z / g r a p h v i z - w i n d o w s - d e p e n d e n c i e s / - / r a w / 1 4 1 d 3 a 2 1 b e 9 0 4 f a 8 d c 2 a e 3 e d 0 1 d 3 6 6 8 4 d b 0 7 a 3 5 d / x 6 4 / i n c l u d e / l t d l . h "
2022-11-10 01:37:41 +08:00
F I L E N A M E g r a p h v i z - l t d l - 1 4 1 d 3 a 2 1 . h
2022-02-23 04:56:16 +08:00
S H A 5 1 2 f 2 d 2 0 e 8 4 9 e 3 5 0 6 0 5 3 6 2 6 5 f 4 7 0 1 4 c 4 0 e b 7 0 e 5 7 d a c d 6 0 0 a 9 d b 1 1 2 f c 4 6 5 f b f a 6 a 6 6 2 1 7 b 4 4 a 8 c 3 d c 3 3 0 3 9 c 2 6 0 a 2 7 f 0 9 d 9 0 3 4 b 3 2 9 b 0 3 c c 2 8 c 3 2 a 2 2 e c 5 0 3 f c d 1 7 b 7 8 c d
)
2022-11-10 01:37:41 +08:00
file ( INSTALL "${LTDL_H_PATH}" DESTINATION "${SOURCE_PATH}/libltdl" RENAME ltdl.h )
vcpkg_list ( APPEND OPTIONS "-DLTDL_INCLUDE_DIR=${SOURCE_PATH}/libltdl" )
2022-02-23 04:56:16 +08:00
endif ( )
2022-04-09 06:34:42 +08:00
if ( VCPKG_HOST_IS_WINDOWS )
vcpkg_acquire_msys ( MSYS_ROOT PACKAGES gawk )
vcpkg_add_to_path ( "${MSYS_ROOT}/usr/bin" )
2022-11-10 01:37:41 +08:00
unset ( ENV{MSYSTEM_PREFIX} )
2022-04-09 06:34:42 +08:00
endif ( )
2021-10-13 08:02:59 +08:00
vcpkg_find_acquire_program ( BISON )
vcpkg_find_acquire_program ( FLEX )
vcpkg_find_acquire_program ( GIT )
vcpkg_find_acquire_program ( PYTHON3 )
vcpkg_cmake_configure (
S O U R C E _ P A T H " $ { S O U R C E _ P A T H } "
D I S A B L E _ P A R A L L E L _ C O N F I G U R E
O P T I O N S
2022-11-10 01:37:41 +08:00
" - D V E R S I O N = $ { V E R S I O N } "
2022-04-09 06:34:42 +08:00
" - D B I S O N _ E X E C U T A B L E = $ { B I S O N } "
" - D F L E X _ E X E C U T A B L E = $ { F L E X } "
2022-11-10 01:37:41 +08:00
" - D G I T = $ { G I T } "
2022-04-09 06:34:42 +08:00
" - D P y t h o n 3 _ E X E C U T A B L E = $ { P Y T H O N 3 } "
" - D P K G _ C O N F I G _ E X E C U T A B L E = $ { C U R R E N T _ H O S T _ I N S T A L L E D _ D I R } / t o o l s / p k g c o n f / p k g c o n f "
2023-01-10 06:15:51 +08:00
" - D C M A K E _ P R O J E C T _ I N C L U D E = $ { C M A K E _ C U R R E N T _ L I S T _ D I R } / c m a k e - p r o j e c t - i n c l u d e . c m a k e "
2022-11-10 01:37:41 +08:00
- D i n s t a l l _ w i n _ d e p e n d e n c y _ d l l s = O F F
- D u s e _ w i n _ p r e _ i n s t _ l i b s = O F F
- D w i t h _ s m y r n a = O F F
- D C M A K E _ D I S A B L E _ F I N D _ P A C K A G E _ A N N = O N
- D C M A K E _ R E Q U I R E _ F I N D _ P A C K A G E _ C A I R O = O N
- D C M A K E _ R E Q U I R E _ F I N D _ P A C K A G E _ E X P A T = O N
- D C M A K E _ R E Q U I R E _ F I N D _ P A C K A G E _ G D = O N
- D C M A K E _ R E Q U I R E _ F I N D _ P A C K A G E _ L T D L = O N
- D C M A K E _ R E Q U I R E _ F I N D _ P A C K A G E _ P A N G O C A I R O = O N
2023-09-19 00:28:07 +08:00
- D w i t h _ g v e d i t = O F F
2022-11-10 01:37:41 +08:00
$ { O P T I O N S }
M A Y B E _ U N U S E D _ V A R I A B L E S
i n s t a l l _ w i n _ d e p e n d e n c y _ d l l s
2021-10-13 08:02:59 +08:00
)
2022-11-10 01:37:41 +08:00
vcpkg_cmake_install ( ADD_BIN_TO_PATH )
vcpkg_fixup_pkgconfig ( )
2021-10-13 08:02:59 +08:00
2022-11-10 01:37:41 +08:00
file ( REMOVE_RECURSE
" $ { C U R R E N T _ P A C K A G E S _ D I R } / d e b u g / i n c l u d e "
" $ { C U R R E N T _ P A C K A G E S _ D I R } / d e b u g / s h a r e "
" $ { C U R R E N T _ P A C K A G E S _ D I R } / s h a r e / m a n "
)
2021-10-13 08:02:59 +08:00
2022-11-10 01:37:41 +08:00
file ( MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}" )
foreach ( script_or_link IN ITEMS "dot2gxl${VCPKG_TARGET_EXECUTABLE_SUFFIX}" gvmap.sh )
if ( EXISTS "${CURRENT_PACKAGES_DIR}/bin/${script_or_link}" )
file ( RENAME "${CURRENT_PACKAGES_DIR}/bin/${script_or_link}" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/${script_or_link}" )
file ( REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/${script_or_link}" )
endif ( )
endforeach ( )
2021-10-13 08:02:59 +08:00
vcpkg_copy_tools (
2023-09-19 00:28:07 +08:00
T O O L _ N A M E S
a c y c l i c
b c o m p s
c c o m p s
c i r c o
d i f f i m g
d i j k s t r a
d o t
e d g e p a i n t
f d p
g c
g m l 2 g v
g r a p h m l 2 g v
g v 2 g m l
g v c o l o r
g v g e n
g v m a p
g v p a c k
g v p r
g x l 2 g v
m m 2 g v
n e a t o
n o p
o s a g e
p a t c h w o r k
s c c m a p
s f d p
t r e d
t w o p i
u n f l a t t e n
c l u s t e r
d o t _ b u i l t i n s
g v 2 g x l
g x l 2 d o t
p r u n e
2021-10-13 08:02:59 +08:00
A U T O _ C L E A N
)
2022-11-10 01:37:41 +08:00
file ( GLOB plugin_config "${CURRENT_PACKAGES_DIR}/lib/graphviz/config*" "${CURRENT_PACKAGES_DIR}/bin/config*" )
if ( NOT plugin_config )
message ( WARNING
" I n o r d e r t o c r e a t e t h e p l u g i n c o n f i g u r a t i o n f i l e , "
" y o u m u s t r u n ` d o t - c ` o n t h e t a r g e t s y s t e m . "
2022-02-23 04:56:16 +08:00
)
endif ( )
2022-11-10 01:37:41 +08:00
if ( VCPKG_TARGET_IS_WINDOWS )
file ( GLOB plugins "${CURRENT_PACKAGES_DIR}/bin/gvplugin_*" )
file ( COPY ${ plugins } ${ plugin_config } DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}" )
2023-01-10 06:15:51 +08:00
else ( )
file ( COPY "${CURRENT_PACKAGES_DIR}/lib/graphviz" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}" )
2022-11-10 01:37:41 +08:00
endif ( )
2022-02-23 04:56:16 +08:00
2023-07-11 06:20:45 +08:00
vcpkg_install_copyright ( FILE_LIST "${SOURCE_PATH}/LICENSE" )