diff --git a/ports/readline-win32/CMakeLists.txt b/ports/readline-win32/CMakeLists.txt index ae560029d1..57ddf21df8 100644 --- a/ports/readline-win32/CMakeLists.txt +++ b/ports/readline-win32/CMakeLists.txt @@ -64,3 +64,10 @@ install(TARGETS readline install(EXPORT unofficial-readline-win32-config NAMESPACE unofficial::readline-win32:: DESTINATION share/unofficial-readline-win32) + +Set(prefix "${CMAKE_INSTALL_PREFIX}") +Set(exec_prefix "\${prefix}") +Set(libdir "\${prefix}/lib") +Set(includedir "\${prefix}/include") +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/readline.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/readline.pc" @ONLY) +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/readline.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") diff --git a/ports/readline-win32/portfile.cmake b/ports/readline-win32/portfile.cmake index a3641df868..5dfb0a9e15 100644 --- a/ports/readline-win32/portfile.cmake +++ b/ports/readline-win32/portfile.cmake @@ -8,7 +8,7 @@ vcpkg_from_github( file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}/src/readline/5.0/readline-5.0-src") file(COPY "${CMAKE_CURRENT_LIST_DIR}/config.h" DESTINATION "${SOURCE_PATH}/src/readline/5.0/readline-5.0-src") - +file(COPY "${CMAKE_CURRENT_LIST_DIR}/readline.pc.in" DESTINATION "${SOURCE_PATH}/src/readline/5.0/readline-5.0-src") vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}/src/readline/5.0/readline-5.0-src" ) @@ -16,9 +16,10 @@ vcpkg_cmake_configure( vcpkg_cmake_install() vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-readline-win32) +vcpkg_fixup_pkgconfig() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share" "${CURRENT_PACKAGES_DIR}/debug/include") vcpkg_copy_pdbs() -file(INSTALL "${SOURCE_PATH}/src/readline/5.0/readline-5.0-src/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/src/readline/5.0/readline-5.0-src/COPYING") diff --git a/ports/readline-win32/readline.pc.in b/ports/readline-win32/readline.pc.in new file mode 100644 index 0000000000..ff79d71178 --- /dev/null +++ b/ports/readline-win32/readline.pc.in @@ -0,0 +1,12 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: Readline +Description: Gnu Readline library for command line editing +URL: http://tiswww.cwru.edu/php/chet/readline/rltop.html +Version: @LIBVERSION@ +Requires.private: @TERMCAP_PKG_CONFIG_LIB@ +Libs: -L${libdir} -lreadline +Cflags: -I${includedir} diff --git a/ports/readline-win32/vcpkg.json b/ports/readline-win32/vcpkg.json index 61bf5f62a1..4406cb315b 100644 --- a/ports/readline-win32/vcpkg.json +++ b/ports/readline-win32/vcpkg.json @@ -1,7 +1,7 @@ { "name": "readline-win32", "version": "5.0", - "port-version": 5, + "port-version": 6, "description": "Implementation of readline for Windows Desktop", "homepage": "https://github.com/lltcggie/readline", "license": null, diff --git a/ports/readline/portfile.cmake b/ports/readline/portfile.cmake index 45db4f37a1..a9543d16b8 100644 --- a/ports/readline/portfile.cmake +++ b/ports/readline/portfile.cmake @@ -3,3 +3,4 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") endif() set(VCPKG_POLICY_EMPTY_PACKAGE enabled) +FILE(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") diff --git a/ports/readline/usage b/ports/readline/usage new file mode 100644 index 0000000000..6127e2ac6c --- /dev/null +++ b/ports/readline/usage @@ -0,0 +1,10 @@ +the package readline can be used under windows via: + + find_package(unofficial-readline-win32 CONFIG REQUIRED) + target_link_libraries(main PRIVATE unofficial::readline-win32::readline) + +The package readline can be imported via the CMake FindPkgConfig module: + + find_package(PkgConfig REQUIRED) + pkg_check_modules(readline REQUIRED IMPORTED_TARGET readline) + target_link_libraries(main PRIVATE PkgConfig::readline) diff --git a/ports/readline/vcpkg.json b/ports/readline/vcpkg.json index ae7aec6b49..a021fe3b3a 100644 --- a/ports/readline/vcpkg.json +++ b/ports/readline/vcpkg.json @@ -1,7 +1,7 @@ { "name": "readline", "version": "0", - "port-version": 4, + "port-version": 5, "description": "GNU readline and history libraries", "supports": "!uwp", "dependencies": [ diff --git a/versions/baseline.json b/versions/baseline.json index b672d2603f..9277889b44 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -7150,7 +7150,7 @@ }, "readline": { "baseline": "0", - "port-version": 4 + "port-version": 5 }, "readline-osx": { "baseline": "2020-01-04", @@ -7162,7 +7162,7 @@ }, "readline-win32": { "baseline": "5.0", - "port-version": 5 + "port-version": 6 }, "readosm": { "baseline": "1.1.0a", diff --git a/versions/r-/readline-win32.json b/versions/r-/readline-win32.json index 9776c9f0bf..88e1b5f8dc 100644 --- a/versions/r-/readline-win32.json +++ b/versions/r-/readline-win32.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "c54e93659340794a88b8122fde8123941f0be228", + "version": "5.0", + "port-version": 6 + }, { "git-tree": "19f9684f55a9aa01b5612a5ebec47960f51bacdd", "version": "5.0", diff --git a/versions/r-/readline.json b/versions/r-/readline.json index a15bb5ea84..26acc5d439 100644 --- a/versions/r-/readline.json +++ b/versions/r-/readline.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "f4d85b7efb4b5a01e60852a81a351971c8c5dd78", + "version": "0", + "port-version": 5 + }, { "git-tree": "24b7f806888a5db397f8d737e361e2c9e5025c1f", "version": "0",