diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/pdcurses | |
Diffstat (limited to 'vcpkg/ports/pdcurses')
| -rw-r--r-- | vcpkg/ports/pdcurses/LICENSE | 7 | ||||
| -rw-r--r-- | vcpkg/ports/pdcurses/nmake-install.patch | 21 | ||||
| -rw-r--r-- | vcpkg/ports/pdcurses/portfile.cmake | 44 | ||||
| -rw-r--r-- | vcpkg/ports/pdcurses/unofficial-pdcurses-config.cmake | 24 | ||||
| -rw-r--r-- | vcpkg/ports/pdcurses/vcpkg.json | 9 |
5 files changed, 105 insertions, 0 deletions
diff --git a/vcpkg/ports/pdcurses/LICENSE b/vcpkg/ports/pdcurses/LICENSE new file mode 100644 index 0000000..ec633d8 --- /dev/null +++ b/vcpkg/ports/pdcurses/LICENSE @@ -0,0 +1,7 @@ +The core package is in the public domain, but small portions of PDCurses are subject to copyright under various licenses. + +The win32 files are released to the public domain. + +If you use PDCurses in an application, an acknowledgement would be appreciated, but is not mandatory. If you make corrections or enhancements to PDCurses, please forward them to the current maintainer for the benefit of other users. + +This software is provided AS IS with NO WARRANTY whatsoever.
\ No newline at end of file diff --git a/vcpkg/ports/pdcurses/nmake-install.patch b/vcpkg/ports/pdcurses/nmake-install.patch new file mode 100644 index 0000000..8925503 --- /dev/null +++ b/vcpkg/ports/pdcurses/nmake-install.patch @@ -0,0 +1,21 @@ +diff --git a/wincon/Makefile.vc b/wincon/Makefile.vc +index 80c4689..1bae388 100644 +--- a/wincon/Makefile.vc ++++ b/wincon/Makefile.vc +@@ -118,3 +118,16 @@ tui.obj: $(demodir)\tui.c $(demodir)\tui.h + + tuidemo.obj: $(demodir)\tuidemo.c + $(BUILD) -I$(demodir) $(demodir)\tuidemo.c ++ ++install: all ++ -mkdir $(INSTALLDIR)\lib ++ copy pdcurses.lib $(INSTALLDIR)\lib ++!ifdef DLL ++ -mkdir $(INSTALLDIR)\bin ++ copy pdcurses.dll $(INSTALLDIR)\bin ++!endif ++!ifndef SKIP_HEADERS ++ -mkdir $(INSTALLDIR)\include ++ copy $(PDCURSES_SRCDIR)\curses.h $(INSTALLDIR)\include ++ copy $(PDCURSES_SRCDIR)\panel.h $(INSTALLDIR)\include ++!endif diff --git a/vcpkg/ports/pdcurses/portfile.cmake b/vcpkg/ports/pdcurses/portfile.cmake new file mode 100644 index 0000000..1e99b95 --- /dev/null +++ b/vcpkg/ports/pdcurses/portfile.cmake @@ -0,0 +1,44 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO wmcbrine/PDCurses + REF ${VERSION} + SHA512 4fd7c1221c5f34d94069a563dda7a796653148d903bc9023afe134b0f13bdc8b5d30000dfc80ab800e46e58b395ac2fb494d1316b80914998de5bacf0d7f3558 + HEAD_REF master + PATCHES + nmake-install.patch +) + +if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) + cmake_path(NATIVE_PATH SOURCE_PATH PDCURSES_SRCDIR) + set(DLL_OPTION "") + if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(DLL_OPTION DLL=Y) + endif() + vcpkg_build_nmake( + SOURCE_PATH "${SOURCE_PATH}/wincon" + PROJECT_NAME Makefile.vc + ENABLE_INSTALL + OPTIONS + /A + "PDCURSES_SRCDIR=${PDCURSES_SRCDIR}" + WIDE=Y + UTF8=Y + PLATFORM=${VCPKG_TARGET_ARCHITECTURE} + ${DLL_OPTION} + OPTIONS_RELEASE + "CFLAGS=-D_CRT_SECURE_NO_WARNINGS" + "LDFLAGS=" + OPTIONS_DEBUG + "CFLAGS=-D_CRT_SECURE_NO_WARNINGS -DPDCDEBUG" + "LDFLAGS=-debug" + DEBUG=Y + SKIP_HEADERS=Y + ) + vcpkg_copy_pdbs() + if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/curses.h" "#ifdef PDC_DLL_BUILD" "#if 1") + endif() +endif() + +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/unofficial-pdcurses-config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/unofficial-${PORT}") +vcpkg_install_copyright(FILE_LIST "${CMAKE_CURRENT_LIST_DIR}/LICENSE") diff --git a/vcpkg/ports/pdcurses/unofficial-pdcurses-config.cmake b/vcpkg/ports/pdcurses/unofficial-pdcurses-config.cmake new file mode 100644 index 0000000..804e29e --- /dev/null +++ b/vcpkg/ports/pdcurses/unofficial-pdcurses-config.cmake @@ -0,0 +1,24 @@ +if(NOT TARGET unofficial::pdcurses::pdcurses)
+ add_library(unofficial::pdcurses::pdcurses UNKNOWN IMPORTED)
+ get_filename_component(z_vcpkg_pdcurses_root "${CMAKE_CURRENT_LIST_FILE}" PATH)
+ get_filename_component(z_vcpkg_pdcurses_root "${z_vcpkg_pdcurses_root}" PATH)
+ get_filename_component(z_vcpkg_pdcurses_root "${z_vcpkg_pdcurses_root}" PATH)
+
+ set_target_properties(unofficial::pdcurses::pdcurses PROPERTIES
+ INTERFACE_INCLUDE_DIRECTORIES "${z_vcpkg_pdcurses_root}/include"
+ )
+
+ find_library(Z_VCPKG_PDCURSES_LIBRARY_RELEASE NAMES pdcurses PATHS "${z_vcpkg_pdcurses_root}/lib" NO_DEFAULT_PATH)
+ if(EXISTS "${Z_VCPKG_PDCURSES_LIBRARY_RELEASE}")
+ set_property(TARGET unofficial::pdcurses::pdcurses APPEND PROPERTY IMPORTED_CONFIGURATIONS "Release")
+ set_target_properties(unofficial::pdcurses::pdcurses PROPERTIES IMPORTED_LOCATION_RELEASE "${Z_VCPKG_PDCURSES_LIBRARY_RELEASE}")
+ endif()
+
+ find_library(Z_VCPKG_PDCURSES_LIBRARY_DEBUG NAMES pdcurses PATHS "${z_vcpkg_pdcurses_root}/debug/lib" NO_DEFAULT_PATH)
+ if(EXISTS "${Z_VCPKG_PDCURSES_LIBRARY_DEBUG}")
+ set_property(TARGET unofficial::pdcurses::pdcurses APPEND PROPERTY IMPORTED_CONFIGURATIONS "Debug")
+ set_target_properties(unofficial::pdcurses::pdcurses PROPERTIES IMPORTED_LOCATION_DEBUG "${Z_VCPKG_PDCURSES_LIBRARY_DEBUG}")
+ endif()
+
+ unset(z_vcpkg_pdcurses_root)
+endif()
diff --git a/vcpkg/ports/pdcurses/vcpkg.json b/vcpkg/ports/pdcurses/vcpkg.json new file mode 100644 index 0000000..f4ef141 --- /dev/null +++ b/vcpkg/ports/pdcurses/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "pdcurses", + "version": "3.9", + "port-version": 7, + "description": "Public Domain Curses - a curses library for environments that don't fit the termcap/terminfo model.", + "homepage": "https://pdcurses.org/", + "license": null, + "supports": "windows & !uwp & !mingw" +} |