Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
TOOLCHAIN: ${{ matrix.spec.toolchain && format('../../toolchains/{0}.cmake', matrix.spec.toolchain) || '' }}
run: |
(cd deps/ziti-tunnel-sdk-c && git fetch --tags)
cmake -DCMAKE_BUILD_TYPE=Release -DTLSUV_TLSLIB=openssl -DEXCLUDE_PROGRAMS=ON -DZITI_TUNNEL_BUILD_TESTS=OFF -DCMAKE_TOOLCHAIN_FILE="${TOOLCHAIN}" -S ./deps/ziti-tunnel-sdk-c -B ./deps/ziti-tunnel-sdk-c/${{ matrix.spec.name }}
cmake -DCMAKE_BUILD_TYPE=Release -DTLSUV_TLSLIB=openssl -DEXCLUDE_PROGRAMS=ON -DVCPKG_INSTALL_OPTIONS="--debug;--overlay-ports=./deps/vcpkg-overlays/json-c" -DZITI_TUNNEL_BUILD_TESTS=OFF -DCMAKE_TOOLCHAIN_FILE="${TOOLCHAIN}" -S ./deps/ziti-tunnel-sdk-c -B ./deps/ziti-tunnel-sdk-c/${{ matrix.spec.name }}
cmake --build ./deps/ziti-tunnel-sdk-c/${{ matrix.spec.name }}
tar -cvzf ${{ matrix.spec.name }}.tgz -C ./deps/ziti-tunnel-sdk-c ${{ matrix.spec.name }}

Expand Down
2 changes: 1 addition & 1 deletion build_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function build_tsdk {
cmake -DCMAKE_BUILD_TYPE=${cmake_build_type} \
${clang_asan_flags} \
-DTLSUV_TLSLIB=openssl \
-DVCPKG_INSTALL_OPTIONS="--debug" \
-DVCPKG_INSTALL_OPTIONS="--debug;--overlay-ports=./deps/vcpkg-overlays/json-c" \
-DEXCLUDE_PROGRAMS=ON \
-DZITI_TUNNEL_BUILD_TESTS=OFF \
-DCMAKE_TOOLCHAIN_FILE="${toolchain}" \
Expand Down
2 changes: 1 addition & 1 deletion deps/toolchains/iOS-Simulator-arm64.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)

# work around vcpkg's openssl port assuming simulator platform should only be used when building x86_64
set(ENV{VCPKG_OVERLAY_PORTS} ${PROJECT_SOURCE_DIR}/../vcpkg-overlays)
set(ENV{VCPKG_OVERLAY_PORTS} ${PROJECT_SOURCE_DIR}/../vcpkg-overlays/openssl)

set(VCPKG_OVERLAY_TRIPLETS ${PROJECT_SOURCE_DIR}/../vcpkg-triplets)
set(VCPKG_TARGET_TRIPLET arm64-iphonesimulator)
Expand Down
15 changes: 15 additions & 0 deletions deps/vcpkg-overlays/json-c/disable-duplocale.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -183,6 +183,12 @@

if (CMAKE_GNU_C_MACHINE MATCHES "uclibc")
message(STATUS "Detected uClibc compiler, disabling locale handling")
+ set(HAVE_SETLOCALE 0)
+ set(HAVE_USELOCALE 0)
+endif()
+
+if (APPLE)
+ message(STATUS "Detected apple, disabling locale handling to avoid leaks.")
set(HAVE_SETLOCALE 0)
set(HAVE_USELOCALE 0)
endif()
32 changes: 32 additions & 0 deletions deps/vcpkg-overlays/json-c/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO json-c/json-c
REF "json-c-${VERSION}"

SHA512 219d8c0da9a4016b74af238cc15dbec1f369a07de160bcc548d80279028e1b5d8d928deb13fec09c96a085fc0ecf10090e309cbe72d0081aca864433c4ae01db
HEAD_REF master
PATCHES
disable-duplocale.patch
)

string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" JSON_BUILD_STATIC)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" JSON_BUILD_SHARED)

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DBUILD_TESTING=OFF
-DBUILD_STATIC_LIBS=${JSON_BUILD_STATIC}
-DBUILD_SHARED_LIBS=${JSON_BUILD_SHARED}
)

vcpkg_cmake_install()

vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}")
vcpkg_fixup_pkgconfig()
vcpkg_copy_pdbs()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")

# Handle copyright
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
17 changes: 17 additions & 0 deletions deps/vcpkg-overlays/json-c/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "json-c",
"version": "0.18-20240915",
"description": "A JSON implementation in C",
"homepage": "https://github.com/json-c/json-c",
"license": "MIT",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}
2 changes: 1 addition & 1 deletion deps/ziti-tunnel-sdk-c
Loading