2022-11-08 14:49:28 -08:00
vcpkg_minimum_required ( VERSION 2022-10-12 ) # for ${VERSION}
2021-09-28 03:19:43 +03:00
if ( VCPKG_TARGET_IS_OSX )
message ( "${PORT} currently requires the following libraries from the system package manager:\n automake\n libtool\n\nThey can be installed with brew install automake libtool" )
else ( )
2022-10-25 02:09:22 +02:00
message ( "${PORT} currently requires the following libraries from the system package manager:\n automake\n libtool\n ltdl-dev\n\nThey can be installed with apt-get install automake libtool ltdl-dev" )
2021-09-28 03:19:43 +03:00
endif ( )
vcpkg_download_distfile ( ARCHIVE
U R L S " h t t p : / / 0 p o i n t e r . d e / l e n n a r t / p r o j e c t s / $ { P O R T } / $ { P O R T } - $ { V E R S I O N } . t a r . x z "
F I L E N A M E " $ { P O R T } - $ { V E R S I O N } . t a r . x z "
S H A 5 1 2 f 7 5 4 3 5 8 2 1 2 2 2 5 6 8 2 6 c d 0 1 d 0 f 5 6 7 3 e 1 e 5 8 d 9 7 9 9 4 1 a 9 3 9 0 6 4 0 0 1 8 2 3 0 5 4 6 3 d 6 1 6 6 8 5 5 c b 5 1 f 3 5 c 5 6 d 8 0 7 a 5 6 d c 2 0 b 7 a 6 4 f 7 c e 4 3 9 1 3 6 8 d 2 4 9 9 0 c 1 b 7 0 7 8 2 a 7 d 0 b 4 4 2 9 c 2
)
2022-10-25 02:09:22 +02:00
vcpkg_extract_source_archive ( SOURCE_PATH
2021-09-28 03:19:43 +03:00
A R C H I V E " $ { A R C H I V E } "
2022-10-25 02:09:22 +02:00
P A T C H E S
l t d l . p a t c h
u n d e f i n e d _ r e f e r e n c e . d i f f # https://sources.debian.org/patches/libcanberra/0.30-7/
g t k _ d o n t _ a s s u m e _ x 1 1 . p a t c h # likewise
0 3 _ o n l y s h o w i n _ u n i t y . p a t c h # likewise
l c - m e s s a g e s . p a t c h
2021-09-28 03:19:43 +03:00
)
2022-10-25 02:09:22 +02:00
foreach ( backend in oss pulse )
if ( "${backend}" IN_LIST FEATURES )
message ( STATUS "Backend '${backend}' requires system libraries" )
endif ( )
endforeach ( )
vcpkg_list ( SET OPTIONS )
foreach ( feature IN ITEMS alsa gstreamer gtk3 null oss pulse )
if ( "${feature}" IN_LIST FEATURES )
list ( APPEND OPTIONS "--enable-${feature}" )
else ( )
list ( APPEND OPTIONS "--disable-${feature}" )
endif ( )
endforeach ( )
2021-09-28 03:19:43 +03:00
if ( VCPKG_TARGET_IS_OSX )
execute_process (
C O M M A N D b r e w - - p r e f i x l i b t o o l
O U T P U T _ V A R I A B L E B R E W _ L I B T O O L _ P A T H
2022-10-25 02:09:22 +02:00
O U T P U T _ S T R I P _ T R A I L I N G _ W H I T E S P A C E
)
vcpkg_list ( APPEND OPTIONS
" C P P F L A G S = - I $ { B R E W _ L I B T O O L _ P A T H } / i n c l u d e "
" L T D L _ L D F L A G S = - L $ { B R E W _ L I B T O O L _ P A T H } / l i b "
c c _ c v _ L D F L A G S _ _ W l _ _ _ a s _ n e e d e d = n o
c c _ c v _ L D F L A G S _ _ W l _ _ _ g c _ s e c t i o n s = n o
2021-09-28 03:19:43 +03:00
)
2021-10-21 00:29:23 +02:00
endif ( )
2021-09-28 03:19:43 +03:00
set ( ENV{GTKDOCIZE} true )
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 } "
O P T I O N S
2022-10-25 02:09:22 +02:00
- - d i s a b l e - g t k
2021-09-28 03:19:43 +03:00
- - d i s a b l e - g t k - d o c
- - d i s a b l e - l y n x
- - d i s a b l e - s i l e n t - r u l e s
2021-10-21 00:29:23 +02:00
- - d i s a b l e - t d b
2022-10-25 02:09:22 +02:00
- - d i s a b l e - u d e v
$ { O P T I O N S }
2021-09-28 03:19:43 +03:00
)
vcpkg_install_make ( )
vcpkg_fixup_pkgconfig ( )
file ( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share" )
file ( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/tools" ) # empty folder
file ( INSTALL "${SOURCE_PATH}/LGPL" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright )