diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/libsercomm | |
Diffstat (limited to 'vcpkg/ports/libsercomm')
| -rw-r--r-- | vcpkg/ports/libsercomm/dev-SER_END_DECL-fix.patch | 10 | ||||
| -rw-r--r-- | vcpkg/ports/libsercomm/portfile.cmake | 42 | ||||
| -rw-r--r-- | vcpkg/ports/libsercomm/vcpkg.json | 30 |
3 files changed, 82 insertions, 0 deletions
diff --git a/vcpkg/ports/libsercomm/dev-SER_END_DECL-fix.patch b/vcpkg/ports/libsercomm/dev-SER_END_DECL-fix.patch new file mode 100644 index 0000000..23a84c6 --- /dev/null +++ b/vcpkg/ports/libsercomm/dev-SER_END_DECL-fix.patch @@ -0,0 +1,10 @@ +--- a/include/public/sercomm/dev.h
++++ b/include/public/sercomm/dev.h
+@@ -137,6 +137,6 @@ SER_EXPORT void ser_dev_monitor_stop(ser_dev_mon_t *mon);
+
+ /** @} */
+
+-SER_BEGIN_DECL
++SER_END_DECL
+
+ #endif
diff --git a/vcpkg/ports/libsercomm/portfile.cmake b/vcpkg/ports/libsercomm/portfile.cmake new file mode 100644 index 0000000..a7cb877 --- /dev/null +++ b/vcpkg/ports/libsercomm/portfile.cmake @@ -0,0 +1,42 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ingeniamc/sercomm + REF 1.3.2 + SHA512 f1581f2dfa262ffb1b3aec5a1e6d32493c322c94541fbacc98efff23b3b42b14c9abdcfb063a78b7c54fb1f9d8dbf59d8064099601de2175af6c6d830708324c + HEAD_REF master + PATCHES + dev-SER_END_DECL-fix.patch # https://github.com/ingeniamc/sercomm/pull/3 +) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + errdesc WITH_ERRDESC + devmon WITH_DEVMON +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + DISABLE_PARALLEL_CONFIGURE + OPTIONS + ${FEATURE_OPTIONS} +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup( + PACKAGE_NAME sercomm + CONFIG_PATH lib/cmake/sercomm +) + +# Remove includes in debug +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() +# Handle copyright +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) + +# Copy pdb files +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/libsercomm/vcpkg.json b/vcpkg/ports/libsercomm/vcpkg.json new file mode 100644 index 0000000..0c62399 --- /dev/null +++ b/vcpkg/ports/libsercomm/vcpkg.json @@ -0,0 +1,30 @@ +{ + "name": "libsercomm", + "version": "1.3.2", + "port-version": 1, + "description": "Multiplatform serial communications library", + "homepage": "https://github.com/ingeniamc/sercomm", + "license": "MIT", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "default-features": [ + "devmon", + "errdesc" + ], + "features": { + "devmon": { + "description": "When enabled, device listing and monitoring will be supported" + }, + "errdesc": { + "description": "When enabled, error details description can be obtained" + } + } +} |