2021-12-21 00:35:06 +08:00
|
|
|
set(NCURSES_VERSION_STR 6.3)
|
2021-05-01 02:12:25 +08:00
|
|
|
vcpkg_download_distfile(
|
|
|
|
ARCHIVE_PATH
|
|
|
|
URLS
|
2021-12-21 00:35:06 +08:00
|
|
|
"https://invisible-mirror.net/archives/ncurses/ncurses-${NCURSES_VERSION_STR}.tar.gz"
|
|
|
|
"ftp://ftp.invisible-island.net/ncurses/ncurses-${NCURSES_VERSION_STR}.tar.gz"
|
|
|
|
"https://ftp.gnu.org/gnu/ncurses/ncurses-${NCURSES_VERSION_STR}.tar.gz"
|
|
|
|
FILENAME "ncurses-${NCURSES_VERSION_STR}.tgz"
|
|
|
|
SHA512 5373f228cba6b7869210384a607a2d7faecfcbfef6dbfcd7c513f4e84fbd8bcad53ac7db2e7e84b95582248c1039dcfc7c4db205a618f7da22a166db482f0105
|
2021-05-01 02:12:25 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_extract_source_archive_ex(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
2021-12-21 00:35:06 +08:00
|
|
|
ARCHIVE "${ARCHIVE_PATH}"
|
2021-05-01 02:12:25 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
set(OPTIONS
|
|
|
|
--disable-db-install
|
|
|
|
--enable-pc-files
|
2021-12-21 00:35:06 +08:00
|
|
|
--without-ada
|
2021-05-01 02:12:25 +08:00
|
|
|
--without-manpages
|
|
|
|
--without-progs
|
|
|
|
--without-tack
|
|
|
|
--without-tests
|
|
|
|
)
|
2021-12-21 00:35:06 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
2021-05-01 02:12:25 +08:00
|
|
|
list(APPEND OPTIONS
|
|
|
|
--with-shared
|
|
|
|
--with-cxx-shared
|
|
|
|
--without-normal
|
|
|
|
)
|
|
|
|
endif()
|
2021-12-21 00:35:06 +08:00
|
|
|
if(VCPKG_TARGET_IS_MINGW)
|
|
|
|
list(APPEND OPTIONS
|
|
|
|
--disable-home-terminfo
|
|
|
|
--enable-term-driver
|
|
|
|
--disable-termcap
|
|
|
|
)
|
|
|
|
endif()
|
2021-05-01 02:12:25 +08:00
|
|
|
|
|
|
|
set(OPTIONS_DEBUG
|
2021-12-21 00:35:06 +08:00
|
|
|
"--with-pkg-config-libdir=${CURRENT_INSTALLED_DIR}/debug/lib/pkgconfig"
|
2021-05-01 02:12:25 +08:00
|
|
|
--with-debug
|
2022-03-12 01:57:37 +08:00
|
|
|
--without-normal
|
2021-05-01 02:12:25 +08:00
|
|
|
)
|
|
|
|
set(OPTIONS_RELEASE
|
2021-12-21 00:35:06 +08:00
|
|
|
"--with-pkg-config-libdir=${CURRENT_INSTALLED_DIR}/lib/pkgconfig"
|
2021-05-01 02:12:25 +08:00
|
|
|
--without-debug
|
2022-03-12 01:57:37 +08:00
|
|
|
--with-normal
|
2021-05-01 02:12:25 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_configure_make(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
OPTIONS ${OPTIONS}
|
|
|
|
OPTIONS_DEBUG ${OPTIONS_DEBUG}
|
|
|
|
OPTIONS_RELEASE ${OPTIONS_RELEASE}
|
|
|
|
NO_ADDITIONAL_PATHS
|
|
|
|
)
|
|
|
|
vcpkg_install_make()
|
|
|
|
|
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
|
|
|
2021-12-21 00:35:06 +08:00
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
2021-05-01 02:12:25 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|