aboutsummaryrefslogtreecommitdiff
path: root/ports
diff options
context:
space:
mode:
authorAdam Johnson <AdamJohnso@gmail.com>2021-04-30 14:12:25 -0400
committerGitHub <noreply@github.com>2021-04-30 11:12:25 -0700
commitcc726b6a6d0e8cb6da0a5af16fb62ea67706b49b (patch)
treebda42c3c2a4f2505085ce8449727893c8d1aa345 /ports
parentefddfbf13e65a096146bda3580abb11a1aac5288 (diff)
downloadvcpkg-cc726b6a6d0e8cb6da0a5af16fb62ea67706b49b.tar.gz
vcpkg-cc726b6a6d0e8cb6da0a5af16fb62ea67706b49b.zip
[ncurses] Add new port (#17226)
* [ncurses] Add new port. * x-add-version * Test ncurses port against CMake.
Diffstat (limited to 'ports')
-rw-r--r--ports/ncurses/portfile.cmake59
-rw-r--r--ports/ncurses/vcpkg.json6
2 files changed, 65 insertions, 0 deletions
diff --git a/ports/ncurses/portfile.cmake b/ports/ncurses/portfile.cmake
new file mode 100644
index 000000000..1a282c1b3
--- /dev/null
+++ b/ports/ncurses/portfile.cmake
@@ -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)
diff --git a/ports/ncurses/vcpkg.json b/ports/ncurses/vcpkg.json
new file mode 100644
index 000000000..b1e5d5192
--- /dev/null
+++ b/ports/ncurses/vcpkg.json
@@ -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)"
+}