Skip to content

Commit 67b9b04

Browse files
authored
Switch wolfssl to external registry and update build config (#735)
* Switch wolfssl to external registry and update build config Removed the local wolfssl overlay port and updated vcpkg-configuration.json to use an external registry for wolfssl and libpng. Updated vcpkg triplets to add -fvisibility flags for better symbol visibility control. Modified the GitHub Actions workflow to use a custom vcpkg binary cache and removed NuGet credential setup steps. Also updated .gitignore to exclude the removed overlay-ports directory. * Update build-project.yaml * Update vcpkg-configuration.json * Update OpenCV4 features in vcpkg.json and config Removed 'opencv4' from the custom registry in vcpkg-configuration.json and added specific image format features (jpeg, png, tiff, webp) to the opencv4 package in vcpkg.json. This ensures OpenCV is built with support for these formats.
1 parent fbd855d commit 67b9b04

File tree

9 files changed

+25
-140
lines changed

9 files changed

+25
-140
lines changed

.github/workflows/build-project.yaml

Lines changed: 1 addition & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,9 @@ on:
2626

2727
permissions:
2828
contents: read
29-
packages: read
3029

3130
env:
32-
VCPKG_BINARY_SOURCES: "clear;nuget,https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json,read"
31+
VCPKG_BINARY_SOURCES: "clear;http,https://vcpkg-obs.kaito.tokyo/{name}/{version}/{sha}"
3332
VCPKG_ROOT: "${{ github.workspace }}/vcpkg"
3433

3534
jobs:
@@ -170,19 +169,6 @@ jobs:
170169
- name: Bootstrap vcpkg
171170
working-directory: ${{ env.VCPKG_ROOT }}
172171
run: ./bootstrap-vcpkg.sh
173-
174-
- name: Install mono
175-
run: brew install mono
176-
177-
- name: "Setup NuGet Credentials"
178-
run: |
179-
NUGET_PATH="$($VCPKG_ROOT/vcpkg fetch nuget | tail -n1)"
180-
mono "$NUGET_PATH" sources add \
181-
-Source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" \
182-
-StorePasswordInClearText \
183-
-Name "GitHub" \
184-
-UserName "${{ github.repository_owner }}" \
185-
-Password "${{ secrets.GITHUB_TOKEN }}"
186172

187173
- name: "Install dependencies from vcpkg"
188174
run: ".github/scripts/install-vcpkg-macos.bash"
@@ -276,21 +262,6 @@ jobs:
276262
- name: Bootstrap vcpkg
277263
working-directory: ${{ env.VCPKG_ROOT }}
278264
run: ./bootstrap-vcpkg.sh
279-
280-
- name: Install mono
281-
run: sudo apt-get -y install mono-devel
282-
283-
- name: "Setup NuGet Credentials"
284-
run: |
285-
NUGET_PATH="$($VCPKG_ROOT/vcpkg fetch nuget | tail -n1)"
286-
mono "$NUGET_PATH" sources add \
287-
-Source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" \
288-
-StorePasswordInClearText \
289-
-Name "GitHub" \
290-
-UserName "${{ github.repository_owner }}" \
291-
-Password "${{ secrets.GITHUB_TOKEN }}"
292-
mono "$NUGET_PATH" setapikey "${{ secrets.GITHUB_TOKEN }}" \
293-
-Source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
294265

295266
- name: "Install dependencies from vcpkg"
296267
run: "$VCPKG_ROOT/vcpkg install --triplet x64-linux-obs"
@@ -376,20 +347,6 @@ jobs:
376347
run: |
377348
.\bootstrap-vcpkg.bat
378349
379-
- name: "Setup NuGet Credentials on Windows"
380-
shell: pwsh
381-
run: |
382-
$NUGET_EXE_PATH = & "${{ env.VCPKG_ROOT }}/vcpkg" fetch nuget | Select-Object -Last 1
383-
384-
& $NUGET_EXE_PATH sources add `
385-
-Source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" `
386-
-StorePasswordInClearText `
387-
-Name "GitHub" `
388-
-UserName "${{ github.repository_owner }}" `
389-
-Password "${{ secrets.GITHUB_TOKEN }}"
390-
& $NUGET_EXE_PATH setapikey "${{ secrets.GITHUB_TOKEN }}" `
391-
-Source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
392-
393350
- name: "Install dependencies from vcpkg"
394351
shell: bash
395352
run: "$VCPKG_ROOT/vcpkg install --triplet x64-windows-static-md-obs"
@@ -456,20 +413,6 @@ jobs:
456413
run: |
457414
.\bootstrap-vcpkg.bat
458415
459-
- name: "Setup NuGet Credentials on Windows"
460-
shell: pwsh
461-
run: |
462-
$NUGET_EXE_PATH = & "${{ env.VCPKG_ROOT }}/vcpkg" fetch nuget | Select-Object -Last 1
463-
464-
& $NUGET_EXE_PATH sources add `
465-
-Source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" `
466-
-StorePasswordInClearText `
467-
-Name "GitHub" `
468-
-UserName "${{ github.repository_owner }}" `
469-
-Password "${{ secrets.GITHUB_TOKEN }}"
470-
& $NUGET_EXE_PATH setapikey "${{ secrets.GITHUB_TOKEN }}" `
471-
-Source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
472-
473416
- name: "Install dependencies from vcpkg"
474417
shell: bash
475418
run: "$VCPKG_ROOT/vcpkg install --triplet x64-windows-static-md-obs"

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
!/docs
1010
!/pages
1111
!/src
12-
!/vcpkg-overlay-ports
1312
!/vcpkg-triplets
1413
!.clang-format
1514
!.cmake-format.json

vcpkg-configuration.json

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,19 @@
22
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg-configuration.schema.json",
33
"default-registry": {
44
"kind": "git",
5-
"baseline": "b27f6bfad367d64f8f0f3296351c5d246e182bb4",
5+
"baseline": "cfcbdb245f1179a5a493890a0b69531d66969e62",
66
"repository": "https://github.com/microsoft/vcpkg"
77
},
8-
"overlay-ports": [
9-
"./vcpkg-overlay-ports"
8+
"registries": [
9+
{
10+
"kind": "git",
11+
"baseline": "901fdb51caca7b97a3fb37810642dc28631ece49",
12+
"repository": "https://github.com/kaito-tokyo/vcpkg-obs-kaito-tokyo",
13+
"packages": [
14+
"libpng",
15+
"wolfssl"
16+
]
17+
}
1018
],
1119
"overlay-triplets": [
1220
"./vcpkg-triplets"

vcpkg-overlay-ports/wolfssl/portfile.cmake

Lines changed: 0 additions & 51 deletions
This file was deleted.

vcpkg-overlay-ports/wolfssl/vcpkg.json

Lines changed: 0 additions & 22 deletions
This file was deleted.

vcpkg-triplets/arm64-osx-obs.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ set(VCPKG_CMAKE_SYSTEM_NAME Darwin)
66
set(VCPKG_OSX_ARCHITECTURES arm64)
77

88
set(VCPKG_OSX_DEPLOYMENT_TARGET "12.0")
9+
set(VCPKG_C_FLAGS "${VCPKG_C_FLAGS} -fvisibility=hidden")
10+
set(VCPKG_CXX_FLAGS "${VCPKG_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden")

vcpkg-triplets/x64-linux-obs.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ set(VCPKG_LIBRARY_LINKAGE static)
44

55
set(VCPKG_CMAKE_SYSTEM_NAME Linux)
66

7-
set(VCPKG_C_FLAGS "${VCPKG_C_FLAGS} -mavx2")
8-
set(VCPKG_CXX_FLAGS "${VCPKG_CXX_FLAGS} -mavx2")
7+
set(VCPKG_C_FLAGS "${VCPKG_C_FLAGS} -mavx2 -fvisibility=hidden")
8+
set(VCPKG_CXX_FLAGS "${VCPKG_CXX_FLAGS} -mavx2 -fvisibility=hidden -fvisibility-inlines-hidden")

vcpkg-triplets/x64-osx-obs.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ set(VCPKG_CMAKE_SYSTEM_NAME Darwin)
66
set(VCPKG_OSX_ARCHITECTURES x86_64)
77

88
set(VCPKG_OSX_DEPLOYMENT_TARGET "12.0")
9-
set(VCPKG_C_FLAGS "${VCPKG_C_FLAGS} -mavx2")
10-
set(VCPKG_CXX_FLAGS "${VCPKG_CXX_FLAGS} -mavx2")
9+
set(VCPKG_C_FLAGS "${VCPKG_C_FLAGS} -mavx2 -fvisibility=hidden")
10+
set(VCPKG_CXX_FLAGS "${VCPKG_CXX_FLAGS} -mavx2 -fvisibility=hidden -fvisibility-inlines-hidden")

vcpkg.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,13 @@
1919
},
2020
{
2121
"name": "opencv4",
22-
"default-features": false
22+
"default-features": false,
23+
"features": [
24+
"jpeg",
25+
"png",
26+
"tiff",
27+
"webp"
28+
]
2329
}
2430
]
2531
}

0 commit comments

Comments
 (0)