diff --git a/ports/readline-osx/CMakeLists.txt b/ports/readline-osx/CMakeLists.txt new file mode 100644 index 00000000000000..adf35eefaf9c8d --- /dev/null +++ b/ports/readline-osx/CMakeLists.txt @@ -0,0 +1,60 @@ +cmake_minimum_required(VERSION 3.0) +project(readline C) + +add_definitions(-DREADLINE_LIBRARY) +add_definitions(-DHAVE_CONFIG_H) + +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 + colors.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 + parse-colors.c + search.c + shell.c + savestring.c + tilde.c + text.c + misc.c + compat.c + mbutil.c + xfree.c + support/wcwidth.c) + +install( + TARGETS readline + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) diff --git a/ports/readline-osx/config.h b/ports/readline-osx/config.h new file mode 100644 index 00000000000000..b9cb89ca2dd924 --- /dev/null +++ b/ports/readline-osx/config.h @@ -0,0 +1,303 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Maintained by hand. */ + +/* Template definitions for autoconf */ +#define __EXTENSIONS__ 1 +#define _ALL_SOURCE 1 +#define _GNU_SOURCE 1 +/* #undef _POSIX_SOURCE */ +/* #undef _POSIX_1_SOURCE */ +#define _POSIX_PTHREAD_SEMANTICS 1 +#define _TANDEM_SOURCE 1 +/* #undef _MINIX */ + +/* Define NO_MULTIBYTE_SUPPORT to not compile in support for multibyte + characters, even if the OS supports them. */ +/* #undef NO_MULTIBYTE_SUPPORT */ + +/* #undef _FILE_OFFSET_BITS */ + +/* Define as the return type of signal handlers (int or void). */ +#define RETSIGTYPE void + +#define VOID_SIGHANDLER 1 + +/* Characteristics of the compiler. */ +/* #undef sig_atomic_t */ + +/* #undef size_t */ + +/* #undef ssize_t */ + +/* #undef const */ + +/* #undef volatile */ + +#define PROTOTYPES 1 +#define __PROTOTYPES 1 + +/* #undef __CHAR_UNSIGNED__ */ + +/* Define if the `S_IS*' macros in do not work properly. */ +/* #undef STAT_MACROS_BROKEN */ + +/* Define if you have the chown function. */ +#define HAVE_CHOWN 1 + +/* Define if you have the fcntl function. */ +#define HAVE_FCNTL 1 + +/* Define if you have the fnmatch function. */ +#define HAVE_FNMATCH 1 + +/* Define if you have the getpwent function. */ +#define HAVE_GETPWENT 1 + +/* Define if you have the getpwnam function. */ +#define HAVE_GETPWNAM 1 + +/* Define if you have the getpwuid function. */ +#define HAVE_GETPWUID 1 + +/* Define if you have the isascii function. */ +#define HAVE_ISASCII 1 + +/* Define if you have the iswctype function. */ +#define HAVE_ISWCTYPE 1 + +/* Define if you have the iswlower function. */ +#define HAVE_ISWLOWER 1 + +/* Define if you have the iswupper function. */ +#define HAVE_ISWUPPER 1 + +/* Define if you have the isxdigit function. */ +#define HAVE_ISXDIGIT 1 + +/* Define if you have the kill function. */ +#define HAVE_KILL 1 + +/* Define if you have the lstat function. */ +#define HAVE_LSTAT 1 + +/* Define if you have the mbrlen function. */ +#define HAVE_MBRLEN 1 + +/* Define if you have the mbrtowc function. */ +#define HAVE_MBRTOWC 1 + +/* Define if you have the mbsrtowcs function. */ +#define HAVE_MBSRTOWCS 1 + +/* Define if you have the memmove function. */ +#define HAVE_MEMMOVE 1 + +/* Define if you have the pselect function. */ +#define HAVE_PSELECT 1 + +/* Define if you have the putenv function. */ +#define HAVE_PUTENV 1 + +/* Define if you have the readlink function. */ +#define HAVE_READLINK 1 + +/* Define if you have the select function. */ +#define HAVE_SELECT 1 + +/* Define if you have the setenv function. */ +#define HAVE_SETENV 1 + +/* Define if you have the setlocale function. */ +#define HAVE_SETLOCALE 1 + +/* Define if you have the strcasecmp function. */ +#define HAVE_STRCASECMP 1 + +/* Define if you have the strcoll function. */ +#define HAVE_STRCOLL 1 + +/* #undef STRCOLL_BROKEN */ + +/* Define if you have the strpbrk function. */ +#define HAVE_STRPBRK 1 + +/* Define if you have the tcgetattr function. */ +#define HAVE_TCGETATTR 1 + +/* Define if you have the towlower function. */ +#define HAVE_TOWLOWER 1 + +/* Define if you have the towupper function. */ +#define HAVE_TOWUPPER 1 + +/* Define if you have the vsnprintf function. */ +#define HAVE_VSNPRINTF 1 + +/* Define if you have the wcrtomb function. */ +#define HAVE_WCRTOMB 1 + +/* Define if you have the wcscoll function. */ +#define HAVE_WCSCOLL 1 + +/* Define if you have the wctype function. */ +#define HAVE_WCTYPE 1 + +/* Define if you have the wcwidth function. */ +#define HAVE_WCWIDTH 1 + +/* and whether it works */ +/* #undef WCWIDTH_BROKEN */ + +#define STDC_HEADERS 1 + +/* Define if you have the header file. */ +#define HAVE_DIRENT_H 1 + +/* Define if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define if you have the header file. */ +#define HAVE_LANGINFO_H 1 + +/* Define if you have the header file. */ +/* #undef HAVE_LIBAUDIT_H */ + +/* Define if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define if you have the header file. */ +#define HAVE_LOCALE_H 1 + +/* Define if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define if you have the header file. */ +/* #undef HAVE_NDIR_H */ + +/* Define if you have the header file. */ +/* #undef HAVE_NCURSES_TERMCAP_H */ + +/* Define if you have the header file. */ +#define HAVE_PWD_H 1 + +/* Define if you have the header file. */ +#define HAVE_STDARG_H 1 + +/* Define if you have the header file. */ +#define HAVE_STDBOOL_H 1 + +/* Define if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define if you have the header file. */ +/* #undef HAVE_SYS_DIR_H */ + +/* Define if you have the header file. */ +#define HAVE_SYS_FILE_H 1 + +/* Define if you have the header file. */ +#define HAVE_SYS_IOCTL_H 1 + +/* Define if you have the header file. */ +/* #undef HAVE_SYS_NDIR_H */ + +/* Define if you have the header file. */ +/* #undef HAVE_SYS_PTE_H */ + +/* Define if you have the header file. */ +/* #undef HAVE_SYS_PTEM_H */ + +/* Define if you have the header file. */ +#define HAVE_SYS_SELECT_H 1 + +/* Define if you have the header file. */ +/* #undef HAVE_SYS_STREAM_H */ + +/* Define if you have the header file. */ +#define HAVE_TERMCAP_H 1 + +/* Define if you have the header file. */ +/* #undef HAVE_TERMIO_H */ + +/* Define if you have the header file. */ +#define HAVE_TERMIOS_H 1 + +/* Define if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define if you have the header file. */ +/* #undef HAVE_VARARGS_H */ + +/* Define if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define if you have the header file. */ +#define HAVE_WCTYPE_H 1 + +#define HAVE_MBSTATE_T 1 + +/* Define if you have wchar_t in . */ +#define HAVE_WCHAR_T 1 + +/* Define if you have wctype_t in . */ +#define HAVE_WCTYPE_T 1 + +/* Define if you have wint_t in . */ +#define HAVE_WINT_T 1 + +/* Define if you have and nl_langinfo(CODESET). */ +#define HAVE_LANGINFO_CODESET 1 + +/* Define if you have and it defines AUDIT_USER_TTY */ +#define HAVE_DECL_AUDIT_USER_TTY 0 + +/* Definitions pulled in from aclocal.m4. */ +#define VOID_SIGHANDLER 1 + +/* #undef GWINSZ_IN_SYS_IOCTL */ + +#define STRUCT_WINSIZE_IN_SYS_IOCTL 1 + +/* #undef STRUCT_WINSIZE_IN_TERMIOS */ + +#define TIOCSTAT_IN_SYS_IOCTL 1 + +#define FIONREAD_IN_SYS_IOCTL 1 + +/* #undef SPEED_T_IN_SYS_TYPES */ + +#define HAVE_GETPW_DECLS 1 + +#define HAVE_STRUCT_DIRENT_D_INO 1 + +#define HAVE_STRUCT_DIRENT_D_FILENO 1 + +/* #undef HAVE_STRUCT_DIRENT_D_NAMLEN */ + +/* #undef HAVE_BSD_SIGNALS */ + +#define HAVE_POSIX_SIGNALS 1 + +/* #undef HAVE_USG_SIGHOLD */ + +/* #undef MUST_REINSTALL_SIGHANDLERS */ + +#define HAVE_POSIX_SIGSETJMP 1 + +#define CTYPE_NON_ASCII 1 + +/* modify settings or make new ones based on what autoconf tells us. */ + +/* 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 + +/* VARARGS defines moved to rlstdc.h */ diff --git a/ports/readline-osx/portfile.cmake b/ports/readline-osx/portfile.cmake new file mode 100644 index 00000000000000..f903ad071dde24 --- /dev/null +++ b/ports/readline-osx/portfile.cmake @@ -0,0 +1,26 @@ +vcpkg_download_distfile( + ARCHIVE + URLS https://ftp.gnu.org/gnu/readline/readline-8.1.tar.gz + FILENAME readline-8.1.tar.gz + SHA512 27790d0461da3093a7fee6e89a51dcab5dc61928ec42e9228ab36493b17220641d5e481ea3d8fee5ee0044c70bf960f55c7d3f1a704cf6b9c42e5c269b797e00 +) + +vcpkg_extract_source_archive(SOURCE_PATH ARCHIVE "${ARCHIVE}") + +file( + COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" + DESTINATION "${SOURCE_PATH}") +file(COPY "${CMAKE_CURRENT_LIST_DIR}/config.h" DESTINATION "${SOURCE_PATH}") + +vcpkg_cmake_configure(SOURCE_PATH "${SOURCE_PATH}") + +vcpkg_cmake_install() + +file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/include/readline") +file(GLOB headers "${SOURCE_PATH}/*.h") +file(COPY ${headers} DESTINATION "${CURRENT_PACKAGES_DIR}/include/readline") + +file( + INSTALL "${SOURCE_PATH}/COPYING" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" + RENAME copyright) diff --git a/ports/readline-osx/vcpkg.json b/ports/readline-osx/vcpkg.json new file mode 100644 index 00000000000000..4ea10360bd75ed --- /dev/null +++ b/ports/readline-osx/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "readline-osx", + "version": "8.1", + "description": "Implementation of readline for Mac OS", + "supports": "osx", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/readline/vcpkg.json b/ports/readline/vcpkg.json index 7dba01a74c9b3a..5ba03cd6c7b142 100644 --- a/ports/readline/vcpkg.json +++ b/ports/readline/vcpkg.json @@ -1,10 +1,14 @@ { "name": "readline", "version-string": "0", - "port-version": 1, + "port-version": 2, "description": "GNU readline and history libraries", "supports": "!uwp", "dependencies": [ + { + "name": "readline-osx", + "platform": "osx" + }, { "name": "readline-win32", "platform": "windows" diff --git a/versions/baseline.json b/versions/baseline.json index 5756686397cf13..2c0cffbf339b48 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -5970,7 +5970,11 @@ }, "readline": { "baseline": "0", - "port-version": 1 + "port-version": 2 + }, + "readline-osx": { + "baseline": "8.1", + "port-version": 0 }, "readline-win32": { "baseline": "5.0", diff --git a/versions/r-/readline-osx.json b/versions/r-/readline-osx.json new file mode 100644 index 00000000000000..5e7dca323bf46b --- /dev/null +++ b/versions/r-/readline-osx.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "5b4b6fabb77d9f67ee0a4dcc7981040d9177caed", + "version": "8.1", + "port-version": 0 + } + ] +} diff --git a/versions/r-/readline.json b/versions/r-/readline.json index 672cc6f0c6b34a..6a22adcaeb6c59 100644 --- a/versions/r-/readline.json +++ b/versions/r-/readline.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "b5c6800bc0cf924ec6bdbe627c9460839774f998", + "version-string": "0", + "port-version": 2 + }, { "git-tree": "1e0a62b3927f5b41e7861093dba7d2e2aa4de0b2", "version-string": "0",