diff --git a/ports/readline-osx/CMakeLists.txt b/ports/readline-osx/CMakeLists.txt deleted file mode 100644 index adf35eefaf9c8d..00000000000000 --- a/ports/readline-osx/CMakeLists.txt +++ /dev/null @@ -1,60 +0,0 @@ -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 deleted file mode 100644 index b9cb89ca2dd924..00000000000000 --- a/ports/readline-osx/config.h +++ /dev/null @@ -1,303 +0,0 @@ -/* 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 index f903ad071dde24..9aefc82414d125 100644 --- a/ports/readline-osx/portfile.cmake +++ b/ports/readline-osx/portfile.cmake @@ -1,26 +1 @@ -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) +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/ports/readline-osx/vcpkg.json b/ports/readline-osx/vcpkg.json index 4ea10360bd75ed..381e95164c4a17 100644 --- a/ports/readline-osx/vcpkg.json +++ b/ports/readline-osx/vcpkg.json @@ -1,16 +1,9 @@ { "name": "readline-osx", - "version": "8.1", - "description": "Implementation of readline for Mac OS", + "version-date": "2020-01-04", + "description": "empty package, linking to readline-unix", "supports": "osx", "dependencies": [ - { - "name": "vcpkg-cmake", - "host": true - }, - { - "name": "vcpkg-cmake-config", - "host": true - } + "readline-unix" ] } diff --git a/ports/readline-unix/portfile.cmake b/ports/readline-unix/portfile.cmake new file mode 100644 index 00000000000000..4e7db653541ab2 --- /dev/null +++ b/ports/readline-unix/portfile.cmake @@ -0,0 +1,20 @@ +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}") + +vcpkg_configure_make( + SOURCE_PATH "${SOURCE_PATH}" + OPTIOS + --with-curses=yes +) + +vcpkg_install_make() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/readline-unix/vcpkg.json b/ports/readline-unix/vcpkg.json new file mode 100644 index 00000000000000..19866ea718c7cd --- /dev/null +++ b/ports/readline-unix/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "readline-unix", + "version": "8.1", + "description": "Implementation of readline for unix", + "supports": "!windows" +} diff --git a/ports/readline/vcpkg.json b/ports/readline/vcpkg.json index 5ba03cd6c7b142..cc79a73bf237d8 100644 --- a/ports/readline/vcpkg.json +++ b/ports/readline/vcpkg.json @@ -1,13 +1,13 @@ { "name": "readline", "version-string": "0", - "port-version": 2, + "port-version": 3, "description": "GNU readline and history libraries", "supports": "!uwp", "dependencies": [ { - "name": "readline-osx", - "platform": "osx" + "name": "readline-unix", + "platform": "!windows" }, { "name": "readline-win32", diff --git a/ports/urho3d/fix-dependency-readline.patch b/ports/urho3d/fix-dependency-readline.patch new file mode 100644 index 00000000000000..ec36fb39ac17d2 --- /dev/null +++ b/ports/urho3d/fix-dependency-readline.patch @@ -0,0 +1,29 @@ +diff --git a/cmake/Modules/FindReadline.cmake b/cmake/Modules/FindReadline.cmake +index ad5fbd0..f1ee2e8 100644 +--- a/cmake/Modules/FindReadline.cmake ++++ b/cmake/Modules/FindReadline.cmake +@@ -48,4 +48,8 @@ endif () + include (FindPackageHandleStandardArgs) + find_package_handle_standard_args (Readline REQUIRED_VARS READLINE_LIBRARIES READLINE_INCLUDE_DIRS FAIL_MESSAGE "Could NOT find Readline development library") + ++if (READLINE_FOUND) ++ set(READLINE_LIBRARIES ${READLINE_LIBRARIES} curses) ++endif() ++ + mark_as_advanced (READLINE_INCLUDE_DIRS READLINE_LIBRARIES) +diff --git a/cmake/Modules/UrhoCommon.cmake b/cmake/Modules/UrhoCommon.cmake +index b196095..9dd0ee9 100644 +--- a/cmake/Modules/UrhoCommon.cmake ++++ b/cmake/Modules/UrhoCommon.cmake +@@ -226,9 +226,9 @@ if (CMAKE_PROJECT_NAME STREQUAL Urho3D) + option (URHO3D_TESTING "Enable testing support") + # By default this option is off (i.e. we use the MSVC dynamic runtime), this can be switched on if using Urho3D as a STATIC library + cmake_dependent_option (URHO3D_STATIC_RUNTIME "Use static C/C++ runtime libraries and eliminate the need for runtime DLLs installation (VS only)" FALSE "MSVC" FALSE) +- if (((URHO3D_LUA AND NOT URHO3D_LUAJIT) OR URHO3D_DATABASE_SQLITE) AND NOT ANDROID AND NOT IOS AND NOT TVOS AND NOT WEB AND NOT WIN32) ++ if (URHO3D_ENABLE_READLINE AND ((URHO3D_LUA AND NOT URHO3D_LUAJIT) OR URHO3D_DATABASE_SQLITE) AND NOT ANDROID AND NOT IOS AND NOT TVOS AND NOT WEB AND NOT WIN32) + # Find GNU Readline development library for Lua interpreter and SQLite's isql +- find_package (Readline) ++ find_package (Readline REQUIRED) + endif () + if (CPACK_SYSTEM_NAME STREQUAL Linux) + cmake_dependent_option (URHO3D_USE_LIB64_RPM "Enable 64-bit RPM CPack generator using /usr/lib64 and disable all other generators (Debian-based host only)" FALSE "URHO3D_64BIT AND NOT HAS_LIB64" FALSE) diff --git a/ports/urho3d/portfile.cmake b/ports/urho3d/portfile.cmake index dafdbe1afb8d66..a79dcf22589204 100644 --- a/ports/urho3d/portfile.cmake +++ b/ports/urho3d/portfile.cmake @@ -11,6 +11,7 @@ vcpkg_from_github( externalproject.patch add_options.patch fix-install.patch + fix-dependency-readline.patch ) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") @@ -21,16 +22,16 @@ endif() vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS FEATURES + readline URHO3D_ENABLE_READLINE tools URHO3D_BUILD_TOOLS examples URHO3D_BUILD_SAMPLES ) vcpkg_cmake_configure( - SOURCE_PATH ${SOURCE_PATH} + SOURCE_PATH "${SOURCE_PATH}" OPTIONS ${FEATURE_OPTIONS} -DURHO3D_LIB_TYPE=${URHO3D_LIB_TYPE} - -DURHO3D_C++11=ON -DURHO3D_PCH=OFF ) @@ -100,7 +101,7 @@ list(APPEND SDL_RELATED_HEADERS "${CURRENT_PACKAGES_DIR}/include/Urho3D/IO/NamedPipe.h" "${CURRENT_PACKAGES_DIR}/include/Urho3D/IO/RWOpsWrapper.h" ) -foreach (SDL_RELATED_HEADER ${SDL_RELATED_HEADERS}) +foreach (SDL_RELATED_HEADER IN LISTS SDL_RELATED_HEADERS) vcpkg_replace_string("${SDL_RELATED_HEADER}" "#include