[vcpkg baseline][urho3d] Fix dependency readline (#22321)

* [vcpkg baseline][urho3d] Fix dependency readline-osx

* format manifest

* version

* Add port readline-unix, convert build type to makefile, set readline-osx as a empty package

* version

* change dependency to readline-unix on non-Windows

* version

* Update ports/readline-unix/vcpkg.json

Co-authored-by: nicole mazzuca <83086508+strega-nil-ms@users.noreply.github.com>
This commit is contained in:
Jack·Boos·Yu 2022-01-05 11:57:18 +08:00 committed by GitHub
parent f2fa2feb0c
commit b68f3cc7ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 103 additions and 408 deletions

View File

@ -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)

View File

@ -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 <sys/stat.h> 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 <dirent.h> header file. */
#define HAVE_DIRENT_H 1
/* Define if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
/* Define if you have the <langinfo.h> header file. */
#define HAVE_LANGINFO_H 1
/* Define if you have the <libaudit.h> header file. */
/* #undef HAVE_LIBAUDIT_H */
/* Define if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
/* Define if you have the <locale.h> header file. */
#define HAVE_LOCALE_H 1
/* Define if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define if you have the <ndir.h> header file. */
/* #undef HAVE_NDIR_H */
/* Define if you have the <ncurses/termcap.h> header file. */
/* #undef HAVE_NCURSES_TERMCAP_H */
/* Define if you have the <pwd.h> header file. */
#define HAVE_PWD_H 1
/* Define if you have the <stdarg.h> header file. */
#define HAVE_STDARG_H 1
/* Define if you have the <stdbool.h> header file. */
#define HAVE_STDBOOL_H 1
/* Define if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define if you have the <sys/dir.h> header file. */
/* #undef HAVE_SYS_DIR_H */
/* Define if you have the <sys/file.h> header file. */
#define HAVE_SYS_FILE_H 1
/* Define if you have the <sys/ioctl.h> header file. */
#define HAVE_SYS_IOCTL_H 1
/* Define if you have the <sys/ndir.h> header file. */
/* #undef HAVE_SYS_NDIR_H */
/* Define if you have the <sys/pte.h> header file. */
/* #undef HAVE_SYS_PTE_H */
/* Define if you have the <sys/ptem.h> header file. */
/* #undef HAVE_SYS_PTEM_H */
/* Define if you have the <sys/select.h> header file. */
#define HAVE_SYS_SELECT_H 1
/* Define if you have the <sys/stream.h> header file. */
/* #undef HAVE_SYS_STREAM_H */
/* Define if you have the <termcap.h> header file. */
#define HAVE_TERMCAP_H 1
/* Define if you have the <termio.h> header file. */
/* #undef HAVE_TERMIO_H */
/* Define if you have the <termios.h> header file. */
#define HAVE_TERMIOS_H 1
/* Define if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define if you have the <varargs.h> header file. */
/* #undef HAVE_VARARGS_H */
/* Define if you have the <wchar.h> header file. */
#define HAVE_WCHAR_H 1
/* Define if you have the <wctype.h> header file. */
#define HAVE_WCTYPE_H 1
#define HAVE_MBSTATE_T 1
/* Define if you have wchar_t in <wctype.h>. */
#define HAVE_WCHAR_T 1
/* Define if you have wctype_t in <wctype.h>. */
#define HAVE_WCTYPE_T 1
/* Define if you have wint_t in <wctype.h>. */
#define HAVE_WINT_T 1
/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
#define HAVE_LANGINFO_CODESET 1
/* Define if you have <linux/audit.h> 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 */

View File

@ -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)

View File

@ -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"
]
}

View File

@ -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)

View File

@ -0,0 +1,6 @@
{
"name": "readline-unix",
"version": "8.1",
"description": "Implementation of readline for unix",
"supports": "!windows"
}

View File

@ -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",

View File

@ -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)

View File

@ -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 <SDL/"
"#include <Urho3D/ThirdParty/SDL/"

View File

@ -2,7 +2,7 @@
"$note": "Due to the upstream modification of the dependent source code, the internal port of vcpkg cannot be used.",
"name": "urho3d",
"version-date": "2021-03-01",
"port-version": 1,
"port-version": 2,
"description": "Urho3D is a free lightweight, cross-platform 2D and 3D game engine implemented in C++ and released under the MIT license. Greatly inspired by OGRE and Horde3D.",
"homepage": "https://github.com/urho3d/Urho3D",
"supports": "!(arm | uwp)",
@ -20,6 +20,12 @@
"examples": {
"description": "Build examples."
},
"readline": {
"description": "Enable readline.",
"dependencies": [
"readline"
]
},
"tools": {
"description": "Build tools."
}

View File

@ -5982,9 +5982,13 @@
},
"readline": {
"baseline": "0",
"port-version": 2
"port-version": 3
},
"readline-osx": {
"baseline": "2020-01-04",
"port-version": 0
},
"readline-unix": {
"baseline": "8.1",
"port-version": 0
},
@ -7046,7 +7050,7 @@
},
"urho3d": {
"baseline": "2021-03-01",
"port-version": 1
"port-version": 2
},
"uriparser": {
"baseline": "0.9.5",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "30d9d12e0486393aaf6929c5786829e5ca2cff5f",
"version-date": "2020-01-04",
"port-version": 0
},
{
"git-tree": "5b4b6fabb77d9f67ee0a4dcc7981040d9177caed",
"version": "8.1",

View File

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "e2ef4d4f472d6fe4f36009032dfdd3279a50c754",
"version": "8.1",
"port-version": 0
}
]
}

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "87822d2ce5b0936d374d94185da700e8a1cf4619",
"version-string": "0",
"port-version": 3
},
{
"git-tree": "b5c6800bc0cf924ec6bdbe627c9460839774f998",
"version-string": "0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "0d6c7a328006bca59755eec70c09a83fe9b1a087",
"version-date": "2021-03-01",
"port-version": 2
},
{
"git-tree": "a31df110bd09d7f49eec0cc5e7f19799ab83564a",
"version-date": "2021-03-01",