aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkreuzerkrieg <kreuzerkrieg@gmail.com>2020-03-28 06:43:13 +0300
committerGitHub <noreply@github.com>2020-03-27 20:43:13 -0700
commitd2512ed8e3a09a808eb8765adba4f8731d66eaed (patch)
treeaeae5d1f0e4a90cec02c1ee9b9455e5e2b05af94
parentedfce3b4558644d61fbef4c88ff4bd106b0809f8 (diff)
downloadvcpkg-d2512ed8e3a09a808eb8765adba4f8731d66eaed.tar.gz
vcpkg-d2512ed8e3a09a808eb8765adba4f8731d66eaed.zip
[replxx] Add new port (#10052)
* replxx * wip
-rw-r--r--ports/replxx/CONTROL6
-rw-r--r--ports/replxx/portfile.cmake22
-rw-r--r--ports/replxx/replxxConfig.cmake20
-rw-r--r--ports/replxx/usage4
-rw-r--r--scripts/ci.baseline.txt4
5 files changed, 56 insertions, 0 deletions
diff --git a/ports/replxx/CONTROL b/ports/replxx/CONTROL
new file mode 100644
index 000000000..ec643802c
--- /dev/null
+++ b/ports/replxx/CONTROL
@@ -0,0 +1,6 @@
+Source: replxx
+Version: 0.0.2
+Homepage: https://github.com/AmokHuginnsson/replxx
+Description: A small, portable GNU readline replacement for Linux, Windows and MacOS which is capable of handling UTF-8 characters.
+Supports: !uwp
+
diff --git a/ports/replxx/portfile.cmake b/ports/replxx/portfile.cmake
new file mode 100644
index 000000000..0443f37d3
--- /dev/null
+++ b/ports/replxx/portfile.cmake
@@ -0,0 +1,22 @@
+vcpkg_fail_port_install(ON_TARGET "UWP")
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO AmokHuginnsson/replxx
+ REF 45696c250ce39ab21dedeea962b94d7827007a8c
+ SHA512 7beec508fa3049fe5a736a487728506d646d26d7194ef7453fc07bceade1982430808fab0a10ca9b1c43a8b87bf3a973f5cfe4aa22ed06927647c9a7244167fd
+ HEAD_REF master
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+)
+
+vcpkg_install_cmake()
+
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
+file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/replxxConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
diff --git a/ports/replxx/replxxConfig.cmake b/ports/replxx/replxxConfig.cmake
new file mode 100644
index 000000000..680ffc3ee
--- /dev/null
+++ b/ports/replxx/replxxConfig.cmake
@@ -0,0 +1,20 @@
+function(set_library_target NAMESPACE LIB_NAME DEBUG_LIB_FILE_NAME RELEASE_LIB_FILE_NAME INCLUDE_DIR)
+ add_library(${NAMESPACE}::${LIB_NAME} STATIC IMPORTED)
+ set_target_properties(${NAMESPACE}::${LIB_NAME} PROPERTIES
+ IMPORTED_CONFIGURATIONS "RELEASE;DEBUG"
+ IMPORTED_LOCATION_RELEASE "${RELEASE_LIB_FILE_NAME}"
+ IMPORTED_LOCATION_DEBUG "${DEBUG_LIB_FILE_NAME}"
+ INTERFACE_INCLUDE_DIRECTORIES "${INCLUDE_DIR}"
+ )
+ set(${NAMESPACE}_${LIB_NAME}_FOUND 1)
+endfunction()
+
+get_filename_component(ROOT "${CMAKE_CURRENT_LIST_FILE}" PATH)
+get_filename_component(ROOT "${ROOT}" PATH)
+get_filename_component(ROOT "${ROOT}" PATH)
+
+if (CMAKE_HOST_WIN32)
+ set_library_target("REPLXX" "replxx" "${ROOT}/debug/lib/replxx-d.lib" "${ROOT}/lib/replxx.lib" "${ROOT}/include/")
+else ()
+ set_library_target("REPLXX" "replxx" "${ROOT}/debug/lib/libreplxx-d.a" "${ROOT}/lib/libreplxx.a" "${ROOT}/include/")
+endif ()
diff --git a/ports/replxx/usage b/ports/replxx/usage
new file mode 100644
index 000000000..5be648855
--- /dev/null
+++ b/ports/replxx/usage
@@ -0,0 +1,4 @@
+The package replxx is compatible with built-in CMake targets:
+
+ FIND_PACKAGE(replxx REQUIRED)
+ TARGET_LINK_LIBRARIES(main PRIVATE REPLXX::replxx)
diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt
index 1f0b6b9f6..faf2bb104 100644
--- a/scripts/ci.baseline.txt
+++ b/scripts/ci.baseline.txt
@@ -1533,6 +1533,10 @@ redis-plus-plus:x86-windows=fail
redis-plus-plus:x64-windows=fail
redis-plus-plus:x64-windows-static=fail
redis-plus-plus:arm64-windows=fail
+replxx:arm-uwp=fail
+replxx:x64-uwp=fail
+replxx:arm64-windows=fail
+replxx:x86-windows=fail
reproc:arm-uwp=fail
reproc:x64-uwp=fail
restbed:arm-uwp=fail