aboutsummaryrefslogtreecommitdiff
path: root/ports/readline-win32
diff options
context:
space:
mode:
authorFrederik Carlier <frederik.carlier@quamotion.mobi>2018-08-08 13:15:13 +0200
committerRobert Schumacher <roschuma@microsoft.com>2018-08-08 04:15:13 -0700
commitcc00cf05fb70ddec3197ca0ee7cbd47cc1c8ccfe (patch)
tree87b03f77c112390421318a4a5876f8c36cd93b58 /ports/readline-win32
parentc70e9d895f7f5a1467b5562274637dd24459bdd7 (diff)
downloadvcpkg-cc00cf05fb70ddec3197ca0ee7cbd47cc1c8ccfe.tar.gz
vcpkg-cc00cf05fb70ddec3197ca0ee7cbd47cc1c8ccfe.zip
New packages: libimobiledevice, getopt, readline (#3504)
* Add libplist * Add libusbmuxd * Fix typos * Add getopt * Add libimobiledevice * Fix typos * Add libideviceactivation * Add ideviceinstaller * Include utilities * Install usbmuxd * Add readline * Fix readline on 64-bit windows * Add libirecovery * libideviceactivation: include tools * Bump versions to fix build issues * Bump versions * Add idevicerestore * [getopt][getopt-win32] Rename to getopt-win32 and only install on Windows Desktop * [readline][readline-win32] Rename to readline-win32 and only install for Windows Desktop * [vcpkg_from_github][vcpkg_apply_patches] Make PATCHES relative to the current port directory * [vcpkg_install_msbuild][vcpkg_check_linkage] Introduce vcpkg_install_msbuild() and vcpkg_check_linkage(). * [libimobiledevice et al] Use vcpkg_from_github() and vcpkg_install_msbuild() * [readline] Fix static builds
Diffstat (limited to 'ports/readline-win32')
-rw-r--r--ports/readline-win32/CMakeLists.txt56
-rw-r--r--ports/readline-win32/CONTROL3
-rw-r--r--ports/readline-win32/config.h58
-rw-r--r--ports/readline-win32/portfile.cmake31
4 files changed, 148 insertions, 0 deletions
diff --git a/ports/readline-win32/CMakeLists.txt b/ports/readline-win32/CMakeLists.txt
new file mode 100644
index 000000000..ac062d0dc
--- /dev/null
+++ b/ports/readline-win32/CMakeLists.txt
@@ -0,0 +1,56 @@
+cmake_minimum_required(VERSION 3.0)
+project(readline C)
+
+add_definitions(-DREADLINE_LIBRARY)
+add_definitions(-DHAVE_CONFIG_H)
+add_definitions(-D_CRT_SECURE_NO_WARNINGS)
+
+if(BUILD_SHARED_LIBS)
+ add_definitions(-DBUILD_READLINE_DLL)
+else()
+ add_definitions(-DREADLINE_STATIC)
+endif()
+
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR} # thats where the config.h is located
+)
+
+add_library(readline
+ readline.c
+ funmap.c
+ keymaps.c
+ vi_mode.c
+ parens.c
+ rltty.c
+ complete.c
+ bind.c
+ isearch.c
+ display.c
+ signals.c
+ util.c
+ kill.c
+ undo.c
+ macro.c
+ input.c
+ callback.c
+ terminal.c
+ xmalloc.c
+ history.c
+ histsearch.c
+ histexpand.c
+ histfile.c
+ nls.c
+ search.c
+ shell.c
+ savestring.c
+ tilde.c
+ text.c
+ misc.c
+ compat.c
+ mbutil.c
+ support/wcwidth.c)
+
+install(TARGETS readline
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib)
diff --git a/ports/readline-win32/CONTROL b/ports/readline-win32/CONTROL
new file mode 100644
index 000000000..d04614bac
--- /dev/null
+++ b/ports/readline-win32/CONTROL
@@ -0,0 +1,3 @@
+Source: readline-win32
+Version: 5.0-2
+Description: Implementation of readline for Windows Desktop provided by https://github.com/lltcggie \ No newline at end of file
diff --git a/ports/readline-win32/config.h b/ports/readline-win32/config.h
new file mode 100644
index 000000000..de0a352fe
--- /dev/null
+++ b/ports/readline-win32/config.h
@@ -0,0 +1,58 @@
+#define RETSIGTYPE void
+#define VOID_SIGHANDLER 1
+#define PROTOTYPES 1
+#define HAVE_ISASCII 1
+#define HAVE_ISXDIGIT 1
+#define HAVE_MBRLEN 1
+#define HAVE_MBRTOWC 1
+#define HAVE_MBRTOWC 1
+#define HAVE_MBSRTOWCS 1
+#define HAVE_MEMMOVE 1
+#define HAVE_PUTENV 1
+#define HAVE_SETENV 1
+#define HAVE_SETLOCALE 1
+#define HAVE_STRCOLL 1
+#define STRCOLL_BROKEN 1
+#define HAVE_STRPBRK 1
+#define HAVE_TCGETATTR 1
+#define HAVE_VSNPRINTF 1
+#define HAVE_WCTOMB 1
+#define HAVE_WCWIDTH 1
+#define STDC_HEADERS 1
+#define HAVE_LANGINFO_H 1
+#define HAVE_LIMITS_H 1
+#define HAVE_LOCALE_H 1
+#define HAVE_MEMORY_H 1
+#define HAVE_STDARG_H 1
+#define HAVE_STDLIB_H 1
+#define HAVE_STRING_H 1
+#define HAVE_TERMIOS_H 1
+#define HAVE_WCHAR_H 1
+#define HAVE_WCTYPE_H 1
+#define HAVE_MBSTATE_T 1
+#define HAVE_LANGINFO_CODESET 1
+#define VOID_SIGHANDLER 1
+#define STRUCT_WINSIZE_IN_SYS_IOCTL 1
+#define HAVE_GETPW_DECLS 1
+#define MUST_REINSTALL_SIGHANDLERS 1
+#define CTYPE_NON_ASCII 1
+
+/* Ultrix botches type-ahead when switching from canonical to
+ non-canonical mode, at least through version 4.3 */
+#if !defined (HAVE_TERMIOS_H) || !defined (HAVE_TCGETATTR) || defined (ultrix)
+# define TERMIOS_MISSING
+#endif
+
+#if defined (STRCOLL_BROKEN)
+# define HAVE_STRCOLL 1
+#endif
+
+#if defined (__STDC__) && defined (HAVE_STDARG_H)
+# define PREFER_STDARG
+# define USE_VARARGS
+#else
+# if defined (HAVE_VARARGS_H)
+# define PREFER_VARARGS
+# define USE_VARARGS
+# endif
+#endif
diff --git a/ports/readline-win32/portfile.cmake b/ports/readline-win32/portfile.cmake
new file mode 100644
index 000000000..51ad377e7
--- /dev/null
+++ b/ports/readline-win32/portfile.cmake
@@ -0,0 +1,31 @@
+include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO lltcggie/readline
+ REF ea414b4e98475e3976198738061824e8a8379a50
+ SHA512 82d54ab3e19fb2673fe97eff07117d36704791669baa283ec737c704635f872e4c7cd30485a6648d445cb2912e4364286e664e9425444f456a4c862b9e4de843
+ HEAD_REF master
+)
+
+set(SOURCE_PATH "${SOURCE_PATH}/src/readline/5.0/readline-5.0-src")
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h DESTINATION ${SOURCE_PATH})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+)
+
+vcpkg_install_cmake()
+
+# Copy headers
+file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include/readline)
+file(GLOB headers "${SOURCE_PATH}/*.h")
+file(COPY ${headers} DESTINATION ${CURRENT_PACKAGES_DIR}/include/readline)
+
+vcpkg_copy_pdbs()
+
+# Handle copyright
+file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)