aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2016-10-31 09:49:28 -0700
committerRobert Schumacher <roschuma@microsoft.com>2016-10-31 09:49:28 -0700
commitaa27f263e3b4a4a60f35eb20f45c132a019c8d88 (patch)
tree087ce02f88bf2bb53b65c1f1b6d3fda50d14265a
parent4a61e3154e9de19a9de05fcee7bb0f5f4d86f456 (diff)
parent016406a52b54603dcb095b57992892222c78614d (diff)
downloadvcpkg-aa27f263e3b4a4a60f35eb20f45c132a019c8d88.tar.gz
vcpkg-aa27f263e3b4a4a60f35eb20f45c132a019c8d88.zip
Merge pull request #189 from jjcamp/master
Added package for PDCurses
-rw-r--r--ports/pdcurses/CONTROL3
-rw-r--r--ports/pdcurses/LICENSE7
-rw-r--r--ports/pdcurses/portfile.cmake71
3 files changed, 81 insertions, 0 deletions
diff --git a/ports/pdcurses/CONTROL b/ports/pdcurses/CONTROL
new file mode 100644
index 000000000..66f0f4535
--- /dev/null
+++ b/ports/pdcurses/CONTROL
@@ -0,0 +1,3 @@
+Source: pdcurses
+Version: 3.4
+Description: Public Domain Curses - a curses library for environments that don't fit the termcap/terminfo model.
diff --git a/ports/pdcurses/LICENSE b/ports/pdcurses/LICENSE
new file mode 100644
index 000000000..ec633d8f2
--- /dev/null
+++ b/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/ports/pdcurses/portfile.cmake b/ports/pdcurses/portfile.cmake
new file mode 100644
index 000000000..2f3429d68
--- /dev/null
+++ b/ports/pdcurses/portfile.cmake
@@ -0,0 +1,71 @@
+include(${CMAKE_TRIPLET_FILE})
+
+if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64)
+ message(FATAL_ERROR "64-bit builds are not supported for PDCurses.")
+endif()
+
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src)
+find_program(NMAKE nmake)
+
+vcpkg_download_distfile(ARCHIVE
+ URLS "http://downloads.sourceforge.net/project/pdcurses/pdcurses/3.4/pdcurs34.zip"
+ FILENAME "pdcurs34.zip"
+ SHA512 0b916bfe37517abb80df7313608cc4e1ed7659a41ce82763000dfdfa5b8311ffd439193c74fc84a591f343147212bf1caf89e7db71f1f7e4fa70f534834cb039
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+set(PDC_NMAKE_CMD ${NMAKE} -f vcwin32.mak WIDE=Y UTF8=Y)
+set(PDC_NMAKE_CWD ${SOURCE_PATH}/win32)
+set(PDC_PDCLIB ${SOURCE_PATH}/win32/pdcurses)
+set(PDC_OUTPUT bin)
+
+if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
+ set(PDC_NMAKE_CMD ${PDC_NMAKE_CMD} DLL=Y)
+endif()
+
+message(STATUS "Build ${TARGET_TRIPLET}-rel")
+vcpkg_execute_required_process(
+ COMMAND ${PDC_NMAKE_CMD}
+ WORKING_DIRECTORY ${PDC_NMAKE_CWD}
+ LOGNAME build-${TARGET_TRIPLET}-rel
+)
+message(STATUS "Build ${TARGET_TRIPLET}-rel done")
+
+file (
+ COPY ${PDC_PDCLIB}.lib
+ DESTINATION ${CURRENT_PACKAGES_DIR}/lib
+)
+if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
+ file (
+ COPY ${PDC_PDCLIB}.dll
+ DESTINATION ${CURRENT_PACKAGES_DIR}/bin
+ )
+endif()
+
+message(STATUS "Build ${TARGET_TRIPLET}-dbg")
+vcpkg_execute_required_process(
+ COMMAND ${PDC_NMAKE_CMD} DEBUG=Y
+ WORKING_DIRECTORY ${PDC_NMAKE_CWD}
+ LOGNAME build-${TARGET_TRIPLET}-dbg
+)
+message(STATUS "Build ${TARGET_TRIPLET}-dbg done")
+
+file (
+ COPY ${PDC_PDCLIB}.lib
+ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib
+)
+if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
+ file (
+ COPY ${PDC_PDCLIB}.dll
+ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin
+ )
+endif()
+
+file(
+ COPY ${SOURCE_PATH}/curses.h ${SOURCE_PATH}/panel.h ${SOURCE_PATH}/term.h
+ DESTINATION ${CURRENT_PACKAGES_DIR}/include
+)
+file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/pdcurses RENAME copyright)
+
+vcpkg_copy_pdbs()