2021-09-28 08:19:43 +08:00
set ( VERSION 0.30 )
2022-01-26 02:31:15 +08:00
set ( PATCHES
2021-10-21 06:29:23 +08:00
p k g c o n f i g . 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
)
2021-09-28 08:19:43 +08:00
if ( VCPKG_TARGET_IS_OSX )
2021-10-21 06:29:23 +08:00
list ( APPEND PATCHES macos_fix.patch )
2021-09-28 08:19:43 +08:00
endif ( )
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 ( )
message ( "${PORT} currently requires the following libraries from the system package manager:\n automake\n libtool\n\nThey can be installed with apt-get install automake libtool" )
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
)
vcpkg_extract_source_archive_ex (
O U T _ S O U R C E _ P A T H S O U R C E _ P A T H
A R C H I V E " $ { A R C H I V E } "
R E F $ { V E R S I O N }
P A T C H E S $ { P A T C H E S }
)
set ( EXTRA_CPPFLAGS )
set ( EXTRA_LDFLAGS )
#libltdl fixes
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
)
string ( STRIP ${ BREW_LIBTOOL_PATH } BREW_LIBTOOL_PATH )
set ( LIBS_PRIVATE "-L${BREW_LIBTOOL_PATH}/lib -lltdl" )
set ( CFLAGS_PRIVATE "-I${BREW_LIBTOOL_PATH}/include" )
set ( EXTRA_LDFLAGS "LDFLAGS=${LIBS_PRIVATE}" )
set ( EXTRA_CPPFLAGS "CPPFLAGS=${CFLAGS_PRIVATE}" )
2021-10-21 06:29:23 +08:00
else ( )
set ( LIBS_PRIVATE "-lltdl" )
2021-09-28 08:19:43 +08:00
endif ( )
2021-10-21 06:29:23 +08:00
if ( NOT "alsa" IN_LIST FEATURES )
list ( APPEND FEATURES_BACKENDS "--disable-alsa" )
endif ( )
if ( NOT "gstreamer" IN_LIST FEATURES )
list ( APPEND FEATURES_BACKENDS "--disable-gstreamer" )
endif ( )
if ( NOT "null" IN_LIST FEATURES )
list ( APPEND FEATURES_BACKENDS "--disable-null" )
endif ( )
if ( NOT "oss" IN_LIST FEATURES )
list ( APPEND FEATURES_BACKENDS "--disable-oss" )
endif ( )
if ( NOT "pulse" IN_LIST FEATURES )
list ( APPEND FEATURES_BACKENDS "--disable-pulse" )
endif ( )
2021-09-28 08:19:43 +08: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
- - 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 06:29:23 +08:00
- - d i s a b l e - t d b
$ { F E A T U R E S _ B A C K E N D S }
2021-09-28 08:19:43 +08:00
$ { E X T R A _ C P P F L A G S }
$ { E X T R A _ L D F L A G S }
)
vcpkg_install_make ( )
2021-10-21 06:29:23 +08:00
configure_file ( "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/${PORT}.pc" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/${PORT}.pc" @ONLY )
configure_file ( "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/${PORT}.pc" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/${PORT}.pc" @ONLY )
2021-09-28 08:19:43 +08:00
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 )