aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/simpleble
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/simpleble
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/simpleble')
-rw-r--r--vcpkg/ports/simpleble/portfile.cmake27
-rw-r--r--vcpkg/ports/simpleble/use-std-localtime.patch16
-rw-r--r--vcpkg/ports/simpleble/vcpkg.json24
3 files changed, 67 insertions, 0 deletions
diff --git a/vcpkg/ports/simpleble/portfile.cmake b/vcpkg/ports/simpleble/portfile.cmake
new file mode 100644
index 0000000..ef19f75
--- /dev/null
+++ b/vcpkg/ports/simpleble/portfile.cmake
@@ -0,0 +1,27 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO OpenBluetoothToolbox/SimpleBLE
+ HEAD_REF main
+ REF "v${VERSION}"
+ SHA512 059df611a8a529d6ad177e13f3a639a76b9dda8c72395bf660c63239c519096761e123459b814bbfac2e3e3407119477373453891c88daa4532e56f2c77da223
+ PATCHES
+ use-std-localtime.patch
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}/simpleble"
+ OPTIONS
+ -DLIBFMT_VENDORIZE=OFF
+)
+
+vcpkg_cmake_install()
+
+vcpkg_copy_pdbs()
+
+vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/simpleble")
+
+vcpkg_fixup_pkgconfig()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.md")
diff --git a/vcpkg/ports/simpleble/use-std-localtime.patch b/vcpkg/ports/simpleble/use-std-localtime.patch
new file mode 100644
index 0000000..a4e7578
--- /dev/null
+++ b/vcpkg/ports/simpleble/use-std-localtime.patch
@@ -0,0 +1,16 @@
+diff --git a/simpleble/src/Logging.cpp b/simpleble/src/Logging.cpp
+index 781b658..6b05e44 100644
+--- a/simpleble/src/Logging.cpp
++++ b/simpleble/src/Logging.cpp
+@@ -90,7 +90,11 @@ void Logger::log_default_stdout() {
+
+ void Logger::log_default_file() {
+ std::time_t t = std::time(nullptr);
++#if FMT_VERSION < 120000
+ std::string date_time_str = fmt::format("{:%Y-%m-%d_%H-%M-%S}", fmt::localtime(t));
++#else
++ std::string date_time_str = fmt::format("{:%Y-%m-%d_%H-%M-%S}", *std::localtime(&t));
++#endif
+ std::string filename = fmt::format("simpleble_{}", date_time_str);
+ log_default_file(filename);
+ }
diff --git a/vcpkg/ports/simpleble/vcpkg.json b/vcpkg/ports/simpleble/vcpkg.json
new file mode 100644
index 0000000..e40b64d
--- /dev/null
+++ b/vcpkg/ports/simpleble/vcpkg.json
@@ -0,0 +1,24 @@
+{
+ "name": "simpleble",
+ "version": "0.8.1",
+ "port-version": 1,
+ "description": "The ultimate fully-fledged cross-platform library and bindings for Bluetooth Low Energy (BLE).",
+ "homepage": "https://github.com/OpenBluetoothToolbox/SimpleBLE",
+ "license": "GPL-3.0",
+ "supports": "!android & !uwp",
+ "dependencies": [
+ {
+ "name": "dbus",
+ "platform": "linux"
+ },
+ "fmt",
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
+}