aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/libxdiff
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/libxdiff
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/libxdiff')
-rw-r--r--vcpkg/ports/libxdiff/fix-usage-error.patch15
-rw-r--r--vcpkg/ports/libxdiff/portfile.cmake44
-rw-r--r--vcpkg/ports/libxdiff/vcpkg.json18
3 files changed, 77 insertions, 0 deletions
diff --git a/vcpkg/ports/libxdiff/fix-usage-error.patch b/vcpkg/ports/libxdiff/fix-usage-error.patch
new file mode 100644
index 0000000..e7f28e3
--- /dev/null
+++ b/vcpkg/ports/libxdiff/fix-usage-error.patch
@@ -0,0 +1,15 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 33c34c2..1d93cde 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -87,8 +87,9 @@ INSTALL (
+ EXPORT XDiffTargets
+ ARCHIVE DESTINATION lib
+ LIBRARY DESTINATION lib
+- RUNTIME DESTINATION lib
++ RUNTIME DESTINATION bin
+ )
++target_include_directories(xdiff INTERFACE "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>" "$<INSTALL_INTERFACE:include>")
+
+ WRITE_BASIC_PACKAGE_VERSION_FILE (
+ "${CMAKE_CURRENT_BINARY_DIR}/XDiff/XDiffConfigVersion.cmake"
diff --git a/vcpkg/ports/libxdiff/portfile.cmake b/vcpkg/ports/libxdiff/portfile.cmake
new file mode 100644
index 0000000..74dbc2d
--- /dev/null
+++ b/vcpkg/ports/libxdiff/portfile.cmake
@@ -0,0 +1,44 @@
+set(LIBXDIFF_REF 77e30f3190685efd87cce2c9c5d688cbaa1b0134)
+set(LIBXDIFF_SHA512 c559b575e6d6f06f3b3064f3e077a15d8f57422340199215a4cbd7beab527bc250347c8779a8d6f8c4e41799a032431e83c7336f86569527ab754444455b8c87)
+
+string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" KEYSTONE_BUILD_SHARED)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO Drako/libxdiff
+ REF ${LIBXDIFF_REF}
+ SHA512 ${LIBXDIFF_SHA512}
+ HEAD_REF master
+ PATCHES
+ fix-usage-error.patch
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS -DBUILD_SHARED=${KEYSTONE_BUILD_SHARED}
+)
+
+vcpkg_cmake_install()
+
+if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL debug)
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+
+ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/xdiff.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin")
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/xdiff.dll")
+ endif()
+endif()
+
+
+if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL release)
+ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/xdiff.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/bin")
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/xdiff.dll")
+ endif()
+endif()
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
+
+vcpkg_copy_pdbs()
+
+vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/XDiff PACKAGE_NAME XDiff)
diff --git a/vcpkg/ports/libxdiff/vcpkg.json b/vcpkg/ports/libxdiff/vcpkg.json
new file mode 100644
index 0000000..5c54cdf
--- /dev/null
+++ b/vcpkg/ports/libxdiff/vcpkg.json
@@ -0,0 +1,18 @@
+{
+ "name": "libxdiff",
+ "version": "0.23",
+ "port-version": 4,
+ "description": "The LibXDiff library implements basic and yet complete functionalities to create file differences/patches to both binary and text files. The library uses memory files as file abstraction to achieve both performance and portability.",
+ "homepage": "https://github.com/Drako/libxdiff",
+ "supports": "!uwp",
+ "dependencies": [
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
+}