mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 04:49:08 +08:00
[ncurses] Add new port (#17226)
* [ncurses] Add new port. * x-add-version * Test ncurses port against CMake.
This commit is contained in:
parent
efddfbf13e
commit
cc726b6a6d
59
ports/ncurses/portfile.cmake
Normal file
59
ports/ncurses/portfile.cmake
Normal file
@ -0,0 +1,59 @@
|
||||
vcpkg_fail_port_install(ON_TARGET "Windows" "UWP")
|
||||
|
||||
vcpkg_download_distfile(
|
||||
ARCHIVE_PATH
|
||||
URLS
|
||||
"https://invisible-mirror.net/archives/ncurses/ncurses-6.2.tar.gz"
|
||||
"ftp://ftp.invisible-island.net/ncurses/ncurses-6.2.tar.gz"
|
||||
"ftp://ftp.gnu.org/gnu/ncurses/ncurses-6.2.tar.gz"
|
||||
FILENAME "ncurses-6.2.tgz"
|
||||
SHA512 4c1333dcc30e858e8a9525d4b9aefb60000cfc727bc4a1062bace06ffc4639ad9f6e54f6bdda0e3a0e5ea14de995f96b52b3327d9ec633608792c99a1e8d840d
|
||||
)
|
||||
|
||||
vcpkg_extract_source_archive_ex(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
ARCHIVE ${ARCHIVE_PATH}
|
||||
)
|
||||
|
||||
set(OPTIONS
|
||||
--disable-db-install
|
||||
--enable-pc-files
|
||||
--without-manpages
|
||||
--without-progs
|
||||
--without-tack
|
||||
--without-tests
|
||||
)
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
list(APPEND OPTIONS
|
||||
--with-shared
|
||||
--with-cxx-shared
|
||||
--without-normal
|
||||
)
|
||||
endif()
|
||||
|
||||
set(OPTIONS_DEBUG
|
||||
--with-pkg-config-libdir=${CURRENT_INSTALLED_DIR}/debug/lib/pkgconfig
|
||||
--with-debug
|
||||
)
|
||||
set(OPTIONS_RELEASE
|
||||
--with-pkg-config-libdir=${CURRENT_INSTALLED_DIR}/lib/pkgconfig
|
||||
--without-debug
|
||||
)
|
||||
|
||||
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")
|
||||
|
||||
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
6
ports/ncurses/vcpkg.json
Normal file
6
ports/ncurses/vcpkg.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "ncurses",
|
||||
"version-string": "6.2",
|
||||
"description": "free software emulation of curses in System V Release 4.0",
|
||||
"supports": "!(windows | uwp)"
|
||||
}
|
@ -10,6 +10,10 @@ vcpkg_from_gitlab(
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
if(NOT VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_UWP)
|
||||
set(BUILD_CURSES_DIALOG ON)
|
||||
endif()
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
@ -26,6 +30,7 @@ vcpkg_configure_cmake(
|
||||
-DCMAKE_USE_SYSTEM_JSONCPP=ON
|
||||
-DCMAKE_USE_SYSTEM_LIBRHASH=OFF # not yet in VCPKG
|
||||
-DCMAKE_USE_SYSTEM_LIBUV=ON
|
||||
-DBUILD_CursesDialog=${BUILD_CURSES_DIALOG}
|
||||
-DBUILD_QtDialog=ON # Just to test Qt with CMake
|
||||
)
|
||||
|
||||
@ -37,6 +42,9 @@ if(NOT VCPKG_TARGET_IS_OSX)
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
list(APPEND _tools cmcldeps)
|
||||
endif()
|
||||
if(BUILD_CURSES_DIALOG)
|
||||
list(APPEND _tools ccmake)
|
||||
endif()
|
||||
vcpkg_copy_tools(TOOL_NAMES ${_tools} AUTO_CLEAN)
|
||||
else()
|
||||
# On OSX everything is within a CMake.app folder
|
||||
|
@ -11,6 +11,10 @@
|
||||
"libarchive",
|
||||
"liblzma",
|
||||
"libuv",
|
||||
{
|
||||
"name": "ncurses",
|
||||
"platform": "!(windows | uwp)"
|
||||
},
|
||||
"nghttp2",
|
||||
"qt5-base",
|
||||
{
|
||||
|
@ -4204,6 +4204,10 @@
|
||||
"baseline": "2.4.6",
|
||||
"port-version": 0
|
||||
},
|
||||
"ncurses": {
|
||||
"baseline": "6.2",
|
||||
"port-version": 0
|
||||
},
|
||||
"neargye-semver": {
|
||||
"baseline": "0.2.2",
|
||||
"port-version": 0
|
||||
|
9
versions/n-/ncurses.json
Normal file
9
versions/n-/ncurses.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "ab8de39c1659867da459ac0bec7e09bee5762819",
|
||||
"version-string": "6.2",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user