| 1 |
vcpkg_download_distfile( |
| 2 |
ARCHIVE_PATH |
| 3 |
URLS |
| 4 |
"https://invisible-mirror.net/archives/ncurses/ncurses-${VERSION}.tar.gz" |
| 5 |
"ftp://ftp.invisible-island.net/ncurses/ncurses-${VERSION}.tar.gz" |
| 6 |
"https://ftp.gnu.org/gnu/ncurses/ncurses-${VERSION}.tar.gz" |
| 7 |
FILENAME "ncurses-${VERSION}.tgz" |
| 8 |
SHA512 fc5a13409d2a530a1325776dcce3a99127ddc2c03999cfeb0065d0eee2d68456274fb1c7b3cc99c1937bc657d0e7fca97016e147f93c7821b5a4a6837db821e8 |
| 9 |
) |
| 10 |
|
| 11 |
vcpkg_extract_source_archive( |
| 12 |
SOURCE_PATH |
| 13 |
ARCHIVE "${ARCHIVE_PATH}" |
| 14 |
) |
| 15 |
|
| 16 |
vcpkg_list(SET OPTIONS) |
| 17 |
|
| 18 |
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") |
| 19 |
list(APPEND OPTIONS |
| 20 |
--with-cxx-shared |
| 21 |
--with-shared # "lib model" |
| 22 |
--without-normal # "lib model" |
| 23 |
) |
| 24 |
endif() |
| 25 |
|
| 26 |
if(NOT "wide-char" IN_LIST FEATURES) |
| 27 |
list(APPEND OPTIONS |
| 28 |
--disable-widec # Enabled by default starting at 6.5. Disabled by default here for compatibility. |
| 29 |
) |
| 30 |
endif() |
| 31 |
|
| 32 |
if(NOT VCPKG_TARGET_IS_MINGW) |
| 33 |
list(APPEND OPTIONS |
| 34 |
--enable-mixed-case |
| 35 |
) |
| 36 |
endif() |
| 37 |
|
| 38 |
if(VCPKG_TARGET_IS_MINGW) |
| 39 |
list(APPEND OPTIONS |
| 40 |
--disable-home-terminfo |
| 41 |
--enable-term-driver |
| 42 |
--disable-termcap |
| 43 |
) |
| 44 |
endif() |
| 45 |
|
| 46 |
if(VCPKG_TARGET_IS_LINUX) |
| 47 |
list(APPEND OPTIONS "CFLAGS=-std=gnu17") |
| 48 |
endif() |
| 49 |
|
| 50 |
vcpkg_configure_make( |
| 51 |
SOURCE_PATH "${SOURCE_PATH}" |
| 52 |
DETERMINE_BUILD_TRIPLET |
| 53 |
NO_ADDITIONAL_PATHS |
| 54 |
OPTIONS |
| 55 |
${OPTIONS} |
| 56 |
--disable-db-install |
| 57 |
--enable-pc-files |
| 58 |
--without-ada |
| 59 |
--without-debug # "lib model" |
| 60 |
--without-manpages |
| 61 |
--without-progs |
| 62 |
--without-tack |
| 63 |
--without-tests |
| 64 |
--with-pkg-config-libdir=libdir |
| 65 |
) |
| 66 |
vcpkg_install_make() |
| 67 |
|
| 68 |
vcpkg_fixup_pkgconfig() |
| 69 |
|
| 70 |
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin") |
| 71 |
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin") |
| 72 |
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") |
| 73 |
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") |
| 74 |
|
| 75 |
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") |
| 76 |
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING") |