aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/tvision
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/tvision
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/tvision')
-rw-r--r--vcpkg/ports/tvision/find-curses.diff27
-rw-r--r--vcpkg/ports/tvision/portfile.cmake24
-rw-r--r--vcpkg/ports/tvision/vcpkg.json23
3 files changed, 74 insertions, 0 deletions
diff --git a/vcpkg/ports/tvision/find-curses.diff b/vcpkg/ports/tvision/find-curses.diff
new file mode 100644
index 0000000..3c247f1
--- /dev/null
+++ b/vcpkg/ports/tvision/find-curses.diff
@@ -0,0 +1,27 @@
+diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
+index d24f807..e3ad262 100644
+--- a/source/CMakeLists.txt
++++ b/source/CMakeLists.txt
+@@ -88,6 +88,7 @@ endif()
+ # Dependencies
+
+ if (NOT WIN32)
++#[[
+ # ncursesw
+ find_library(NCURSESW ncursesw)
+ if (NOT NCURSESW AND APPLE)
+@@ -125,6 +126,14 @@ if (NOT WIN32)
+ tv_message(STATUS "Found 'tinfow': ${TINFOW}")
+ target_link_libraries(${PROJECT_NAME} PUBLIC ${TINFOW})
+ endif()
++]]
++ set(CURSES_NEED_NCURSES 1)
++ set(CURSES_NEED_WIDE 1)
++ find_package(Curses REQUIRED)
++ target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_NCURSES)
++ find_path(NCURSESW_INCLUDE NAMES "ncurses.h" PATHS ${CURSES_INCLUDE_DIRS} PATH_SUFFIXES "ncursesw")
++ target_include_directories(${PROJECT_NAME} PRIVATE ${NCURSESW_INCLUDE})
++ target_link_libraries(${PROJECT_NAME} PUBLIC ${CURSES_LIBRARIES})
+
+ # gpm
+ if (TV_BUILD_USING_GPM)
diff --git a/vcpkg/ports/tvision/portfile.cmake b/vcpkg/ports/tvision/portfile.cmake
new file mode 100644
index 0000000..ad23f3f
--- /dev/null
+++ b/vcpkg/ports/tvision/portfile.cmake
@@ -0,0 +1,24 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO magiblot/tvision
+ REF 966226d643cd638fb516b621ac90a31f3ec8d1f6
+ HEAD_REF master
+ SHA512 b18a466cad2edebff62f6db6d5ab6b6b4d000fbc0fcc682f169efd9c0cc7efe5f0535ffa019f9dcb3d6e7931f77c476ec5d11aa7b39ed7ce0417ceec270f2d36
+ PATCHES
+ find-curses.diff
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS
+ -DTV_BUILD_EXAMPLES=OFF
+ -DTV_BUILD_TESTS=OFF
+)
+
+vcpkg_cmake_install()
+
+vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT})
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYRIGHT")
diff --git a/vcpkg/ports/tvision/vcpkg.json b/vcpkg/ports/tvision/vcpkg.json
new file mode 100644
index 0000000..1795348
--- /dev/null
+++ b/vcpkg/ports/tvision/vcpkg.json
@@ -0,0 +1,23 @@
+{
+ "name": "tvision",
+ "version-date": "2024-05-22",
+ "port-version": 1,
+ "description": "A modern port of Turbo Vision 2.0, the classical framework for text-based user interfaces.",
+ "homepage": "https://github.com/magiblot/tvision",
+ "license": "MIT",
+ "supports": "!uwp",
+ "dependencies": [
+ {
+ "name": "ncurses",
+ "platform": "!windows"
+ },
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
+}